├── .gitattributes ├── .githooks └── pre-commit ├── .github ├── CODEOWNERS ├── dependabot.yaml └── workflows │ ├── push.yaml │ └── review.yaml ├── .gitignore ├── LICENSE ├── Makefile ├── NOTICE.txt ├── README.md ├── buf.gen.yaml ├── buf.lock ├── buf.md ├── buf.yaml ├── docs └── openapiv2 │ └── apidocs.swagger.json ├── openfga └── v1 │ ├── authzmodel.proto │ ├── errors_ignore.proto │ ├── openapi.proto │ ├── openfga.proto │ ├── openfga_service.proto │ └── openfga_service_consistency.proto ├── proto ├── go.mod ├── go.sum └── openfga │ └── v1 │ ├── authzmodel.pb.go │ ├── authzmodel.pb.validate.go │ ├── errors_ignore.pb.go │ ├── errors_ignore.pb.validate.go │ ├── openapi.pb.go │ ├── openapi.pb.validate.go │ ├── openfga.pb.go │ ├── openfga.pb.validate.go │ ├── openfga_service.pb.go │ ├── openfga_service.pb.gw.go │ ├── openfga_service.pb.validate.go │ ├── openfga_service_consistency.pb.go │ ├── openfga_service_consistency.pb.validate.go │ └── openfga_service_grpc.pb.go └── scripts └── update_swagger.sh /.gitattributes: -------------------------------------------------------------------------------- 1 | /docs/openapiv2/apidocs.swagger.json linguist-generated=true 2 | *.pb.go linguist-generated=true 3 | *.pb.*.go linguist-generated=true 4 | go.sum linguist-generated=true 5 | buf.lock linguist-generated=true 6 | -------------------------------------------------------------------------------- /.githooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This is a simple check to ensure people remember to regenerate the docs 3 | # and the pb.go files if they change a .proto file. 4 | # It's not iron-clad but it's better than finding out later in github. 5 | 6 | # AMD = added, modified, deleted 7 | files=$(git diff --cached --name-only --diff-filter=AMD) 8 | 9 | LIGHT_RED='\033[1;31m' 10 | RESET='\033[0m' # No Color 11 | 12 | # naive regex check for .proto extension 13 | if [[ "$files" =~ \.proto ]] 14 | then 15 | # Check if there's a staged diff in /docs and in the generated pb.go files 16 | docs_change=$(git diff --cached --raw docs/) 17 | go_change=$(git diff --cached --raw proto/openfga/) 18 | if [ -n "$docs_change" ] && [ -n "$go_change" ]; then 19 | # Both were changed, we're good 20 | exit 0 21 | else 22 | # One of the two directories does not have changes, block this commit 23 | echo "This commit contains .proto changes but either the docs or generated /proto files are not part of this commit." 24 | echo "${LIGHT_RED}Your changes were not committed, please run 'make all' and add the resulting changes${RESET}\n" 25 | exit 1 26 | fi 27 | fi 28 | 29 | exit 0 30 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @openfga/backend 2 | docs/ @openfga/dx @openfga/docs -------------------------------------------------------------------------------- /.github/dependabot.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "gomod" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | groups: 8 | dependencies: 9 | patterns: 10 | - "*" 11 | - package-ecosystem: "github-actions" 12 | directory: "/" 13 | schedule: 14 | interval: "weekly" 15 | groups: 16 | dependencies: 17 | patterns: 18 | - "*" 19 | -------------------------------------------------------------------------------- /.github/workflows/push.yaml: -------------------------------------------------------------------------------- 1 | name: push 2 | on: 3 | push: 4 | branches: 5 | - main 6 | paths: 7 | - openfga/**/*.proto 8 | - buf.md 9 | - buf.lock 10 | - README.md 11 | workflow_dispatch: 12 | 13 | permissions: 14 | contents: read 15 | 16 | jobs: 17 | push: 18 | runs-on: ubuntu-latest 19 | steps: 20 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 21 | with: 22 | fetch-depth: 0 23 | 24 | - uses: bufbuild/buf-setup-action@1115d0acd3d2a120b30023fac52abc46807c8fd6 # v1.48.0 25 | - uses: bufbuild/buf-push-action@a654ff18effe4641ebea4a4ce242c49800728459 # v1.2.0 26 | with: 27 | buf_token: ${{ secrets.BUF_TOKEN }} 28 | - name: Send PagerDuty alert on failure 29 | if: ${{ failure() }} 30 | uses: miparnisari/action-pagerduty-alert@a6a738b712efa0e1a45b1b796c62f60fc30b5d99 # v0.3.2 31 | with: 32 | pagerduty-integration-key: ${{ secrets.PAGERDUTY_INTEGRATION_KEY }} 33 | incident-summary: "Problem pushing OpenFGA Buf module to Buf Registry" 34 | -------------------------------------------------------------------------------- /.github/workflows/review.yaml: -------------------------------------------------------------------------------- 1 | name: review 2 | on: 3 | pull_request: 4 | branches: 5 | - main 6 | - feat/* 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 16 | with: 17 | fetch-depth: 0 18 | - uses: bufbuild/buf-setup-action@1115d0acd3d2a120b30023fac52abc46807c8fd6 # v1.48.0 19 | - uses: bufbuild/buf-lint-action@06f9dd823d873146471cfaaf108a993fe00e5325 # v1.1.1 20 | - uses: bufbuild/buf-breaking-action@c57b3d842a5c3f3b454756ef65305a50a587c5ba # v1.1.4 21 | with: 22 | # The 'main' branch of the GitHub repository that defines the module. 23 | against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=${GITHUB_BASE_REF}" 24 | - run: buf format -d --exit-code 25 | 26 | diff-openapi: 27 | runs-on: ubuntu-latest 28 | steps: 29 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 30 | with: 31 | fetch-depth: 0 32 | - uses: bufbuild/buf-setup-action@1115d0acd3d2a120b30023fac52abc46807c8fd6 # v1.48.0 33 | - name: "Generate OpenAPI & Diff" 34 | run: | 35 | make all 36 | git diff --text --exit-code docs/openapiv2/apidocs.swagger.json proto/**/*.go 37 | 38 | validate-openapi: 39 | runs-on: ubuntu-latest 40 | steps: 41 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 42 | with: 43 | fetch-depth: 0 44 | - uses: swaggerexpert/swagger-editor-validate@e8e51dbc8c18e87f96b082b18a6a7cbd3c44abd8 # v1.4.2 45 | with: 46 | definition-file: ./docs/openapiv2/apidocs.swagger.json 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore IDE-specific directories 2 | .idea/ 3 | .vscode/ 4 | *.sublime-workspace 5 | # Vim temp files 6 | *~ 7 | .dccache 8 | 9 | .DS_Store 10 | .env 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: patch-swagger-doc format 2 | 3 | buf-gen: init-git-hooks 4 | ./buf.gen.yaml 5 | 6 | patch-swagger-doc: buf-gen 7 | ./scripts/update_swagger.sh docs/openapiv2/apidocs.swagger.json 8 | 9 | format: buf-gen 10 | buf format -w 11 | 12 | init-git-hooks: 13 | git config --local core.hooksPath .githooks/ 14 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | OpenFGA API 2 | github.com/openfga/api 3 | Copyright 2022 Okta, Inc. 4 | 5 | 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 6 | 7 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OpenFGA API 2 | This project contains the definitions of [Protocol Buffers](https://developers.google.com/protocol-buffers/) used by OpenFGA. 3 | 4 | [Buf](https://github.com/bufbuild/buf) is used to manage, package, and generate source code from the protocol buffer definitions. The API definitions 5 | are pushed to the [`buf.build/openfga/api`](https://buf.build/openfga/api) repository in the Buf Registry. 6 | 7 | ## Building the Generated Sources 8 | To generate source code from the protobuf definitions contained in this project you can run the following command: 9 | 10 | > **Note**: You must have [Buf CLI](https://docs.buf.build/installation) installed to run the following command. 11 | > 12 | ```bash 13 | make buf-gen 14 | ``` 15 | 16 | The command above will generate source code in the `proto/` directory. It will also configure a local git hook to check 17 | that files requiring auto-generation after `.proto` changes have been updated. There are some cases where that git hook 18 | may be overly strict. In those cases you can bypass it with `commit --no-verify`. 19 | 20 | ## Use the generated sources in OpenFGA 21 | 22 | 1. Generate the sources as above 23 | 2. In the `proto` directory execute the following commands: 24 | ``` 25 | go mod init go.buf.build/openfga/go/openfga/api 26 | go mod tidy 27 | ``` 28 | 3. In OpenFGA, add the following line to your `go.mod`: 29 | ``` 30 | replace github.com/openfga/api/proto => /path/to/proto 31 | ``` 32 | 33 | ## Generating OpenAPI Documentation 34 | To generate the OpenAPI documentation from the protobuf sources you can run the following commands: 35 | 36 | > **Note**: You must have [jq](https://jqlang.github.io/jq/download/) installed to run the `format` step below 37 | 38 | ```bash 39 | ./buf.gen.yaml 40 | ./scripts/update_swagger.sh docs/openapiv2/apidocs.swagger.json 41 | buf format -w 42 | ``` 43 | 44 | Or you can just use 45 | ```bash 46 | make 47 | ``` 48 | -------------------------------------------------------------------------------- /buf.gen.yaml: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env -S buf generate --template 2 | --- 3 | version: v1 4 | managed: 5 | enabled: true 6 | go_package_prefix: 7 | default: github.com/openfga/api/proto 8 | except: 9 | - buf.build/googleapis/googleapis 10 | - buf.build/envoyproxy/protoc-gen-validate 11 | - buf.build/grpc-ecosystem/grpc-gateway 12 | plugins: 13 | - plugin: buf.build/protocolbuffers/go:v1.34.0 14 | out: proto/ 15 | opt: 16 | - paths=source_relative 17 | - plugin: buf.build/grpc/go:v1.3.0 18 | out: proto/ 19 | opt: 20 | - paths=source_relative 21 | - plugin: buf.build/bufbuild/validate-go:v1.0.4 22 | out: proto/ 23 | opt: 24 | - paths=source_relative 25 | - plugin: buf.build/grpc-ecosystem/gateway:v2.19.1 26 | out: proto/ 27 | opt: 28 | - paths=source_relative 29 | - logtostderr=true 30 | - plugin: buf.build/grpc-ecosystem/openapiv2:v2.16.0 31 | out: docs/openapiv2 32 | opt: 33 | - openapi_naming_strategy=simple 34 | - allow_merge=true 35 | -------------------------------------------------------------------------------- /buf.lock: -------------------------------------------------------------------------------- 1 | # Generated by buf. DO NOT EDIT. 2 | version: v1 3 | deps: 4 | - remote: buf.build 5 | owner: envoyproxy 6 | repository: protoc-gen-validate 7 | commit: ea113bc841fa448ab34bf3f9fa6cef0f 8 | digest: shake256:8f3653779e824957a4fe3d18cdb73531f7f7ed1393848082dfe1f90026fd187da9534e759b5833f4e5487be0d34cfa7d4ff149af9a2694863773387d61d09fce 9 | - remote: buf.build 10 | owner: googleapis 11 | repository: googleapis 12 | commit: 2011a25076274e6b974567fbf6697481 13 | digest: shake256:7149cf5e9955c692d381e557830555d4e93f205a0f1b8e2dfdae46d029369aa3fc1980e35df0d310f7cc3b622f93e19ad276769a283a967dd3065ddfd3a40e13 14 | - remote: buf.build 15 | owner: grpc-ecosystem 16 | repository: grpc-gateway 17 | commit: b661eb9bddab46c7bdbad4c73161bb11 18 | digest: shake256:67b115260e12cb2d6c5d5ce8dbbf3a095c86f0e52b84f9dbd16dec9433b218f8694bc9aadb1d45eb6fd52f5a7029977d460e2d58afb3208ab6c680e7b21c80e4 19 | -------------------------------------------------------------------------------- /buf.md: -------------------------------------------------------------------------------- 1 | ./README.md -------------------------------------------------------------------------------- /buf.yaml: -------------------------------------------------------------------------------- 1 | version: v1 2 | name: buf.build/openfga/api 3 | deps: 4 | - buf.build/envoyproxy/protoc-gen-validate 5 | - buf.build/grpc-ecosystem/grpc-gateway 6 | - buf.build/googleapis/googleapis 7 | breaking: 8 | ignore_unstable_packages: true 9 | 10 | lint: 11 | allow_comment_ignores: true 12 | ignore_only: 13 | ENUM_VALUE_UPPER_SNAKE_CASE: 14 | - openfga/v1/errors_ignore.proto 15 | ENUM_VALUE_PREFIX: 16 | - openfga/v1/errors_ignore.proto 17 | - openfga/v1/openfga_service_consistency.proto 18 | ENUM_ZERO_VALUE_SUFFIX: 19 | - openfga/v1/errors_ignore.proto 20 | - openfga/v1/openfga_service_consistency.proto -------------------------------------------------------------------------------- /openfga/v1/authzmodel.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package openfga.v1; 4 | 5 | import "google/api/field_behavior.proto"; 6 | import "protoc-gen-openapiv2/options/annotations.proto"; 7 | import "validate/validate.proto"; 8 | 9 | message AuthorizationModel { 10 | string id = 1 [ 11 | (google.api.field_behavior) = REQUIRED, 12 | (validate.rules).string = { 13 | pattern: "^[ABCDEFGHJKMNPQRSTVWXYZ0-9]{26}$" 14 | ignore_empty: false 15 | }, 16 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"01G5JAVJ41T49E9TT3SKVS7X1J\""} 17 | ]; 18 | 19 | string schema_version = 2 [ 20 | (google.api.field_behavior) = REQUIRED, 21 | (validate.rules).string = { 22 | pattern: "^[1-9].[1-9]$" 23 | ignore_empty: false 24 | }, 25 | json_name = "schema_version" 26 | ]; 27 | 28 | repeated TypeDefinition type_definitions = 3 [ 29 | json_name = "type_definitions", 30 | (google.api.field_behavior) = REQUIRED, 31 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "[{\"type\": \"user\"}, {\"type\":\"document\",\"relations\":{\"reader\":{\"union\":{\"child\":[{\"this\":{}},{\"computedUserset\":{\"object\":\"\",\"relation\":\"writer\"}}]}},\"writer\":{\"this\":{}}},\"metadata\":{\"relations\":{\"reader\":{\"directly_related_user_types\":[{\"type\":\"user\"}]},\"writer\":{\"directly_related_user_types\":[{\"type\":\"user\"}]}}}}]"} 32 | ]; 33 | 34 | map conditions = 4 [ 35 | json_name = "conditions", 36 | (validate.rules).map.max_pairs = 25, 37 | (validate.rules).map.keys.string = { 38 | pattern: "^[^:#@\\s]{1,50}$" 39 | ignore_empty: false 40 | } 41 | ]; 42 | } 43 | 44 | message TypeDefinition { 45 | string type = 1 [ 46 | (validate.rules).string = { 47 | pattern: "^[^:#@\\s]{1,254}$" 48 | ignore_empty: false 49 | }, 50 | (google.api.field_behavior) = REQUIRED, 51 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"document\""} 52 | ]; 53 | 54 | map relations = 2 [ 55 | (validate.rules).map.keys.string = {pattern: "^[^:#@\\s]{1,50}$"}, 56 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "{\"reader\":{\"union\":{\"child\":[{\"this\":{}},{\"computedUserset\":{\"object\":\"\",\"relation\":\"writer\"}}]}},\"writer\":{\"this\":{}}}"} 57 | ]; 58 | 59 | // A map whose keys are the name of the relation and whose value is the Metadata for that relation. 60 | // It also holds information around the module name and source file if this model was constructed 61 | // from a modular model. 62 | Metadata metadata = 3; 63 | } 64 | 65 | message Relation { 66 | string name = 1 [(validate.rules).string = { 67 | pattern: "^[^:#@\\s]{1,50}$" 68 | ignore_empty: false 69 | }]; 70 | 71 | Userset rewrite = 2 [ 72 | (validate.rules).message.required = true, 73 | (google.api.field_behavior) = REQUIRED 74 | ]; 75 | 76 | RelationTypeInfo type_info = 3; 77 | } 78 | 79 | message RelationTypeInfo { 80 | repeated RelationReference directly_related_user_types = 1 [json_name = "directly_related_user_types"]; 81 | } 82 | 83 | message Metadata { 84 | map relations = 1; 85 | 86 | string module = 2 [(validate.rules).string = { 87 | pattern: "^[^:#@\\s]{1,50}$" 88 | ignore_empty: true 89 | }]; 90 | 91 | SourceInfo source_info = 3 [json_name = "source_info"]; 92 | } 93 | 94 | message SourceInfo { 95 | string file = 1 [(validate.rules).string = { 96 | pattern: "^[a-zA-Z0-9_\\-\\/]{1,100}\\.fga$" 97 | ignore_empty: true 98 | }]; 99 | } 100 | 101 | message RelationMetadata { 102 | repeated RelationReference directly_related_user_types = 1 [json_name = "directly_related_user_types"]; 103 | 104 | string module = 2 [(validate.rules).string = { 105 | pattern: "^[^:#@\\s]{1,50}$" 106 | ignore_empty: true 107 | }]; 108 | 109 | SourceInfo source_info = 3 [json_name = "source_info"]; 110 | } 111 | 112 | // RelationReference represents a relation of a particular object type (e.g. 'document#viewer'). 113 | message RelationReference { 114 | string type = 1 [ 115 | (validate.rules).string = { 116 | pattern: "^[^:#@\\s]{1,254}$" 117 | ignore_empty: false 118 | }, 119 | (google.api.field_behavior) = REQUIRED, 120 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"group\""} 121 | ]; 122 | 123 | oneof relation_or_wildcard { 124 | string relation = 2 [ 125 | (validate.rules).string = { 126 | pattern: "^[^:#@\\s]{1,50}$" 127 | ignore_empty: true 128 | }, 129 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"member\""} 130 | ]; 131 | 132 | Wildcard wildcard = 3; 133 | } 134 | 135 | // The name of a condition that is enforced over the allowed relation. 136 | string condition = 4 [(validate.rules).string = { 137 | pattern: "^[^:#@\\s]{1,50}$" 138 | ignore_empty: true 139 | }]; 140 | } 141 | 142 | message Wildcard {} 143 | 144 | message Usersets { 145 | repeated Userset child = 1 [(google.api.field_behavior) = REQUIRED]; 146 | } 147 | 148 | message Difference { 149 | Userset base = 1 [ 150 | (validate.rules).message.required = true, 151 | (google.api.field_behavior) = REQUIRED 152 | ]; 153 | 154 | Userset subtract = 2 [ 155 | (validate.rules).message.required = true, 156 | (google.api.field_behavior) = REQUIRED 157 | ]; 158 | } 159 | 160 | message Userset { 161 | oneof userset { 162 | DirectUserset this = 1; 163 | ObjectRelation computed_userset = 2; 164 | TupleToUserset tuple_to_userset = 3; 165 | Usersets union = 4; 166 | Usersets intersection = 5; 167 | Difference difference = 6; 168 | } 169 | } 170 | 171 | // A DirectUserset is a sentinel message for referencing 172 | // the direct members specified by an object/relation mapping. 173 | message DirectUserset {} 174 | 175 | message ObjectRelation { 176 | string object = 1 [(validate.rules).string = {max_bytes: 256}]; 177 | string relation = 2 [(validate.rules).string = {max_bytes: 50}]; 178 | } 179 | 180 | message ComputedUserset { 181 | string relation = 1 [ 182 | (google.api.field_behavior) = REQUIRED, 183 | (validate.rules).string = { 184 | max_bytes: 50 185 | ignore_empty: false 186 | } 187 | ]; 188 | } 189 | 190 | message TupleToUserset { 191 | // The target object/relation 192 | ObjectRelation tupleset = 1 [ 193 | (google.api.field_behavior) = REQUIRED, 194 | (validate.rules).message.required = true 195 | ]; 196 | ObjectRelation computed_userset = 2 [ 197 | (google.api.field_behavior) = REQUIRED, 198 | (validate.rules).message.required = true 199 | ]; 200 | } 201 | 202 | message Condition { 203 | // A unique name for the condition 204 | string name = 1 [ 205 | (google.api.field_behavior) = REQUIRED, 206 | (validate.rules).string = { 207 | pattern: "^[^:#@\\s]{1,50}$" 208 | ignore_empty: false 209 | } 210 | ]; 211 | 212 | // A Google CEL expression, expressed as a string. 213 | string expression = 2 [ 214 | (google.api.field_behavior) = REQUIRED, 215 | (validate.rules).string = { 216 | max_bytes: 512 217 | ignore_empty: false 218 | } 219 | ]; 220 | 221 | // A map of parameter names to the parameter's defined type reference. 222 | map parameters = 3 [ 223 | (validate.rules).map.max_pairs = 25, 224 | (validate.rules).map.keys.string = {pattern: "^[^:#@\\s]{1,50}$"} 225 | ]; 226 | 227 | ConditionMetadata metadata = 4; 228 | } 229 | 230 | message ConditionMetadata { 231 | string module = 1 [(validate.rules).string = { 232 | pattern: "^[^:#@\\s]{1,50}$" 233 | ignore_empty: true 234 | }]; 235 | 236 | SourceInfo source_info = 2 [json_name = "source_info"]; 237 | } 238 | 239 | message ConditionParamTypeRef { 240 | enum TypeName { 241 | TYPE_NAME_UNSPECIFIED = 0; 242 | TYPE_NAME_ANY = 1; 243 | TYPE_NAME_BOOL = 2; 244 | TYPE_NAME_STRING = 3; 245 | TYPE_NAME_INT = 4; 246 | TYPE_NAME_UINT = 5; 247 | TYPE_NAME_DOUBLE = 6; 248 | TYPE_NAME_DURATION = 7; 249 | TYPE_NAME_TIMESTAMP = 8; 250 | TYPE_NAME_MAP = 9; 251 | TYPE_NAME_LIST = 10; 252 | TYPE_NAME_IPADDRESS = 11; 253 | } 254 | 255 | TypeName type_name = 1 [ 256 | json_name = "type_name", 257 | (google.api.field_behavior) = REQUIRED, 258 | (validate.rules).enum.defined_only = true 259 | ]; 260 | 261 | repeated ConditionParamTypeRef generic_types = 2 [ 262 | json_name = "generic_types", 263 | (validate.rules).repeated.max_items = 5 264 | ]; 265 | } 266 | -------------------------------------------------------------------------------- /openfga/v1/errors_ignore.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package openfga.v1; 4 | 5 | import "protoc-gen-openapiv2/options/annotations.proto"; 6 | 7 | enum AuthErrorCode { 8 | no_auth_error = 0; 9 | 10 | auth_failed_invalid_subject = 1001; 11 | auth_failed_invalid_audience = 1002; 12 | auth_failed_invalid_issuer = 1003; 13 | invalid_claims = 1004; 14 | auth_failed_invalid_bearer_token = 1005; 15 | bearer_token_missing = 1010; 16 | 17 | unauthenticated = 1500; 18 | 19 | forbidden = 1600; 20 | } 21 | 22 | enum ErrorCode { 23 | no_error = 0; 24 | 25 | // 2000 level errors are returned due to input error 26 | 27 | validation_error = 2000; 28 | authorization_model_not_found = 2001; 29 | authorization_model_resolution_too_complex = 2002; 30 | invalid_write_input = 2003; 31 | cannot_allow_duplicate_tuples_in_one_request = 2004; 32 | cannot_allow_duplicate_types_in_one_request = 2005; 33 | cannot_allow_multiple_references_to_one_relation = 2006; 34 | invalid_continuation_token = 2007; 35 | invalid_tuple_set = 2008; 36 | invalid_check_input = 2009; 37 | invalid_expand_input = 2010; 38 | unsupported_user_set = 2011; 39 | invalid_object_format = 2012; 40 | write_failed_due_to_invalid_input = 2017; 41 | authorization_model_assertions_not_found = 2018; 42 | latest_authorization_model_not_found = 2020; 43 | type_not_found = 2021; 44 | relation_not_found = 2022; 45 | empty_relation_definition = 2023; 46 | invalid_user = 2025; 47 | invalid_tuple = 2027; 48 | unknown_relation = 2028; 49 | store_id_invalid_length = 2030; 50 | assertions_too_many_items = 2033; 51 | id_too_long = 2034; 52 | authorization_model_id_too_long = 2036; 53 | tuple_key_value_not_specified = 2037; 54 | tuple_keys_too_many_or_too_few_items = 2038; 55 | page_size_invalid = 2039; 56 | param_missing_value = 2040; 57 | difference_base_missing_value = 2041; 58 | subtract_base_missing_value = 2042; 59 | object_too_long = 2043; 60 | relation_too_long = 2044; 61 | type_definitions_too_few_items = 2045; 62 | type_invalid_length = 2046; 63 | type_invalid_pattern = 2047; 64 | relations_too_few_items = 2048; 65 | relations_too_long = 2049; 66 | relations_invalid_pattern = 2050; 67 | object_invalid_pattern = 2051; 68 | query_string_type_continuation_token_mismatch = 2052; 69 | exceeded_entity_limit = 2053; 70 | invalid_contextual_tuple = 2054; 71 | duplicate_contextual_tuple = 2055; 72 | invalid_authorization_model = 2056; 73 | unsupported_schema_version = 2057; 74 | cancelled = 2058; 75 | invalid_start_time = 2059; 76 | } 77 | 78 | enum UnprocessableContentErrorCode { 79 | no_throttled_error_code = 0; 80 | 81 | // 3500 level errors are timeout due to throttling 82 | 83 | throttled_timeout_error = 3500; 84 | } 85 | 86 | enum InternalErrorCode { 87 | no_internal_error = 0; 88 | 89 | // 4000 level errors are returned due to internal error 90 | 91 | internal_error = 4000; 92 | deadline_exceeded = 4004; 93 | already_exists = 4005; 94 | resource_exhausted = 4006; 95 | failed_precondition = 4007; 96 | aborted = 4008; 97 | out_of_range = 4009; 98 | unavailable = 4010; 99 | data_loss = 4011; 100 | } 101 | 102 | enum NotFoundErrorCode { 103 | no_not_found_error = 0; 104 | 105 | undefined_endpoint = 5000; 106 | store_id_not_found = 5002; 107 | unimplemented = 5004; 108 | } 109 | 110 | message ValidationErrorMessageResponse { 111 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {example: "{\"code\":\"validation_error\", \"message\":\"Generic validation error\"}"}; 112 | ErrorCode code = 1; 113 | string message = 2; 114 | } 115 | 116 | message UnauthenticatedResponse { 117 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {example: "{\"code\":\"unauthenticated\", \"message\":\"unauthenticated\"}"}; 118 | ErrorCode code = 1; 119 | string message = 2; 120 | } 121 | 122 | message UnprocessableContentMessageResponse { 123 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {example: "{\"code\":\"throttled_timeout_error\", \"message\":\"timeout due to throttling on complex request\"}"}; 124 | UnprocessableContentErrorCode code = 1; 125 | string message = 2; 126 | } 127 | 128 | message InternalErrorMessageResponse { 129 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {example: "{\"code\":\"internal_error\", \"message\":\"Internal Server Error\"}"}; 130 | InternalErrorCode code = 1; 131 | string message = 2; 132 | } 133 | 134 | message PathUnknownErrorMessageResponse { 135 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {example: "{\"code\":\"undefined_endpoint\", \"message\":\"Endpoint not enabled\"}"}; 136 | NotFoundErrorCode code = 1; 137 | string message = 2; 138 | } 139 | 140 | message AbortedMessageResponse { 141 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {example: "{\"code\":\"10\", \"message\":\"transaction conflict\"}"}; 142 | string code = 1; 143 | string message = 2; 144 | } 145 | 146 | message ErrorMessageRequest {} 147 | 148 | message ForbiddenResponse { 149 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {example: "{\"code\":\"forbidden\", \"message\":\"the principal is not authorized to perform the action\"}"}; 150 | AuthErrorCode code = 1; 151 | string message = 2; 152 | } 153 | -------------------------------------------------------------------------------- /openfga/v1/openapi.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package openfga.v1; 4 | 5 | import "protoc-gen-openapiv2/options/annotations.proto"; 6 | 7 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { 8 | info: { 9 | title: "OpenFGA" 10 | description: "A high performance and flexible authorization/permission engine built for developers and inspired by Google Zanzibar." 11 | version: "1.x" 12 | contact: { 13 | name: "OpenFGA" 14 | email: "community@openfga.dev" 15 | url: "https://openfga.dev" 16 | } 17 | license: { 18 | name: "Apache-2.0" 19 | url: "https://github.com/openfga/openfga/blob/main/LICENSE" 20 | } 21 | } 22 | consumes: "application/json" 23 | produces: "application/json" 24 | schemes: HTTPS 25 | responses: { 26 | key: "400" 27 | value: { 28 | description: "Request failed due to invalid input." 29 | schema: { 30 | json_schema: {ref: ".openfga.v1.ValidationErrorMessageResponse"} 31 | } 32 | } 33 | } 34 | responses: { 35 | key: "401" 36 | value: { 37 | description: "Not authenticated." 38 | schema: { 39 | json_schema: {ref: ".openfga.v1.UnauthenticatedResponse"} 40 | } 41 | } 42 | } 43 | responses: { 44 | key: "403" 45 | value: { 46 | description: "Forbidden." 47 | schema: { 48 | json_schema: {ref: ".openfga.v1.ForbiddenResponse"} 49 | } 50 | } 51 | } 52 | responses: { 53 | key: "404" 54 | value: { 55 | description: "Request failed due to incorrect path." 56 | schema: { 57 | json_schema: {ref: ".openfga.v1.PathUnknownErrorMessageResponse"} 58 | } 59 | } 60 | } 61 | responses: { 62 | key: "409" 63 | value: { 64 | description: "Request was aborted due a transaction conflict." 65 | schema: { 66 | json_schema: {ref: ".openfga.v1.AbortedMessageResponse"} 67 | } 68 | } 69 | } 70 | responses: { 71 | key: "422" 72 | value: { 73 | description: "Request timed out due to excessive request throttling." 74 | schema: { 75 | json_schema: {ref: ".openfga.v1.UnprocessableContentMessageResponse"} 76 | } 77 | } 78 | } 79 | responses: { 80 | key: "500" 81 | value: { 82 | description: "Request failed due to internal server error." 83 | schema: { 84 | json_schema: {ref: ".openfga.v1.InternalErrorMessageResponse"} 85 | } 86 | } 87 | } 88 | }; 89 | -------------------------------------------------------------------------------- /openfga/v1/openfga.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package openfga.v1; 4 | 5 | import "google/api/field_behavior.proto"; 6 | import "google/protobuf/struct.proto"; 7 | import "google/protobuf/timestamp.proto"; 8 | import "protoc-gen-openapiv2/options/annotations.proto"; 9 | import "validate/validate.proto"; 10 | 11 | // Object represents an OpenFGA Object. 12 | // 13 | // An Object is composed of a type and identifier (e.g. 'document:1') 14 | // 15 | // See https://openfga.dev/docs/concepts#what-is-an-object 16 | message Object { 17 | string type = 1 [ 18 | (validate.rules).string = { 19 | pattern: "^[^:#@\\s]{1,254}$" 20 | ignore_empty: false 21 | }, 22 | (google.api.field_behavior) = REQUIRED, 23 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"document\""} 24 | ]; 25 | 26 | string id = 2 [ 27 | (validate.rules).string = { 28 | pattern: "[^#:\\s]+$" 29 | ignore_empty: false 30 | }, 31 | (google.api.field_behavior) = REQUIRED, 32 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"0bcdf6fa-a6aa-4730-a8eb-9cf172ff16d9\""} 33 | ]; 34 | } 35 | 36 | // User. 37 | // 38 | // Represents any possible value for a user (subject or principal). Can be a: 39 | // - Specific user object e.g.: 'user:will', 'folder:marketing', 'org:contoso', ...) 40 | // - Specific userset (e.g. 'group:engineering#member') 41 | // - Public-typed wildcard (e.g. 'user:*') 42 | // 43 | // See https://openfga.dev/docs/concepts#what-is-a-user 44 | message User { 45 | oneof user { 46 | Object object = 1; 47 | UsersetUser userset = 2; 48 | TypedWildcard wildcard = 3; 49 | } 50 | } 51 | 52 | // Userset. 53 | // 54 | // A set or group of users, represented in the `:#` format 55 | // 56 | // `group:fga#member` represents all members of group FGA, not to be confused by `group:fga` which represents the group itself as a specific object. 57 | // 58 | // See: https://openfga.dev/docs/modeling/building-blocks/usersets#what-is-a-userset 59 | message UsersetUser { 60 | string type = 1 [ 61 | (validate.rules).string = { 62 | pattern: "^[^:#@\\s]{1,254}$" 63 | ignore_empty: false 64 | }, 65 | (google.api.field_behavior) = REQUIRED, 66 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"group\""} 67 | ]; 68 | 69 | string id = 2 [ 70 | (validate.rules).string = { 71 | pattern: "[^#:\\s]+$" 72 | ignore_empty: false 73 | }, 74 | (google.api.field_behavior) = REQUIRED, 75 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"fga\""} 76 | ]; 77 | 78 | string relation = 3 [ 79 | (validate.rules).string = { 80 | pattern: "^[^:#@\\s]{1,50}$" 81 | ignore_empty: true 82 | }, 83 | (google.api.field_behavior) = REQUIRED, 84 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"member\""} 85 | ]; 86 | } 87 | 88 | message RelationshipCondition { 89 | // A reference (by name) of the relationship condition defined in the authorization model. 90 | string name = 1 [ 91 | (validate.rules).string = { 92 | pattern: "^[^\\s]{2,256}$" 93 | ignore_empty: false 94 | }, 95 | (google.api.field_behavior) = REQUIRED, 96 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { 97 | max_length: 256 98 | example: "\"condition1\"" 99 | } 100 | ]; 101 | 102 | // Additional context/data to persist along with the condition. 103 | // The keys must match the parameters defined by the condition, and the value types must 104 | // match the parameter type definitions. 105 | google.protobuf.Struct context = 2; 106 | } 107 | 108 | message TupleKeyWithoutCondition { 109 | string user = 1 [ 110 | (google.api.field_behavior) = REQUIRED, 111 | (validate.rules).string = {max_bytes: 512}, 112 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { 113 | max_length: 512 114 | example: "\"user:anne\"" 115 | } 116 | ]; 117 | 118 | string relation = 2 [ 119 | (google.api.field_behavior) = REQUIRED, 120 | (validate.rules).string = { 121 | pattern: "^[^:#@\\s]{1,50}$" 122 | ignore_empty: true 123 | }, 124 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { 125 | max_length: 50 126 | example: "\"reader\"" 127 | } 128 | ]; 129 | 130 | string object = 3 [ 131 | (google.api.field_behavior) = REQUIRED, 132 | (validate.rules).string = { 133 | pattern: "^[^\\s]{2,256}$" 134 | ignore_empty: true 135 | }, 136 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { 137 | max_length: 256 138 | example: "\"document:2021-budget\"" 139 | } 140 | ]; 141 | } 142 | 143 | // Type bound public access. 144 | // 145 | // Normally represented using the `:*` syntax 146 | // 147 | // `employee:*` represents every object of type `employee`, including those not currently present in the system 148 | // 149 | // See https://openfga.dev/docs/concepts#what-is-type-bound-public-access 150 | message TypedWildcard { 151 | string type = 1 [ 152 | (validate.rules).string = { 153 | pattern: "^[^:#@\\s]{1,254}$" 154 | ignore_empty: false 155 | }, 156 | (google.api.field_behavior) = REQUIRED, 157 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"employee\""} 158 | ]; 159 | } 160 | 161 | message TupleKey { 162 | string user = 1 [ 163 | (google.api.field_behavior) = REQUIRED, 164 | (validate.rules).string = { 165 | max_bytes: 512 166 | ignore_empty: false 167 | }, 168 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { 169 | max_length: 512 170 | example: "\"user:anne\"" 171 | } 172 | ]; 173 | 174 | string relation = 2 [ 175 | (google.api.field_behavior) = REQUIRED, 176 | (validate.rules).string = { 177 | pattern: "^[^:#@\\s]{1,50}$" 178 | ignore_empty: true 179 | }, 180 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { 181 | max_length: 50 182 | example: "\"reader\"" 183 | } 184 | ]; 185 | 186 | string object = 3 [ 187 | (google.api.field_behavior) = REQUIRED, 188 | (validate.rules).string = { 189 | pattern: "^[^\\s]{2,256}$" 190 | ignore_empty: true 191 | }, 192 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { 193 | max_length: 256 194 | example: "\"document:2021-budget\"" 195 | } 196 | ]; 197 | 198 | RelationshipCondition condition = 4; 199 | } 200 | 201 | message Tuple { 202 | TupleKey key = 1 [ 203 | (google.api.field_behavior) = REQUIRED, 204 | (validate.rules).message.required = true 205 | ]; 206 | google.protobuf.Timestamp timestamp = 2 [(google.api.field_behavior) = REQUIRED]; 207 | } 208 | 209 | message TupleKeys { 210 | repeated TupleKey tuple_keys = 1 [ 211 | json_name = "tuple_keys", 212 | (google.api.field_behavior) = REQUIRED, 213 | (validate.rules).repeated.min_items = 1, 214 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {min_items: 1} 215 | ]; 216 | } 217 | 218 | message ContextualTupleKeys { 219 | repeated TupleKey tuple_keys = 1 [ 220 | json_name = "tuple_keys", 221 | (google.api.field_behavior) = REQUIRED, 222 | (validate.rules).repeated.max_items = 100, 223 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {max_items: 100} 224 | ]; 225 | } 226 | 227 | // A UsersetTree contains the result of an Expansion. 228 | message UsersetTree { 229 | // A leaf node contains either 230 | // - a set of users (which may be individual users, or usersets 231 | // referencing other relations) 232 | // - a computed node, which is the result of a computed userset 233 | // value in the authorization model 234 | // - a tupleToUserset nodes, containing the result of expanding 235 | // a tupleToUserset value in a authorization model. 236 | message Leaf { 237 | oneof value { 238 | Users users = 1; 239 | Computed computed = 2; 240 | TupleToUserset tuple_to_userset = 3; 241 | } 242 | } 243 | 244 | message Nodes { 245 | repeated Node nodes = 1 [(google.api.field_behavior) = REQUIRED]; 246 | } 247 | 248 | message Users { 249 | repeated string users = 1 [(google.api.field_behavior) = REQUIRED]; 250 | } 251 | 252 | message Computed { 253 | string userset = 1 [ 254 | (google.api.field_behavior) = REQUIRED, 255 | (validate.rules).string = {ignore_empty: false} 256 | ]; 257 | } 258 | 259 | message TupleToUserset { 260 | string tupleset = 1 [ 261 | (google.api.field_behavior) = REQUIRED, 262 | (validate.rules).string = {ignore_empty: false} 263 | ]; 264 | repeated Computed computed = 2 [(google.api.field_behavior) = REQUIRED]; 265 | } 266 | 267 | message Difference { 268 | Node base = 1 [ 269 | (google.api.field_behavior) = REQUIRED, 270 | (validate.rules).message.required = true 271 | ]; 272 | Node subtract = 2 [ 273 | (google.api.field_behavior) = REQUIRED, 274 | (validate.rules).message.required = true 275 | ]; 276 | } 277 | 278 | message Node { 279 | string name = 1 [(google.api.field_behavior) = REQUIRED]; 280 | oneof value { 281 | Leaf leaf = 2; 282 | Difference difference = 5; 283 | Nodes union = 6; 284 | Nodes intersection = 7; 285 | } 286 | } 287 | 288 | Node root = 1; 289 | } 290 | 291 | // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX 292 | enum TupleOperation { 293 | TUPLE_OPERATION_WRITE = 0; 294 | TUPLE_OPERATION_DELETE = 1; 295 | } 296 | 297 | message TupleChange { 298 | TupleKey tuple_key = 1 [ 299 | json_name = "tuple_key", 300 | (google.api.field_behavior) = REQUIRED, 301 | (validate.rules).message.required = true 302 | ]; 303 | TupleOperation operation = 2 [ 304 | (validate.rules).enum.defined_only = true, 305 | (google.api.field_behavior) = REQUIRED 306 | ]; 307 | google.protobuf.Timestamp timestamp = 3 [(google.api.field_behavior) = REQUIRED]; 308 | } 309 | 310 | message Store { 311 | string id = 1 [ 312 | (google.api.field_behavior) = REQUIRED, 313 | (validate.rules).string = {ignore_empty: false} 314 | ]; 315 | string name = 2 [ 316 | (google.api.field_behavior) = REQUIRED, 317 | (validate.rules).string = {ignore_empty: false} 318 | ]; 319 | google.protobuf.Timestamp created_at = 3 [ 320 | json_name = "created_at", 321 | (google.api.field_behavior) = REQUIRED 322 | ]; 323 | google.protobuf.Timestamp updated_at = 4 [ 324 | json_name = "updated_at", 325 | (google.api.field_behavior) = REQUIRED 326 | ]; 327 | google.protobuf.Timestamp deleted_at = 5 [json_name = "deleted_at"]; 328 | } 329 | 330 | message UserTypeFilter { 331 | string type = 1 [ 332 | (validate.rules).string = { 333 | pattern: "^[^:#@\\s]{1,254}$" 334 | ignore_empty: false 335 | }, 336 | (google.api.field_behavior) = REQUIRED, 337 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"group\""} 338 | ]; 339 | 340 | string relation = 2 [ 341 | (validate.rules).string = { 342 | pattern: "^[^:#@\\s]{1,50}$" 343 | ignore_empty: true 344 | }, 345 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"member\""} 346 | ]; 347 | } 348 | -------------------------------------------------------------------------------- /openfga/v1/openfga_service_consistency.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package openfga.v1; 4 | 5 | // Controls the consistency preferences when calling the query APIs. 6 | enum ConsistencyPreference { 7 | // Default if not set. Behavior will be the same as MINIMIZE_LATENCY. 8 | UNSPECIFIED = 0; 9 | // Minimize latency at the potential expense of lower consistency. 10 | MINIMIZE_LATENCY = 100; 11 | // Prefer higher consistency, at the potential expense of increased latency. 12 | HIGHER_CONSISTENCY = 200; 13 | } 14 | -------------------------------------------------------------------------------- /proto/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/openfga/api/proto 2 | 3 | go 1.22.3 4 | 5 | require ( 6 | github.com/envoyproxy/protoc-gen-validate v1.0.4 7 | github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 8 | google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 9 | google.golang.org/grpc v1.64.1 10 | google.golang.org/protobuf v1.34.1 11 | ) 12 | 13 | require ( 14 | golang.org/x/net v0.26.0 // indirect 15 | golang.org/x/sys v0.21.0 // indirect 16 | golang.org/x/text v0.16.0 // indirect 17 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect 18 | ) 19 | -------------------------------------------------------------------------------- /proto/go.sum: -------------------------------------------------------------------------------- 1 | github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= 2 | github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= 3 | github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= 4 | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 5 | github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= 6 | github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= 7 | golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= 8 | golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= 9 | golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= 10 | golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 11 | golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= 12 | golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= 13 | google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= 14 | google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= 15 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= 16 | google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= 17 | google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= 18 | google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= 19 | google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= 20 | google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 21 | -------------------------------------------------------------------------------- /proto/openfga/v1/errors_ignore.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. DO NOT EDIT. 2 | // versions: 3 | // protoc-gen-go v1.34.0 4 | // protoc (unknown) 5 | // source: openfga/v1/errors_ignore.proto 6 | 7 | package openfgav1 8 | 9 | import ( 10 | _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" 11 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 12 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 13 | reflect "reflect" 14 | sync "sync" 15 | ) 16 | 17 | const ( 18 | // Verify that this generated code is sufficiently up-to-date. 19 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 20 | // Verify that runtime/protoimpl is sufficiently up-to-date. 21 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 22 | ) 23 | 24 | type AuthErrorCode int32 25 | 26 | const ( 27 | AuthErrorCode_no_auth_error AuthErrorCode = 0 28 | AuthErrorCode_auth_failed_invalid_subject AuthErrorCode = 1001 29 | AuthErrorCode_auth_failed_invalid_audience AuthErrorCode = 1002 30 | AuthErrorCode_auth_failed_invalid_issuer AuthErrorCode = 1003 31 | AuthErrorCode_invalid_claims AuthErrorCode = 1004 32 | AuthErrorCode_auth_failed_invalid_bearer_token AuthErrorCode = 1005 33 | AuthErrorCode_bearer_token_missing AuthErrorCode = 1010 34 | AuthErrorCode_unauthenticated AuthErrorCode = 1500 35 | AuthErrorCode_forbidden AuthErrorCode = 1600 36 | ) 37 | 38 | // Enum value maps for AuthErrorCode. 39 | var ( 40 | AuthErrorCode_name = map[int32]string{ 41 | 0: "no_auth_error", 42 | 1001: "auth_failed_invalid_subject", 43 | 1002: "auth_failed_invalid_audience", 44 | 1003: "auth_failed_invalid_issuer", 45 | 1004: "invalid_claims", 46 | 1005: "auth_failed_invalid_bearer_token", 47 | 1010: "bearer_token_missing", 48 | 1500: "unauthenticated", 49 | 1600: "forbidden", 50 | } 51 | AuthErrorCode_value = map[string]int32{ 52 | "no_auth_error": 0, 53 | "auth_failed_invalid_subject": 1001, 54 | "auth_failed_invalid_audience": 1002, 55 | "auth_failed_invalid_issuer": 1003, 56 | "invalid_claims": 1004, 57 | "auth_failed_invalid_bearer_token": 1005, 58 | "bearer_token_missing": 1010, 59 | "unauthenticated": 1500, 60 | "forbidden": 1600, 61 | } 62 | ) 63 | 64 | func (x AuthErrorCode) Enum() *AuthErrorCode { 65 | p := new(AuthErrorCode) 66 | *p = x 67 | return p 68 | } 69 | 70 | func (x AuthErrorCode) String() string { 71 | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 72 | } 73 | 74 | func (AuthErrorCode) Descriptor() protoreflect.EnumDescriptor { 75 | return file_openfga_v1_errors_ignore_proto_enumTypes[0].Descriptor() 76 | } 77 | 78 | func (AuthErrorCode) Type() protoreflect.EnumType { 79 | return &file_openfga_v1_errors_ignore_proto_enumTypes[0] 80 | } 81 | 82 | func (x AuthErrorCode) Number() protoreflect.EnumNumber { 83 | return protoreflect.EnumNumber(x) 84 | } 85 | 86 | // Deprecated: Use AuthErrorCode.Descriptor instead. 87 | func (AuthErrorCode) EnumDescriptor() ([]byte, []int) { 88 | return file_openfga_v1_errors_ignore_proto_rawDescGZIP(), []int{0} 89 | } 90 | 91 | type ErrorCode int32 92 | 93 | const ( 94 | ErrorCode_no_error ErrorCode = 0 95 | ErrorCode_validation_error ErrorCode = 2000 96 | ErrorCode_authorization_model_not_found ErrorCode = 2001 97 | ErrorCode_authorization_model_resolution_too_complex ErrorCode = 2002 98 | ErrorCode_invalid_write_input ErrorCode = 2003 99 | ErrorCode_cannot_allow_duplicate_tuples_in_one_request ErrorCode = 2004 100 | ErrorCode_cannot_allow_duplicate_types_in_one_request ErrorCode = 2005 101 | ErrorCode_cannot_allow_multiple_references_to_one_relation ErrorCode = 2006 102 | ErrorCode_invalid_continuation_token ErrorCode = 2007 103 | ErrorCode_invalid_tuple_set ErrorCode = 2008 104 | ErrorCode_invalid_check_input ErrorCode = 2009 105 | ErrorCode_invalid_expand_input ErrorCode = 2010 106 | ErrorCode_unsupported_user_set ErrorCode = 2011 107 | ErrorCode_invalid_object_format ErrorCode = 2012 108 | ErrorCode_write_failed_due_to_invalid_input ErrorCode = 2017 109 | ErrorCode_authorization_model_assertions_not_found ErrorCode = 2018 110 | ErrorCode_latest_authorization_model_not_found ErrorCode = 2020 111 | ErrorCode_type_not_found ErrorCode = 2021 112 | ErrorCode_relation_not_found ErrorCode = 2022 113 | ErrorCode_empty_relation_definition ErrorCode = 2023 114 | ErrorCode_invalid_user ErrorCode = 2025 115 | ErrorCode_invalid_tuple ErrorCode = 2027 116 | ErrorCode_unknown_relation ErrorCode = 2028 117 | ErrorCode_store_id_invalid_length ErrorCode = 2030 118 | ErrorCode_assertions_too_many_items ErrorCode = 2033 119 | ErrorCode_id_too_long ErrorCode = 2034 120 | ErrorCode_authorization_model_id_too_long ErrorCode = 2036 121 | ErrorCode_tuple_key_value_not_specified ErrorCode = 2037 122 | ErrorCode_tuple_keys_too_many_or_too_few_items ErrorCode = 2038 123 | ErrorCode_page_size_invalid ErrorCode = 2039 124 | ErrorCode_param_missing_value ErrorCode = 2040 125 | ErrorCode_difference_base_missing_value ErrorCode = 2041 126 | ErrorCode_subtract_base_missing_value ErrorCode = 2042 127 | ErrorCode_object_too_long ErrorCode = 2043 128 | ErrorCode_relation_too_long ErrorCode = 2044 129 | ErrorCode_type_definitions_too_few_items ErrorCode = 2045 130 | ErrorCode_type_invalid_length ErrorCode = 2046 131 | ErrorCode_type_invalid_pattern ErrorCode = 2047 132 | ErrorCode_relations_too_few_items ErrorCode = 2048 133 | ErrorCode_relations_too_long ErrorCode = 2049 134 | ErrorCode_relations_invalid_pattern ErrorCode = 2050 135 | ErrorCode_object_invalid_pattern ErrorCode = 2051 136 | ErrorCode_query_string_type_continuation_token_mismatch ErrorCode = 2052 137 | ErrorCode_exceeded_entity_limit ErrorCode = 2053 138 | ErrorCode_invalid_contextual_tuple ErrorCode = 2054 139 | ErrorCode_duplicate_contextual_tuple ErrorCode = 2055 140 | ErrorCode_invalid_authorization_model ErrorCode = 2056 141 | ErrorCode_unsupported_schema_version ErrorCode = 2057 142 | ErrorCode_cancelled ErrorCode = 2058 143 | ErrorCode_invalid_start_time ErrorCode = 2059 144 | ) 145 | 146 | // Enum value maps for ErrorCode. 147 | var ( 148 | ErrorCode_name = map[int32]string{ 149 | 0: "no_error", 150 | 2000: "validation_error", 151 | 2001: "authorization_model_not_found", 152 | 2002: "authorization_model_resolution_too_complex", 153 | 2003: "invalid_write_input", 154 | 2004: "cannot_allow_duplicate_tuples_in_one_request", 155 | 2005: "cannot_allow_duplicate_types_in_one_request", 156 | 2006: "cannot_allow_multiple_references_to_one_relation", 157 | 2007: "invalid_continuation_token", 158 | 2008: "invalid_tuple_set", 159 | 2009: "invalid_check_input", 160 | 2010: "invalid_expand_input", 161 | 2011: "unsupported_user_set", 162 | 2012: "invalid_object_format", 163 | 2017: "write_failed_due_to_invalid_input", 164 | 2018: "authorization_model_assertions_not_found", 165 | 2020: "latest_authorization_model_not_found", 166 | 2021: "type_not_found", 167 | 2022: "relation_not_found", 168 | 2023: "empty_relation_definition", 169 | 2025: "invalid_user", 170 | 2027: "invalid_tuple", 171 | 2028: "unknown_relation", 172 | 2030: "store_id_invalid_length", 173 | 2033: "assertions_too_many_items", 174 | 2034: "id_too_long", 175 | 2036: "authorization_model_id_too_long", 176 | 2037: "tuple_key_value_not_specified", 177 | 2038: "tuple_keys_too_many_or_too_few_items", 178 | 2039: "page_size_invalid", 179 | 2040: "param_missing_value", 180 | 2041: "difference_base_missing_value", 181 | 2042: "subtract_base_missing_value", 182 | 2043: "object_too_long", 183 | 2044: "relation_too_long", 184 | 2045: "type_definitions_too_few_items", 185 | 2046: "type_invalid_length", 186 | 2047: "type_invalid_pattern", 187 | 2048: "relations_too_few_items", 188 | 2049: "relations_too_long", 189 | 2050: "relations_invalid_pattern", 190 | 2051: "object_invalid_pattern", 191 | 2052: "query_string_type_continuation_token_mismatch", 192 | 2053: "exceeded_entity_limit", 193 | 2054: "invalid_contextual_tuple", 194 | 2055: "duplicate_contextual_tuple", 195 | 2056: "invalid_authorization_model", 196 | 2057: "unsupported_schema_version", 197 | 2058: "cancelled", 198 | 2059: "invalid_start_time", 199 | } 200 | ErrorCode_value = map[string]int32{ 201 | "no_error": 0, 202 | "validation_error": 2000, 203 | "authorization_model_not_found": 2001, 204 | "authorization_model_resolution_too_complex": 2002, 205 | "invalid_write_input": 2003, 206 | "cannot_allow_duplicate_tuples_in_one_request": 2004, 207 | "cannot_allow_duplicate_types_in_one_request": 2005, 208 | "cannot_allow_multiple_references_to_one_relation": 2006, 209 | "invalid_continuation_token": 2007, 210 | "invalid_tuple_set": 2008, 211 | "invalid_check_input": 2009, 212 | "invalid_expand_input": 2010, 213 | "unsupported_user_set": 2011, 214 | "invalid_object_format": 2012, 215 | "write_failed_due_to_invalid_input": 2017, 216 | "authorization_model_assertions_not_found": 2018, 217 | "latest_authorization_model_not_found": 2020, 218 | "type_not_found": 2021, 219 | "relation_not_found": 2022, 220 | "empty_relation_definition": 2023, 221 | "invalid_user": 2025, 222 | "invalid_tuple": 2027, 223 | "unknown_relation": 2028, 224 | "store_id_invalid_length": 2030, 225 | "assertions_too_many_items": 2033, 226 | "id_too_long": 2034, 227 | "authorization_model_id_too_long": 2036, 228 | "tuple_key_value_not_specified": 2037, 229 | "tuple_keys_too_many_or_too_few_items": 2038, 230 | "page_size_invalid": 2039, 231 | "param_missing_value": 2040, 232 | "difference_base_missing_value": 2041, 233 | "subtract_base_missing_value": 2042, 234 | "object_too_long": 2043, 235 | "relation_too_long": 2044, 236 | "type_definitions_too_few_items": 2045, 237 | "type_invalid_length": 2046, 238 | "type_invalid_pattern": 2047, 239 | "relations_too_few_items": 2048, 240 | "relations_too_long": 2049, 241 | "relations_invalid_pattern": 2050, 242 | "object_invalid_pattern": 2051, 243 | "query_string_type_continuation_token_mismatch": 2052, 244 | "exceeded_entity_limit": 2053, 245 | "invalid_contextual_tuple": 2054, 246 | "duplicate_contextual_tuple": 2055, 247 | "invalid_authorization_model": 2056, 248 | "unsupported_schema_version": 2057, 249 | "cancelled": 2058, 250 | "invalid_start_time": 2059, 251 | } 252 | ) 253 | 254 | func (x ErrorCode) Enum() *ErrorCode { 255 | p := new(ErrorCode) 256 | *p = x 257 | return p 258 | } 259 | 260 | func (x ErrorCode) String() string { 261 | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 262 | } 263 | 264 | func (ErrorCode) Descriptor() protoreflect.EnumDescriptor { 265 | return file_openfga_v1_errors_ignore_proto_enumTypes[1].Descriptor() 266 | } 267 | 268 | func (ErrorCode) Type() protoreflect.EnumType { 269 | return &file_openfga_v1_errors_ignore_proto_enumTypes[1] 270 | } 271 | 272 | func (x ErrorCode) Number() protoreflect.EnumNumber { 273 | return protoreflect.EnumNumber(x) 274 | } 275 | 276 | // Deprecated: Use ErrorCode.Descriptor instead. 277 | func (ErrorCode) EnumDescriptor() ([]byte, []int) { 278 | return file_openfga_v1_errors_ignore_proto_rawDescGZIP(), []int{1} 279 | } 280 | 281 | type UnprocessableContentErrorCode int32 282 | 283 | const ( 284 | UnprocessableContentErrorCode_no_throttled_error_code UnprocessableContentErrorCode = 0 285 | UnprocessableContentErrorCode_throttled_timeout_error UnprocessableContentErrorCode = 3500 286 | ) 287 | 288 | // Enum value maps for UnprocessableContentErrorCode. 289 | var ( 290 | UnprocessableContentErrorCode_name = map[int32]string{ 291 | 0: "no_throttled_error_code", 292 | 3500: "throttled_timeout_error", 293 | } 294 | UnprocessableContentErrorCode_value = map[string]int32{ 295 | "no_throttled_error_code": 0, 296 | "throttled_timeout_error": 3500, 297 | } 298 | ) 299 | 300 | func (x UnprocessableContentErrorCode) Enum() *UnprocessableContentErrorCode { 301 | p := new(UnprocessableContentErrorCode) 302 | *p = x 303 | return p 304 | } 305 | 306 | func (x UnprocessableContentErrorCode) String() string { 307 | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 308 | } 309 | 310 | func (UnprocessableContentErrorCode) Descriptor() protoreflect.EnumDescriptor { 311 | return file_openfga_v1_errors_ignore_proto_enumTypes[2].Descriptor() 312 | } 313 | 314 | func (UnprocessableContentErrorCode) Type() protoreflect.EnumType { 315 | return &file_openfga_v1_errors_ignore_proto_enumTypes[2] 316 | } 317 | 318 | func (x UnprocessableContentErrorCode) Number() protoreflect.EnumNumber { 319 | return protoreflect.EnumNumber(x) 320 | } 321 | 322 | // Deprecated: Use UnprocessableContentErrorCode.Descriptor instead. 323 | func (UnprocessableContentErrorCode) EnumDescriptor() ([]byte, []int) { 324 | return file_openfga_v1_errors_ignore_proto_rawDescGZIP(), []int{2} 325 | } 326 | 327 | type InternalErrorCode int32 328 | 329 | const ( 330 | InternalErrorCode_no_internal_error InternalErrorCode = 0 331 | InternalErrorCode_internal_error InternalErrorCode = 4000 332 | InternalErrorCode_deadline_exceeded InternalErrorCode = 4004 333 | InternalErrorCode_already_exists InternalErrorCode = 4005 334 | InternalErrorCode_resource_exhausted InternalErrorCode = 4006 335 | InternalErrorCode_failed_precondition InternalErrorCode = 4007 336 | InternalErrorCode_aborted InternalErrorCode = 4008 337 | InternalErrorCode_out_of_range InternalErrorCode = 4009 338 | InternalErrorCode_unavailable InternalErrorCode = 4010 339 | InternalErrorCode_data_loss InternalErrorCode = 4011 340 | ) 341 | 342 | // Enum value maps for InternalErrorCode. 343 | var ( 344 | InternalErrorCode_name = map[int32]string{ 345 | 0: "no_internal_error", 346 | 4000: "internal_error", 347 | 4004: "deadline_exceeded", 348 | 4005: "already_exists", 349 | 4006: "resource_exhausted", 350 | 4007: "failed_precondition", 351 | 4008: "aborted", 352 | 4009: "out_of_range", 353 | 4010: "unavailable", 354 | 4011: "data_loss", 355 | } 356 | InternalErrorCode_value = map[string]int32{ 357 | "no_internal_error": 0, 358 | "internal_error": 4000, 359 | "deadline_exceeded": 4004, 360 | "already_exists": 4005, 361 | "resource_exhausted": 4006, 362 | "failed_precondition": 4007, 363 | "aborted": 4008, 364 | "out_of_range": 4009, 365 | "unavailable": 4010, 366 | "data_loss": 4011, 367 | } 368 | ) 369 | 370 | func (x InternalErrorCode) Enum() *InternalErrorCode { 371 | p := new(InternalErrorCode) 372 | *p = x 373 | return p 374 | } 375 | 376 | func (x InternalErrorCode) String() string { 377 | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 378 | } 379 | 380 | func (InternalErrorCode) Descriptor() protoreflect.EnumDescriptor { 381 | return file_openfga_v1_errors_ignore_proto_enumTypes[3].Descriptor() 382 | } 383 | 384 | func (InternalErrorCode) Type() protoreflect.EnumType { 385 | return &file_openfga_v1_errors_ignore_proto_enumTypes[3] 386 | } 387 | 388 | func (x InternalErrorCode) Number() protoreflect.EnumNumber { 389 | return protoreflect.EnumNumber(x) 390 | } 391 | 392 | // Deprecated: Use InternalErrorCode.Descriptor instead. 393 | func (InternalErrorCode) EnumDescriptor() ([]byte, []int) { 394 | return file_openfga_v1_errors_ignore_proto_rawDescGZIP(), []int{3} 395 | } 396 | 397 | type NotFoundErrorCode int32 398 | 399 | const ( 400 | NotFoundErrorCode_no_not_found_error NotFoundErrorCode = 0 401 | NotFoundErrorCode_undefined_endpoint NotFoundErrorCode = 5000 402 | NotFoundErrorCode_store_id_not_found NotFoundErrorCode = 5002 403 | NotFoundErrorCode_unimplemented NotFoundErrorCode = 5004 404 | ) 405 | 406 | // Enum value maps for NotFoundErrorCode. 407 | var ( 408 | NotFoundErrorCode_name = map[int32]string{ 409 | 0: "no_not_found_error", 410 | 5000: "undefined_endpoint", 411 | 5002: "store_id_not_found", 412 | 5004: "unimplemented", 413 | } 414 | NotFoundErrorCode_value = map[string]int32{ 415 | "no_not_found_error": 0, 416 | "undefined_endpoint": 5000, 417 | "store_id_not_found": 5002, 418 | "unimplemented": 5004, 419 | } 420 | ) 421 | 422 | func (x NotFoundErrorCode) Enum() *NotFoundErrorCode { 423 | p := new(NotFoundErrorCode) 424 | *p = x 425 | return p 426 | } 427 | 428 | func (x NotFoundErrorCode) String() string { 429 | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 430 | } 431 | 432 | func (NotFoundErrorCode) Descriptor() protoreflect.EnumDescriptor { 433 | return file_openfga_v1_errors_ignore_proto_enumTypes[4].Descriptor() 434 | } 435 | 436 | func (NotFoundErrorCode) Type() protoreflect.EnumType { 437 | return &file_openfga_v1_errors_ignore_proto_enumTypes[4] 438 | } 439 | 440 | func (x NotFoundErrorCode) Number() protoreflect.EnumNumber { 441 | return protoreflect.EnumNumber(x) 442 | } 443 | 444 | // Deprecated: Use NotFoundErrorCode.Descriptor instead. 445 | func (NotFoundErrorCode) EnumDescriptor() ([]byte, []int) { 446 | return file_openfga_v1_errors_ignore_proto_rawDescGZIP(), []int{4} 447 | } 448 | 449 | type ValidationErrorMessageResponse struct { 450 | state protoimpl.MessageState 451 | sizeCache protoimpl.SizeCache 452 | unknownFields protoimpl.UnknownFields 453 | 454 | Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=openfga.v1.ErrorCode" json:"code,omitempty"` 455 | Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` 456 | } 457 | 458 | func (x *ValidationErrorMessageResponse) Reset() { 459 | *x = ValidationErrorMessageResponse{} 460 | if protoimpl.UnsafeEnabled { 461 | mi := &file_openfga_v1_errors_ignore_proto_msgTypes[0] 462 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 463 | ms.StoreMessageInfo(mi) 464 | } 465 | } 466 | 467 | func (x *ValidationErrorMessageResponse) String() string { 468 | return protoimpl.X.MessageStringOf(x) 469 | } 470 | 471 | func (*ValidationErrorMessageResponse) ProtoMessage() {} 472 | 473 | func (x *ValidationErrorMessageResponse) ProtoReflect() protoreflect.Message { 474 | mi := &file_openfga_v1_errors_ignore_proto_msgTypes[0] 475 | if protoimpl.UnsafeEnabled && x != nil { 476 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 477 | if ms.LoadMessageInfo() == nil { 478 | ms.StoreMessageInfo(mi) 479 | } 480 | return ms 481 | } 482 | return mi.MessageOf(x) 483 | } 484 | 485 | // Deprecated: Use ValidationErrorMessageResponse.ProtoReflect.Descriptor instead. 486 | func (*ValidationErrorMessageResponse) Descriptor() ([]byte, []int) { 487 | return file_openfga_v1_errors_ignore_proto_rawDescGZIP(), []int{0} 488 | } 489 | 490 | func (x *ValidationErrorMessageResponse) GetCode() ErrorCode { 491 | if x != nil { 492 | return x.Code 493 | } 494 | return ErrorCode_no_error 495 | } 496 | 497 | func (x *ValidationErrorMessageResponse) GetMessage() string { 498 | if x != nil { 499 | return x.Message 500 | } 501 | return "" 502 | } 503 | 504 | type UnauthenticatedResponse struct { 505 | state protoimpl.MessageState 506 | sizeCache protoimpl.SizeCache 507 | unknownFields protoimpl.UnknownFields 508 | 509 | Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=openfga.v1.ErrorCode" json:"code,omitempty"` 510 | Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` 511 | } 512 | 513 | func (x *UnauthenticatedResponse) Reset() { 514 | *x = UnauthenticatedResponse{} 515 | if protoimpl.UnsafeEnabled { 516 | mi := &file_openfga_v1_errors_ignore_proto_msgTypes[1] 517 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 518 | ms.StoreMessageInfo(mi) 519 | } 520 | } 521 | 522 | func (x *UnauthenticatedResponse) String() string { 523 | return protoimpl.X.MessageStringOf(x) 524 | } 525 | 526 | func (*UnauthenticatedResponse) ProtoMessage() {} 527 | 528 | func (x *UnauthenticatedResponse) ProtoReflect() protoreflect.Message { 529 | mi := &file_openfga_v1_errors_ignore_proto_msgTypes[1] 530 | if protoimpl.UnsafeEnabled && x != nil { 531 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 532 | if ms.LoadMessageInfo() == nil { 533 | ms.StoreMessageInfo(mi) 534 | } 535 | return ms 536 | } 537 | return mi.MessageOf(x) 538 | } 539 | 540 | // Deprecated: Use UnauthenticatedResponse.ProtoReflect.Descriptor instead. 541 | func (*UnauthenticatedResponse) Descriptor() ([]byte, []int) { 542 | return file_openfga_v1_errors_ignore_proto_rawDescGZIP(), []int{1} 543 | } 544 | 545 | func (x *UnauthenticatedResponse) GetCode() ErrorCode { 546 | if x != nil { 547 | return x.Code 548 | } 549 | return ErrorCode_no_error 550 | } 551 | 552 | func (x *UnauthenticatedResponse) GetMessage() string { 553 | if x != nil { 554 | return x.Message 555 | } 556 | return "" 557 | } 558 | 559 | type UnprocessableContentMessageResponse struct { 560 | state protoimpl.MessageState 561 | sizeCache protoimpl.SizeCache 562 | unknownFields protoimpl.UnknownFields 563 | 564 | Code UnprocessableContentErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=openfga.v1.UnprocessableContentErrorCode" json:"code,omitempty"` 565 | Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` 566 | } 567 | 568 | func (x *UnprocessableContentMessageResponse) Reset() { 569 | *x = UnprocessableContentMessageResponse{} 570 | if protoimpl.UnsafeEnabled { 571 | mi := &file_openfga_v1_errors_ignore_proto_msgTypes[2] 572 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 573 | ms.StoreMessageInfo(mi) 574 | } 575 | } 576 | 577 | func (x *UnprocessableContentMessageResponse) String() string { 578 | return protoimpl.X.MessageStringOf(x) 579 | } 580 | 581 | func (*UnprocessableContentMessageResponse) ProtoMessage() {} 582 | 583 | func (x *UnprocessableContentMessageResponse) ProtoReflect() protoreflect.Message { 584 | mi := &file_openfga_v1_errors_ignore_proto_msgTypes[2] 585 | if protoimpl.UnsafeEnabled && x != nil { 586 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 587 | if ms.LoadMessageInfo() == nil { 588 | ms.StoreMessageInfo(mi) 589 | } 590 | return ms 591 | } 592 | return mi.MessageOf(x) 593 | } 594 | 595 | // Deprecated: Use UnprocessableContentMessageResponse.ProtoReflect.Descriptor instead. 596 | func (*UnprocessableContentMessageResponse) Descriptor() ([]byte, []int) { 597 | return file_openfga_v1_errors_ignore_proto_rawDescGZIP(), []int{2} 598 | } 599 | 600 | func (x *UnprocessableContentMessageResponse) GetCode() UnprocessableContentErrorCode { 601 | if x != nil { 602 | return x.Code 603 | } 604 | return UnprocessableContentErrorCode_no_throttled_error_code 605 | } 606 | 607 | func (x *UnprocessableContentMessageResponse) GetMessage() string { 608 | if x != nil { 609 | return x.Message 610 | } 611 | return "" 612 | } 613 | 614 | type InternalErrorMessageResponse struct { 615 | state protoimpl.MessageState 616 | sizeCache protoimpl.SizeCache 617 | unknownFields protoimpl.UnknownFields 618 | 619 | Code InternalErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=openfga.v1.InternalErrorCode" json:"code,omitempty"` 620 | Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` 621 | } 622 | 623 | func (x *InternalErrorMessageResponse) Reset() { 624 | *x = InternalErrorMessageResponse{} 625 | if protoimpl.UnsafeEnabled { 626 | mi := &file_openfga_v1_errors_ignore_proto_msgTypes[3] 627 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 628 | ms.StoreMessageInfo(mi) 629 | } 630 | } 631 | 632 | func (x *InternalErrorMessageResponse) String() string { 633 | return protoimpl.X.MessageStringOf(x) 634 | } 635 | 636 | func (*InternalErrorMessageResponse) ProtoMessage() {} 637 | 638 | func (x *InternalErrorMessageResponse) ProtoReflect() protoreflect.Message { 639 | mi := &file_openfga_v1_errors_ignore_proto_msgTypes[3] 640 | if protoimpl.UnsafeEnabled && x != nil { 641 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 642 | if ms.LoadMessageInfo() == nil { 643 | ms.StoreMessageInfo(mi) 644 | } 645 | return ms 646 | } 647 | return mi.MessageOf(x) 648 | } 649 | 650 | // Deprecated: Use InternalErrorMessageResponse.ProtoReflect.Descriptor instead. 651 | func (*InternalErrorMessageResponse) Descriptor() ([]byte, []int) { 652 | return file_openfga_v1_errors_ignore_proto_rawDescGZIP(), []int{3} 653 | } 654 | 655 | func (x *InternalErrorMessageResponse) GetCode() InternalErrorCode { 656 | if x != nil { 657 | return x.Code 658 | } 659 | return InternalErrorCode_no_internal_error 660 | } 661 | 662 | func (x *InternalErrorMessageResponse) GetMessage() string { 663 | if x != nil { 664 | return x.Message 665 | } 666 | return "" 667 | } 668 | 669 | type PathUnknownErrorMessageResponse struct { 670 | state protoimpl.MessageState 671 | sizeCache protoimpl.SizeCache 672 | unknownFields protoimpl.UnknownFields 673 | 674 | Code NotFoundErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=openfga.v1.NotFoundErrorCode" json:"code,omitempty"` 675 | Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` 676 | } 677 | 678 | func (x *PathUnknownErrorMessageResponse) Reset() { 679 | *x = PathUnknownErrorMessageResponse{} 680 | if protoimpl.UnsafeEnabled { 681 | mi := &file_openfga_v1_errors_ignore_proto_msgTypes[4] 682 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 683 | ms.StoreMessageInfo(mi) 684 | } 685 | } 686 | 687 | func (x *PathUnknownErrorMessageResponse) String() string { 688 | return protoimpl.X.MessageStringOf(x) 689 | } 690 | 691 | func (*PathUnknownErrorMessageResponse) ProtoMessage() {} 692 | 693 | func (x *PathUnknownErrorMessageResponse) ProtoReflect() protoreflect.Message { 694 | mi := &file_openfga_v1_errors_ignore_proto_msgTypes[4] 695 | if protoimpl.UnsafeEnabled && x != nil { 696 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 697 | if ms.LoadMessageInfo() == nil { 698 | ms.StoreMessageInfo(mi) 699 | } 700 | return ms 701 | } 702 | return mi.MessageOf(x) 703 | } 704 | 705 | // Deprecated: Use PathUnknownErrorMessageResponse.ProtoReflect.Descriptor instead. 706 | func (*PathUnknownErrorMessageResponse) Descriptor() ([]byte, []int) { 707 | return file_openfga_v1_errors_ignore_proto_rawDescGZIP(), []int{4} 708 | } 709 | 710 | func (x *PathUnknownErrorMessageResponse) GetCode() NotFoundErrorCode { 711 | if x != nil { 712 | return x.Code 713 | } 714 | return NotFoundErrorCode_no_not_found_error 715 | } 716 | 717 | func (x *PathUnknownErrorMessageResponse) GetMessage() string { 718 | if x != nil { 719 | return x.Message 720 | } 721 | return "" 722 | } 723 | 724 | type AbortedMessageResponse struct { 725 | state protoimpl.MessageState 726 | sizeCache protoimpl.SizeCache 727 | unknownFields protoimpl.UnknownFields 728 | 729 | Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` 730 | Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` 731 | } 732 | 733 | func (x *AbortedMessageResponse) Reset() { 734 | *x = AbortedMessageResponse{} 735 | if protoimpl.UnsafeEnabled { 736 | mi := &file_openfga_v1_errors_ignore_proto_msgTypes[5] 737 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 738 | ms.StoreMessageInfo(mi) 739 | } 740 | } 741 | 742 | func (x *AbortedMessageResponse) String() string { 743 | return protoimpl.X.MessageStringOf(x) 744 | } 745 | 746 | func (*AbortedMessageResponse) ProtoMessage() {} 747 | 748 | func (x *AbortedMessageResponse) ProtoReflect() protoreflect.Message { 749 | mi := &file_openfga_v1_errors_ignore_proto_msgTypes[5] 750 | if protoimpl.UnsafeEnabled && x != nil { 751 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 752 | if ms.LoadMessageInfo() == nil { 753 | ms.StoreMessageInfo(mi) 754 | } 755 | return ms 756 | } 757 | return mi.MessageOf(x) 758 | } 759 | 760 | // Deprecated: Use AbortedMessageResponse.ProtoReflect.Descriptor instead. 761 | func (*AbortedMessageResponse) Descriptor() ([]byte, []int) { 762 | return file_openfga_v1_errors_ignore_proto_rawDescGZIP(), []int{5} 763 | } 764 | 765 | func (x *AbortedMessageResponse) GetCode() string { 766 | if x != nil { 767 | return x.Code 768 | } 769 | return "" 770 | } 771 | 772 | func (x *AbortedMessageResponse) GetMessage() string { 773 | if x != nil { 774 | return x.Message 775 | } 776 | return "" 777 | } 778 | 779 | type ErrorMessageRequest struct { 780 | state protoimpl.MessageState 781 | sizeCache protoimpl.SizeCache 782 | unknownFields protoimpl.UnknownFields 783 | } 784 | 785 | func (x *ErrorMessageRequest) Reset() { 786 | *x = ErrorMessageRequest{} 787 | if protoimpl.UnsafeEnabled { 788 | mi := &file_openfga_v1_errors_ignore_proto_msgTypes[6] 789 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 790 | ms.StoreMessageInfo(mi) 791 | } 792 | } 793 | 794 | func (x *ErrorMessageRequest) String() string { 795 | return protoimpl.X.MessageStringOf(x) 796 | } 797 | 798 | func (*ErrorMessageRequest) ProtoMessage() {} 799 | 800 | func (x *ErrorMessageRequest) ProtoReflect() protoreflect.Message { 801 | mi := &file_openfga_v1_errors_ignore_proto_msgTypes[6] 802 | if protoimpl.UnsafeEnabled && x != nil { 803 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 804 | if ms.LoadMessageInfo() == nil { 805 | ms.StoreMessageInfo(mi) 806 | } 807 | return ms 808 | } 809 | return mi.MessageOf(x) 810 | } 811 | 812 | // Deprecated: Use ErrorMessageRequest.ProtoReflect.Descriptor instead. 813 | func (*ErrorMessageRequest) Descriptor() ([]byte, []int) { 814 | return file_openfga_v1_errors_ignore_proto_rawDescGZIP(), []int{6} 815 | } 816 | 817 | type ForbiddenResponse struct { 818 | state protoimpl.MessageState 819 | sizeCache protoimpl.SizeCache 820 | unknownFields protoimpl.UnknownFields 821 | 822 | Code AuthErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=openfga.v1.AuthErrorCode" json:"code,omitempty"` 823 | Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` 824 | } 825 | 826 | func (x *ForbiddenResponse) Reset() { 827 | *x = ForbiddenResponse{} 828 | if protoimpl.UnsafeEnabled { 829 | mi := &file_openfga_v1_errors_ignore_proto_msgTypes[7] 830 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 831 | ms.StoreMessageInfo(mi) 832 | } 833 | } 834 | 835 | func (x *ForbiddenResponse) String() string { 836 | return protoimpl.X.MessageStringOf(x) 837 | } 838 | 839 | func (*ForbiddenResponse) ProtoMessage() {} 840 | 841 | func (x *ForbiddenResponse) ProtoReflect() protoreflect.Message { 842 | mi := &file_openfga_v1_errors_ignore_proto_msgTypes[7] 843 | if protoimpl.UnsafeEnabled && x != nil { 844 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 845 | if ms.LoadMessageInfo() == nil { 846 | ms.StoreMessageInfo(mi) 847 | } 848 | return ms 849 | } 850 | return mi.MessageOf(x) 851 | } 852 | 853 | // Deprecated: Use ForbiddenResponse.ProtoReflect.Descriptor instead. 854 | func (*ForbiddenResponse) Descriptor() ([]byte, []int) { 855 | return file_openfga_v1_errors_ignore_proto_rawDescGZIP(), []int{7} 856 | } 857 | 858 | func (x *ForbiddenResponse) GetCode() AuthErrorCode { 859 | if x != nil { 860 | return x.Code 861 | } 862 | return AuthErrorCode_no_auth_error 863 | } 864 | 865 | func (x *ForbiddenResponse) GetMessage() string { 866 | if x != nil { 867 | return x.Message 868 | } 869 | return "" 870 | } 871 | 872 | var File_openfga_v1_errors_ignore_proto protoreflect.FileDescriptor 873 | 874 | var file_openfga_v1_errors_ignore_proto_rawDesc = []byte{ 875 | 0x0a, 0x1e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x72, 0x72, 876 | 0x6f, 0x72, 0x73, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 877 | 0x12, 0x0a, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x1a, 0x2e, 0x70, 0x72, 878 | 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 879 | 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 880 | 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x01, 0x0a, 881 | 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 882 | 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 883 | 0x29, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 884 | 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 885 | 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 886 | 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 887 | 0x73, 0x61, 0x67, 0x65, 0x3a, 0x46, 0x92, 0x41, 0x43, 0x32, 0x41, 0x7b, 0x22, 0x63, 0x6f, 0x64, 888 | 0x65, 0x22, 0x3a, 0x22, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 889 | 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0x20, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 890 | 0x3a, 0x22, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 891 | 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x7d, 0x22, 0x9c, 0x01, 0x0a, 892 | 0x17, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 893 | 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 894 | 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 895 | 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 896 | 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 897 | 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x3c, 0x92, 898 | 0x41, 0x39, 0x32, 0x37, 0x7b, 0x22, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3a, 0x22, 0x75, 0x6e, 0x61, 899 | 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2c, 0x20, 0x22, 900 | 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3a, 0x22, 0x75, 0x6e, 0x61, 0x75, 0x74, 0x68, 901 | 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x22, 0x7d, 0x22, 0xe1, 0x01, 0x0a, 0x23, 902 | 0x55, 0x6e, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 903 | 0x74, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 904 | 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 905 | 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x55, 906 | 0x6e, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 907 | 0x65, 0x6e, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 908 | 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 909 | 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x61, 0x92, 0x41, 910 | 0x5e, 0x32, 0x5c, 0x7b, 0x22, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3a, 0x22, 0x74, 0x68, 0x72, 0x6f, 911 | 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x65, 0x72, 912 | 0x72, 0x6f, 0x72, 0x22, 0x2c, 0x20, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3a, 913 | 0x22, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x20, 0x64, 0x75, 0x65, 0x20, 0x74, 0x6f, 0x20, 914 | 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x63, 0x6f, 915 | 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x7d, 0x22, 916 | 0xae, 0x01, 0x0a, 0x1c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 917 | 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 918 | 0x12, 0x31, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 919 | 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 920 | 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 921 | 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 922 | 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x41, 0x92, 923 | 0x41, 0x3e, 0x32, 0x3c, 0x7b, 0x22, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3a, 0x22, 0x69, 0x6e, 0x74, 924 | 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0x20, 0x22, 0x6d, 925 | 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3a, 0x22, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 926 | 0x6c, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x7d, 927 | 0x22, 0xb4, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x68, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 928 | 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 929 | 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 930 | 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 931 | 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 932 | 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 933 | 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 934 | 0x65, 0x3a, 0x44, 0x92, 0x41, 0x41, 0x32, 0x3f, 0x7b, 0x22, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3a, 935 | 0x22, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 936 | 0x69, 0x6e, 0x74, 0x22, 0x2c, 0x20, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3a, 937 | 0x22, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x6e, 938 | 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x7d, 0x22, 0x7c, 0x0a, 0x16, 0x41, 0x62, 0x6f, 0x72, 0x74, 939 | 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 940 | 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 941 | 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 942 | 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 943 | 0x34, 0x92, 0x41, 0x31, 0x32, 0x2f, 0x7b, 0x22, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3a, 0x22, 0x31, 944 | 0x30, 0x22, 0x2c, 0x20, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3a, 0x22, 0x74, 945 | 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 946 | 0x69, 0x63, 0x74, 0x22, 0x7d, 0x22, 0x15, 0x0a, 0x13, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 947 | 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xba, 0x01, 0x0a, 948 | 0x11, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 949 | 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 950 | 0x32, 0x19, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 951 | 0x74, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 952 | 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 953 | 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x5c, 0x92, 0x41, 0x59, 954 | 0x32, 0x57, 0x7b, 0x22, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3a, 0x22, 0x66, 0x6f, 0x72, 0x62, 0x69, 955 | 0x64, 0x64, 0x65, 0x6e, 0x22, 0x2c, 0x20, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 956 | 0x3a, 0x22, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x20, 957 | 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 958 | 0x64, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x74, 0x68, 0x65, 959 | 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7d, 0x2a, 0x85, 0x02, 0x0a, 0x0d, 0x41, 0x75, 960 | 0x74, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x6e, 961 | 0x6f, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x00, 0x12, 0x20, 962 | 0x0a, 0x1b, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x69, 0x6e, 963 | 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, 0xe9, 0x07, 964 | 0x12, 0x21, 0x0a, 0x1c, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 965 | 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 966 | 0x10, 0xea, 0x07, 0x12, 0x1f, 0x0a, 0x1a, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x66, 0x61, 0x69, 0x6c, 967 | 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, 968 | 0x72, 0x10, 0xeb, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 969 | 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x10, 0xec, 0x07, 0x12, 0x25, 0x0a, 0x20, 0x61, 0x75, 0x74, 970 | 0x68, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 971 | 0x5f, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xed, 0x07, 972 | 0x12, 0x19, 0x0a, 0x14, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 973 | 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x10, 0xf2, 0x07, 0x12, 0x14, 0x0a, 0x0f, 0x75, 974 | 0x6e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x10, 0xdc, 975 | 0x0b, 0x12, 0x0e, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x10, 0xc0, 976 | 0x0c, 0x2a, 0xa3, 0x0c, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 977 | 0x0c, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x00, 0x12, 0x15, 0x0a, 978 | 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 979 | 0x72, 0x10, 0xd0, 0x0f, 0x12, 0x22, 0x0a, 0x1d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 980 | 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 981 | 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xd1, 0x0f, 0x12, 0x2f, 0x0a, 0x2a, 0x61, 0x75, 0x74, 0x68, 982 | 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 983 | 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6f, 0x5f, 0x63, 984 | 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x10, 0xd2, 0x0f, 0x12, 0x18, 0x0a, 0x13, 0x69, 0x6e, 0x76, 985 | 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 986 | 0x10, 0xd3, 0x0f, 0x12, 0x31, 0x0a, 0x2c, 0x63, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x5f, 0x61, 0x6c, 987 | 0x6c, 0x6f, 0x77, 0x5f, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x75, 988 | 0x70, 0x6c, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x6f, 0x6e, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 989 | 0x65, 0x73, 0x74, 0x10, 0xd4, 0x0f, 0x12, 0x30, 0x0a, 0x2b, 0x63, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 990 | 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 991 | 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x6f, 0x6e, 0x65, 0x5f, 0x72, 0x65, 992 | 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xd5, 0x0f, 0x12, 0x35, 0x0a, 0x30, 0x63, 0x61, 0x6e, 0x6e, 993 | 0x6f, 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 994 | 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 995 | 0x6f, 0x6e, 0x65, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0xd6, 0x0f, 0x12, 996 | 0x1f, 0x0a, 0x1a, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x69, 997 | 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xd7, 0x0f, 998 | 0x12, 0x16, 0x0a, 0x11, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x74, 0x75, 0x70, 0x6c, 999 | 0x65, 0x5f, 0x73, 0x65, 0x74, 0x10, 0xd8, 0x0f, 0x12, 0x18, 0x0a, 0x13, 0x69, 0x6e, 0x76, 0x61, 1000 | 0x6c, 0x69, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x10, 1001 | 0xd9, 0x0f, 0x12, 0x19, 0x0a, 0x14, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x65, 0x78, 1002 | 0x70, 0x61, 0x6e, 0x64, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x10, 0xda, 0x0f, 0x12, 0x19, 0x0a, 1003 | 0x14, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 1004 | 0x72, 0x5f, 0x73, 0x65, 0x74, 0x10, 0xdb, 0x0f, 0x12, 0x1a, 0x0a, 0x15, 0x69, 0x6e, 0x76, 0x61, 1005 | 0x6c, 0x69, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 1006 | 0x74, 0x10, 0xdc, 0x0f, 0x12, 0x26, 0x0a, 0x21, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x66, 0x61, 1007 | 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x64, 0x75, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x69, 0x6e, 0x76, 0x61, 1008 | 0x6c, 0x69, 0x64, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x10, 0xe1, 0x0f, 0x12, 0x2d, 0x0a, 0x28, 1009 | 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 1010 | 0x64, 0x65, 0x6c, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6e, 1011 | 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xe2, 0x0f, 0x12, 0x29, 0x0a, 0x24, 0x6c, 1012 | 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 1013 | 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 1014 | 0x75, 0x6e, 0x64, 0x10, 0xe4, 0x0f, 0x12, 0x13, 0x0a, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 1015 | 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xe5, 0x0f, 0x12, 0x17, 0x0a, 0x12, 0x72, 1016 | 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 1017 | 0x64, 0x10, 0xe6, 0x0f, 0x12, 0x1e, 0x0a, 0x19, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x72, 0x65, 1018 | 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 1019 | 0x6e, 0x10, 0xe7, 0x0f, 0x12, 0x11, 0x0a, 0x0c, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 1020 | 0x75, 0x73, 0x65, 0x72, 0x10, 0xe9, 0x0f, 0x12, 0x12, 0x0a, 0x0d, 0x69, 0x6e, 0x76, 0x61, 0x6c, 1021 | 0x69, 0x64, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x10, 0xeb, 0x0f, 0x12, 0x15, 0x0a, 0x10, 0x75, 1022 | 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 1023 | 0xec, 0x0f, 0x12, 0x1c, 0x0a, 0x17, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x69, 1024 | 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x10, 0xee, 0x0f, 1025 | 0x12, 0x1e, 0x0a, 0x19, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x74, 1026 | 0x6f, 0x6f, 0x5f, 0x6d, 0x61, 0x6e, 0x79, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x10, 0xf1, 0x0f, 1027 | 0x12, 0x10, 0x0a, 0x0b, 0x69, 0x64, 0x5f, 0x74, 0x6f, 0x6f, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x10, 1028 | 0xf2, 0x0f, 0x12, 0x24, 0x0a, 0x1f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 1029 | 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x5f, 0x74, 0x6f, 0x6f, 1030 | 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x10, 0xf4, 0x0f, 0x12, 0x22, 0x0a, 0x1d, 0x74, 0x75, 0x70, 0x6c, 1031 | 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 1032 | 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0xf5, 0x0f, 0x12, 0x29, 0x0a, 0x24, 1033 | 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x74, 0x6f, 0x6f, 0x5f, 0x6d, 1034 | 0x61, 0x6e, 0x79, 0x5f, 0x6f, 0x72, 0x5f, 0x74, 0x6f, 0x6f, 0x5f, 0x66, 0x65, 0x77, 0x5f, 0x69, 1035 | 0x74, 0x65, 0x6d, 0x73, 0x10, 0xf6, 0x0f, 0x12, 0x16, 0x0a, 0x11, 0x70, 0x61, 0x67, 0x65, 0x5f, 1036 | 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x10, 0xf7, 0x0f, 0x12, 1037 | 0x18, 0x0a, 0x13, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 1038 | 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0xf8, 0x0f, 0x12, 0x22, 0x0a, 0x1d, 0x64, 0x69, 0x66, 1039 | 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6d, 0x69, 0x73, 1040 | 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0xf9, 0x0f, 0x12, 0x20, 0x0a, 1041 | 0x1b, 0x73, 0x75, 0x62, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6d, 1042 | 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0xfa, 0x0f, 0x12, 1043 | 0x14, 0x0a, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x6f, 0x6f, 0x5f, 0x6c, 0x6f, 1044 | 0x6e, 0x67, 0x10, 0xfb, 0x0f, 0x12, 0x16, 0x0a, 0x11, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 1045 | 0x6e, 0x5f, 0x74, 0x6f, 0x6f, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x10, 0xfc, 0x0f, 0x12, 0x23, 0x0a, 1046 | 0x1e, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 1047 | 0x73, 0x5f, 0x74, 0x6f, 0x6f, 0x5f, 0x66, 0x65, 0x77, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x10, 1048 | 0xfd, 0x0f, 0x12, 0x18, 0x0a, 0x13, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 1049 | 0x69, 0x64, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x10, 0xfe, 0x0f, 0x12, 0x19, 0x0a, 0x14, 1050 | 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x70, 0x61, 0x74, 1051 | 0x74, 0x65, 0x72, 0x6e, 0x10, 0xff, 0x0f, 0x12, 0x1c, 0x0a, 0x17, 0x72, 0x65, 0x6c, 0x61, 0x74, 1052 | 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x74, 0x6f, 0x6f, 0x5f, 0x66, 0x65, 0x77, 0x5f, 0x69, 0x74, 0x65, 1053 | 0x6d, 0x73, 0x10, 0x80, 0x10, 0x12, 0x17, 0x0a, 0x12, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 1054 | 0x6e, 0x73, 0x5f, 0x74, 0x6f, 0x6f, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x10, 0x81, 0x10, 0x12, 0x1e, 1055 | 0x0a, 0x19, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x69, 0x6e, 0x76, 0x61, 1056 | 0x6c, 0x69, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x10, 0x82, 0x10, 0x12, 0x1b, 1057 | 0x0a, 0x16, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 1058 | 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x10, 0x83, 0x10, 0x12, 0x32, 0x0a, 0x2d, 0x71, 1059 | 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 1060 | 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 1061 | 0x6b, 0x65, 0x6e, 0x5f, 0x6d, 0x69, 0x73, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x10, 0x84, 0x10, 0x12, 1062 | 0x1a, 0x0a, 0x15, 0x65, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x69, 1063 | 0x74, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0x85, 0x10, 0x12, 0x1d, 0x0a, 0x18, 0x69, 1064 | 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 1065 | 0x6c, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x10, 0x86, 0x10, 0x12, 0x1f, 0x0a, 0x1a, 0x64, 0x75, 1066 | 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 1067 | 0x61, 0x6c, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x10, 0x87, 0x10, 0x12, 0x20, 0x0a, 0x1b, 0x69, 1068 | 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 1069 | 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x10, 0x88, 0x10, 0x12, 0x1f, 0x0a, 1070 | 0x1a, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x63, 0x68, 1071 | 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x89, 0x10, 0x12, 0x0e, 1072 | 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x10, 0x8a, 0x10, 0x12, 0x17, 1073 | 0x0a, 0x12, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 1074 | 0x74, 0x69, 0x6d, 0x65, 0x10, 0x8b, 0x10, 0x2a, 0x5a, 0x0a, 0x1d, 0x55, 0x6e, 0x70, 0x72, 0x6f, 1075 | 0x63, 0x65, 0x73, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x45, 1076 | 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x6e, 0x6f, 0x5f, 0x74, 1077 | 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 1078 | 0x6f, 0x64, 0x65, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x17, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 1079 | 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 1080 | 0x10, 0xac, 0x1b, 0x2a, 0xe2, 0x01, 0x0a, 0x11, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 1081 | 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x6e, 0x6f, 0x5f, 1082 | 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x00, 1083 | 0x12, 0x13, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x72, 1084 | 0x6f, 0x72, 0x10, 0xa0, 0x1f, 0x12, 0x16, 0x0a, 0x11, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 1085 | 0x65, 0x5f, 0x65, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, 0xa4, 0x1f, 0x12, 0x13, 0x0a, 1086 | 0x0e, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x10, 1087 | 0xa5, 0x1f, 0x12, 0x17, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 1088 | 0x78, 0x68, 0x61, 0x75, 0x73, 0x74, 0x65, 0x64, 0x10, 0xa6, 0x1f, 0x12, 0x18, 0x0a, 0x13, 0x66, 1089 | 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 1090 | 0x6f, 0x6e, 0x10, 0xa7, 0x1f, 0x12, 0x0c, 0x0a, 0x07, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x65, 0x64, 1091 | 0x10, 0xa8, 0x1f, 0x12, 0x11, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x72, 0x61, 1092 | 0x6e, 0x67, 0x65, 0x10, 0xa9, 0x1f, 0x12, 0x10, 0x0a, 0x0b, 0x75, 0x6e, 0x61, 0x76, 0x61, 0x69, 1093 | 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xaa, 0x1f, 0x12, 0x0e, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 1094 | 0x5f, 0x6c, 0x6f, 0x73, 0x73, 0x10, 0xab, 0x1f, 0x2a, 0x71, 0x0a, 0x11, 0x4e, 0x6f, 0x74, 0x46, 1095 | 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 1096 | 0x12, 0x6e, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x65, 0x72, 1097 | 0x72, 0x6f, 0x72, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x12, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 1098 | 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x10, 0x88, 0x27, 0x12, 0x17, 1099 | 0x0a, 0x12, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x66, 1100 | 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x8a, 0x27, 0x12, 0x12, 0x0a, 0x0d, 0x75, 0x6e, 0x69, 0x6d, 0x70, 1101 | 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x10, 0x8c, 0x27, 0x42, 0x9f, 0x01, 0x0a, 0x0e, 1102 | 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x11, 1103 | 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 1104 | 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 1105 | 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 1106 | 0x6f, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x65, 1107 | 0x6e, 0x66, 0x67, 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x4f, 1108 | 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 1109 | 0x66, 0x67, 0x61, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x4f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 1110 | 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 1111 | 0x02, 0x0b, 0x4f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 1112 | 0x72, 0x6f, 0x74, 0x6f, 0x33, 1113 | } 1114 | 1115 | var ( 1116 | file_openfga_v1_errors_ignore_proto_rawDescOnce sync.Once 1117 | file_openfga_v1_errors_ignore_proto_rawDescData = file_openfga_v1_errors_ignore_proto_rawDesc 1118 | ) 1119 | 1120 | func file_openfga_v1_errors_ignore_proto_rawDescGZIP() []byte { 1121 | file_openfga_v1_errors_ignore_proto_rawDescOnce.Do(func() { 1122 | file_openfga_v1_errors_ignore_proto_rawDescData = protoimpl.X.CompressGZIP(file_openfga_v1_errors_ignore_proto_rawDescData) 1123 | }) 1124 | return file_openfga_v1_errors_ignore_proto_rawDescData 1125 | } 1126 | 1127 | var file_openfga_v1_errors_ignore_proto_enumTypes = make([]protoimpl.EnumInfo, 5) 1128 | var file_openfga_v1_errors_ignore_proto_msgTypes = make([]protoimpl.MessageInfo, 8) 1129 | var file_openfga_v1_errors_ignore_proto_goTypes = []interface{}{ 1130 | (AuthErrorCode)(0), // 0: openfga.v1.AuthErrorCode 1131 | (ErrorCode)(0), // 1: openfga.v1.ErrorCode 1132 | (UnprocessableContentErrorCode)(0), // 2: openfga.v1.UnprocessableContentErrorCode 1133 | (InternalErrorCode)(0), // 3: openfga.v1.InternalErrorCode 1134 | (NotFoundErrorCode)(0), // 4: openfga.v1.NotFoundErrorCode 1135 | (*ValidationErrorMessageResponse)(nil), // 5: openfga.v1.ValidationErrorMessageResponse 1136 | (*UnauthenticatedResponse)(nil), // 6: openfga.v1.UnauthenticatedResponse 1137 | (*UnprocessableContentMessageResponse)(nil), // 7: openfga.v1.UnprocessableContentMessageResponse 1138 | (*InternalErrorMessageResponse)(nil), // 8: openfga.v1.InternalErrorMessageResponse 1139 | (*PathUnknownErrorMessageResponse)(nil), // 9: openfga.v1.PathUnknownErrorMessageResponse 1140 | (*AbortedMessageResponse)(nil), // 10: openfga.v1.AbortedMessageResponse 1141 | (*ErrorMessageRequest)(nil), // 11: openfga.v1.ErrorMessageRequest 1142 | (*ForbiddenResponse)(nil), // 12: openfga.v1.ForbiddenResponse 1143 | } 1144 | var file_openfga_v1_errors_ignore_proto_depIdxs = []int32{ 1145 | 1, // 0: openfga.v1.ValidationErrorMessageResponse.code:type_name -> openfga.v1.ErrorCode 1146 | 1, // 1: openfga.v1.UnauthenticatedResponse.code:type_name -> openfga.v1.ErrorCode 1147 | 2, // 2: openfga.v1.UnprocessableContentMessageResponse.code:type_name -> openfga.v1.UnprocessableContentErrorCode 1148 | 3, // 3: openfga.v1.InternalErrorMessageResponse.code:type_name -> openfga.v1.InternalErrorCode 1149 | 4, // 4: openfga.v1.PathUnknownErrorMessageResponse.code:type_name -> openfga.v1.NotFoundErrorCode 1150 | 0, // 5: openfga.v1.ForbiddenResponse.code:type_name -> openfga.v1.AuthErrorCode 1151 | 6, // [6:6] is the sub-list for method output_type 1152 | 6, // [6:6] is the sub-list for method input_type 1153 | 6, // [6:6] is the sub-list for extension type_name 1154 | 6, // [6:6] is the sub-list for extension extendee 1155 | 0, // [0:6] is the sub-list for field type_name 1156 | } 1157 | 1158 | func init() { file_openfga_v1_errors_ignore_proto_init() } 1159 | func file_openfga_v1_errors_ignore_proto_init() { 1160 | if File_openfga_v1_errors_ignore_proto != nil { 1161 | return 1162 | } 1163 | if !protoimpl.UnsafeEnabled { 1164 | file_openfga_v1_errors_ignore_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 1165 | switch v := v.(*ValidationErrorMessageResponse); i { 1166 | case 0: 1167 | return &v.state 1168 | case 1: 1169 | return &v.sizeCache 1170 | case 2: 1171 | return &v.unknownFields 1172 | default: 1173 | return nil 1174 | } 1175 | } 1176 | file_openfga_v1_errors_ignore_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 1177 | switch v := v.(*UnauthenticatedResponse); i { 1178 | case 0: 1179 | return &v.state 1180 | case 1: 1181 | return &v.sizeCache 1182 | case 2: 1183 | return &v.unknownFields 1184 | default: 1185 | return nil 1186 | } 1187 | } 1188 | file_openfga_v1_errors_ignore_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 1189 | switch v := v.(*UnprocessableContentMessageResponse); i { 1190 | case 0: 1191 | return &v.state 1192 | case 1: 1193 | return &v.sizeCache 1194 | case 2: 1195 | return &v.unknownFields 1196 | default: 1197 | return nil 1198 | } 1199 | } 1200 | file_openfga_v1_errors_ignore_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 1201 | switch v := v.(*InternalErrorMessageResponse); i { 1202 | case 0: 1203 | return &v.state 1204 | case 1: 1205 | return &v.sizeCache 1206 | case 2: 1207 | return &v.unknownFields 1208 | default: 1209 | return nil 1210 | } 1211 | } 1212 | file_openfga_v1_errors_ignore_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { 1213 | switch v := v.(*PathUnknownErrorMessageResponse); i { 1214 | case 0: 1215 | return &v.state 1216 | case 1: 1217 | return &v.sizeCache 1218 | case 2: 1219 | return &v.unknownFields 1220 | default: 1221 | return nil 1222 | } 1223 | } 1224 | file_openfga_v1_errors_ignore_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { 1225 | switch v := v.(*AbortedMessageResponse); i { 1226 | case 0: 1227 | return &v.state 1228 | case 1: 1229 | return &v.sizeCache 1230 | case 2: 1231 | return &v.unknownFields 1232 | default: 1233 | return nil 1234 | } 1235 | } 1236 | file_openfga_v1_errors_ignore_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { 1237 | switch v := v.(*ErrorMessageRequest); i { 1238 | case 0: 1239 | return &v.state 1240 | case 1: 1241 | return &v.sizeCache 1242 | case 2: 1243 | return &v.unknownFields 1244 | default: 1245 | return nil 1246 | } 1247 | } 1248 | file_openfga_v1_errors_ignore_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { 1249 | switch v := v.(*ForbiddenResponse); i { 1250 | case 0: 1251 | return &v.state 1252 | case 1: 1253 | return &v.sizeCache 1254 | case 2: 1255 | return &v.unknownFields 1256 | default: 1257 | return nil 1258 | } 1259 | } 1260 | } 1261 | type x struct{} 1262 | out := protoimpl.TypeBuilder{ 1263 | File: protoimpl.DescBuilder{ 1264 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 1265 | RawDescriptor: file_openfga_v1_errors_ignore_proto_rawDesc, 1266 | NumEnums: 5, 1267 | NumMessages: 8, 1268 | NumExtensions: 0, 1269 | NumServices: 0, 1270 | }, 1271 | GoTypes: file_openfga_v1_errors_ignore_proto_goTypes, 1272 | DependencyIndexes: file_openfga_v1_errors_ignore_proto_depIdxs, 1273 | EnumInfos: file_openfga_v1_errors_ignore_proto_enumTypes, 1274 | MessageInfos: file_openfga_v1_errors_ignore_proto_msgTypes, 1275 | }.Build() 1276 | File_openfga_v1_errors_ignore_proto = out.File 1277 | file_openfga_v1_errors_ignore_proto_rawDesc = nil 1278 | file_openfga_v1_errors_ignore_proto_goTypes = nil 1279 | file_openfga_v1_errors_ignore_proto_depIdxs = nil 1280 | } 1281 | -------------------------------------------------------------------------------- /proto/openfga/v1/errors_ignore.pb.validate.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-validate. DO NOT EDIT. 2 | // source: openfga/v1/errors_ignore.proto 3 | 4 | package openfgav1 5 | 6 | import ( 7 | "bytes" 8 | "errors" 9 | "fmt" 10 | "net" 11 | "net/mail" 12 | "net/url" 13 | "regexp" 14 | "sort" 15 | "strings" 16 | "time" 17 | "unicode/utf8" 18 | 19 | "google.golang.org/protobuf/types/known/anypb" 20 | ) 21 | 22 | // ensure the imports are used 23 | var ( 24 | _ = bytes.MinRead 25 | _ = errors.New("") 26 | _ = fmt.Print 27 | _ = utf8.UTFMax 28 | _ = (*regexp.Regexp)(nil) 29 | _ = (*strings.Reader)(nil) 30 | _ = net.IPv4len 31 | _ = time.Duration(0) 32 | _ = (*url.URL)(nil) 33 | _ = (*mail.Address)(nil) 34 | _ = anypb.Any{} 35 | _ = sort.Sort 36 | ) 37 | 38 | // Validate checks the field values on ValidationErrorMessageResponse with the 39 | // rules defined in the proto definition for this message. If any rules are 40 | // violated, the first error encountered is returned, or nil if there are no violations. 41 | func (m *ValidationErrorMessageResponse) Validate() error { 42 | return m.validate(false) 43 | } 44 | 45 | // ValidateAll checks the field values on ValidationErrorMessageResponse with 46 | // the rules defined in the proto definition for this message. If any rules 47 | // are violated, the result is a list of violation errors wrapped in 48 | // ValidationErrorMessageResponseMultiError, or nil if none found. 49 | func (m *ValidationErrorMessageResponse) ValidateAll() error { 50 | return m.validate(true) 51 | } 52 | 53 | func (m *ValidationErrorMessageResponse) validate(all bool) error { 54 | if m == nil { 55 | return nil 56 | } 57 | 58 | var errors []error 59 | 60 | // no validation rules for Code 61 | 62 | // no validation rules for Message 63 | 64 | if len(errors) > 0 { 65 | return ValidationErrorMessageResponseMultiError(errors) 66 | } 67 | 68 | return nil 69 | } 70 | 71 | // ValidationErrorMessageResponseMultiError is an error wrapping multiple 72 | // validation errors returned by ValidationErrorMessageResponse.ValidateAll() 73 | // if the designated constraints aren't met. 74 | type ValidationErrorMessageResponseMultiError []error 75 | 76 | // Error returns a concatenation of all the error messages it wraps. 77 | func (m ValidationErrorMessageResponseMultiError) Error() string { 78 | var msgs []string 79 | for _, err := range m { 80 | msgs = append(msgs, err.Error()) 81 | } 82 | return strings.Join(msgs, "; ") 83 | } 84 | 85 | // AllErrors returns a list of validation violation errors. 86 | func (m ValidationErrorMessageResponseMultiError) AllErrors() []error { return m } 87 | 88 | // ValidationErrorMessageResponseValidationError is the validation error 89 | // returned by ValidationErrorMessageResponse.Validate if the designated 90 | // constraints aren't met. 91 | type ValidationErrorMessageResponseValidationError struct { 92 | field string 93 | reason string 94 | cause error 95 | key bool 96 | } 97 | 98 | // Field function returns field value. 99 | func (e ValidationErrorMessageResponseValidationError) Field() string { return e.field } 100 | 101 | // Reason function returns reason value. 102 | func (e ValidationErrorMessageResponseValidationError) Reason() string { return e.reason } 103 | 104 | // Cause function returns cause value. 105 | func (e ValidationErrorMessageResponseValidationError) Cause() error { return e.cause } 106 | 107 | // Key function returns key value. 108 | func (e ValidationErrorMessageResponseValidationError) Key() bool { return e.key } 109 | 110 | // ErrorName returns error name. 111 | func (e ValidationErrorMessageResponseValidationError) ErrorName() string { 112 | return "ValidationErrorMessageResponseValidationError" 113 | } 114 | 115 | // Error satisfies the builtin error interface 116 | func (e ValidationErrorMessageResponseValidationError) Error() string { 117 | cause := "" 118 | if e.cause != nil { 119 | cause = fmt.Sprintf(" | caused by: %v", e.cause) 120 | } 121 | 122 | key := "" 123 | if e.key { 124 | key = "key for " 125 | } 126 | 127 | return fmt.Sprintf( 128 | "invalid %sValidationErrorMessageResponse.%s: %s%s", 129 | key, 130 | e.field, 131 | e.reason, 132 | cause) 133 | } 134 | 135 | var _ error = ValidationErrorMessageResponseValidationError{} 136 | 137 | var _ interface { 138 | Field() string 139 | Reason() string 140 | Key() bool 141 | Cause() error 142 | ErrorName() string 143 | } = ValidationErrorMessageResponseValidationError{} 144 | 145 | // Validate checks the field values on UnauthenticatedResponse with the rules 146 | // defined in the proto definition for this message. If any rules are 147 | // violated, the first error encountered is returned, or nil if there are no violations. 148 | func (m *UnauthenticatedResponse) Validate() error { 149 | return m.validate(false) 150 | } 151 | 152 | // ValidateAll checks the field values on UnauthenticatedResponse with the 153 | // rules defined in the proto definition for this message. If any rules are 154 | // violated, the result is a list of violation errors wrapped in 155 | // UnauthenticatedResponseMultiError, or nil if none found. 156 | func (m *UnauthenticatedResponse) ValidateAll() error { 157 | return m.validate(true) 158 | } 159 | 160 | func (m *UnauthenticatedResponse) validate(all bool) error { 161 | if m == nil { 162 | return nil 163 | } 164 | 165 | var errors []error 166 | 167 | // no validation rules for Code 168 | 169 | // no validation rules for Message 170 | 171 | if len(errors) > 0 { 172 | return UnauthenticatedResponseMultiError(errors) 173 | } 174 | 175 | return nil 176 | } 177 | 178 | // UnauthenticatedResponseMultiError is an error wrapping multiple validation 179 | // errors returned by UnauthenticatedResponse.ValidateAll() if the designated 180 | // constraints aren't met. 181 | type UnauthenticatedResponseMultiError []error 182 | 183 | // Error returns a concatenation of all the error messages it wraps. 184 | func (m UnauthenticatedResponseMultiError) Error() string { 185 | var msgs []string 186 | for _, err := range m { 187 | msgs = append(msgs, err.Error()) 188 | } 189 | return strings.Join(msgs, "; ") 190 | } 191 | 192 | // AllErrors returns a list of validation violation errors. 193 | func (m UnauthenticatedResponseMultiError) AllErrors() []error { return m } 194 | 195 | // UnauthenticatedResponseValidationError is the validation error returned by 196 | // UnauthenticatedResponse.Validate if the designated constraints aren't met. 197 | type UnauthenticatedResponseValidationError struct { 198 | field string 199 | reason string 200 | cause error 201 | key bool 202 | } 203 | 204 | // Field function returns field value. 205 | func (e UnauthenticatedResponseValidationError) Field() string { return e.field } 206 | 207 | // Reason function returns reason value. 208 | func (e UnauthenticatedResponseValidationError) Reason() string { return e.reason } 209 | 210 | // Cause function returns cause value. 211 | func (e UnauthenticatedResponseValidationError) Cause() error { return e.cause } 212 | 213 | // Key function returns key value. 214 | func (e UnauthenticatedResponseValidationError) Key() bool { return e.key } 215 | 216 | // ErrorName returns error name. 217 | func (e UnauthenticatedResponseValidationError) ErrorName() string { 218 | return "UnauthenticatedResponseValidationError" 219 | } 220 | 221 | // Error satisfies the builtin error interface 222 | func (e UnauthenticatedResponseValidationError) Error() string { 223 | cause := "" 224 | if e.cause != nil { 225 | cause = fmt.Sprintf(" | caused by: %v", e.cause) 226 | } 227 | 228 | key := "" 229 | if e.key { 230 | key = "key for " 231 | } 232 | 233 | return fmt.Sprintf( 234 | "invalid %sUnauthenticatedResponse.%s: %s%s", 235 | key, 236 | e.field, 237 | e.reason, 238 | cause) 239 | } 240 | 241 | var _ error = UnauthenticatedResponseValidationError{} 242 | 243 | var _ interface { 244 | Field() string 245 | Reason() string 246 | Key() bool 247 | Cause() error 248 | ErrorName() string 249 | } = UnauthenticatedResponseValidationError{} 250 | 251 | // Validate checks the field values on UnprocessableContentMessageResponse with 252 | // the rules defined in the proto definition for this message. If any rules 253 | // are violated, the first error encountered is returned, or nil if there are 254 | // no violations. 255 | func (m *UnprocessableContentMessageResponse) Validate() error { 256 | return m.validate(false) 257 | } 258 | 259 | // ValidateAll checks the field values on UnprocessableContentMessageResponse 260 | // with the rules defined in the proto definition for this message. If any 261 | // rules are violated, the result is a list of violation errors wrapped in 262 | // UnprocessableContentMessageResponseMultiError, or nil if none found. 263 | func (m *UnprocessableContentMessageResponse) ValidateAll() error { 264 | return m.validate(true) 265 | } 266 | 267 | func (m *UnprocessableContentMessageResponse) validate(all bool) error { 268 | if m == nil { 269 | return nil 270 | } 271 | 272 | var errors []error 273 | 274 | // no validation rules for Code 275 | 276 | // no validation rules for Message 277 | 278 | if len(errors) > 0 { 279 | return UnprocessableContentMessageResponseMultiError(errors) 280 | } 281 | 282 | return nil 283 | } 284 | 285 | // UnprocessableContentMessageResponseMultiError is an error wrapping multiple 286 | // validation errors returned by 287 | // UnprocessableContentMessageResponse.ValidateAll() if the designated 288 | // constraints aren't met. 289 | type UnprocessableContentMessageResponseMultiError []error 290 | 291 | // Error returns a concatenation of all the error messages it wraps. 292 | func (m UnprocessableContentMessageResponseMultiError) Error() string { 293 | var msgs []string 294 | for _, err := range m { 295 | msgs = append(msgs, err.Error()) 296 | } 297 | return strings.Join(msgs, "; ") 298 | } 299 | 300 | // AllErrors returns a list of validation violation errors. 301 | func (m UnprocessableContentMessageResponseMultiError) AllErrors() []error { return m } 302 | 303 | // UnprocessableContentMessageResponseValidationError is the validation error 304 | // returned by UnprocessableContentMessageResponse.Validate if the designated 305 | // constraints aren't met. 306 | type UnprocessableContentMessageResponseValidationError struct { 307 | field string 308 | reason string 309 | cause error 310 | key bool 311 | } 312 | 313 | // Field function returns field value. 314 | func (e UnprocessableContentMessageResponseValidationError) Field() string { return e.field } 315 | 316 | // Reason function returns reason value. 317 | func (e UnprocessableContentMessageResponseValidationError) Reason() string { return e.reason } 318 | 319 | // Cause function returns cause value. 320 | func (e UnprocessableContentMessageResponseValidationError) Cause() error { return e.cause } 321 | 322 | // Key function returns key value. 323 | func (e UnprocessableContentMessageResponseValidationError) Key() bool { return e.key } 324 | 325 | // ErrorName returns error name. 326 | func (e UnprocessableContentMessageResponseValidationError) ErrorName() string { 327 | return "UnprocessableContentMessageResponseValidationError" 328 | } 329 | 330 | // Error satisfies the builtin error interface 331 | func (e UnprocessableContentMessageResponseValidationError) Error() string { 332 | cause := "" 333 | if e.cause != nil { 334 | cause = fmt.Sprintf(" | caused by: %v", e.cause) 335 | } 336 | 337 | key := "" 338 | if e.key { 339 | key = "key for " 340 | } 341 | 342 | return fmt.Sprintf( 343 | "invalid %sUnprocessableContentMessageResponse.%s: %s%s", 344 | key, 345 | e.field, 346 | e.reason, 347 | cause) 348 | } 349 | 350 | var _ error = UnprocessableContentMessageResponseValidationError{} 351 | 352 | var _ interface { 353 | Field() string 354 | Reason() string 355 | Key() bool 356 | Cause() error 357 | ErrorName() string 358 | } = UnprocessableContentMessageResponseValidationError{} 359 | 360 | // Validate checks the field values on InternalErrorMessageResponse with the 361 | // rules defined in the proto definition for this message. If any rules are 362 | // violated, the first error encountered is returned, or nil if there are no violations. 363 | func (m *InternalErrorMessageResponse) Validate() error { 364 | return m.validate(false) 365 | } 366 | 367 | // ValidateAll checks the field values on InternalErrorMessageResponse with the 368 | // rules defined in the proto definition for this message. If any rules are 369 | // violated, the result is a list of violation errors wrapped in 370 | // InternalErrorMessageResponseMultiError, or nil if none found. 371 | func (m *InternalErrorMessageResponse) ValidateAll() error { 372 | return m.validate(true) 373 | } 374 | 375 | func (m *InternalErrorMessageResponse) validate(all bool) error { 376 | if m == nil { 377 | return nil 378 | } 379 | 380 | var errors []error 381 | 382 | // no validation rules for Code 383 | 384 | // no validation rules for Message 385 | 386 | if len(errors) > 0 { 387 | return InternalErrorMessageResponseMultiError(errors) 388 | } 389 | 390 | return nil 391 | } 392 | 393 | // InternalErrorMessageResponseMultiError is an error wrapping multiple 394 | // validation errors returned by InternalErrorMessageResponse.ValidateAll() if 395 | // the designated constraints aren't met. 396 | type InternalErrorMessageResponseMultiError []error 397 | 398 | // Error returns a concatenation of all the error messages it wraps. 399 | func (m InternalErrorMessageResponseMultiError) Error() string { 400 | var msgs []string 401 | for _, err := range m { 402 | msgs = append(msgs, err.Error()) 403 | } 404 | return strings.Join(msgs, "; ") 405 | } 406 | 407 | // AllErrors returns a list of validation violation errors. 408 | func (m InternalErrorMessageResponseMultiError) AllErrors() []error { return m } 409 | 410 | // InternalErrorMessageResponseValidationError is the validation error returned 411 | // by InternalErrorMessageResponse.Validate if the designated constraints 412 | // aren't met. 413 | type InternalErrorMessageResponseValidationError struct { 414 | field string 415 | reason string 416 | cause error 417 | key bool 418 | } 419 | 420 | // Field function returns field value. 421 | func (e InternalErrorMessageResponseValidationError) Field() string { return e.field } 422 | 423 | // Reason function returns reason value. 424 | func (e InternalErrorMessageResponseValidationError) Reason() string { return e.reason } 425 | 426 | // Cause function returns cause value. 427 | func (e InternalErrorMessageResponseValidationError) Cause() error { return e.cause } 428 | 429 | // Key function returns key value. 430 | func (e InternalErrorMessageResponseValidationError) Key() bool { return e.key } 431 | 432 | // ErrorName returns error name. 433 | func (e InternalErrorMessageResponseValidationError) ErrorName() string { 434 | return "InternalErrorMessageResponseValidationError" 435 | } 436 | 437 | // Error satisfies the builtin error interface 438 | func (e InternalErrorMessageResponseValidationError) Error() string { 439 | cause := "" 440 | if e.cause != nil { 441 | cause = fmt.Sprintf(" | caused by: %v", e.cause) 442 | } 443 | 444 | key := "" 445 | if e.key { 446 | key = "key for " 447 | } 448 | 449 | return fmt.Sprintf( 450 | "invalid %sInternalErrorMessageResponse.%s: %s%s", 451 | key, 452 | e.field, 453 | e.reason, 454 | cause) 455 | } 456 | 457 | var _ error = InternalErrorMessageResponseValidationError{} 458 | 459 | var _ interface { 460 | Field() string 461 | Reason() string 462 | Key() bool 463 | Cause() error 464 | ErrorName() string 465 | } = InternalErrorMessageResponseValidationError{} 466 | 467 | // Validate checks the field values on PathUnknownErrorMessageResponse with the 468 | // rules defined in the proto definition for this message. If any rules are 469 | // violated, the first error encountered is returned, or nil if there are no violations. 470 | func (m *PathUnknownErrorMessageResponse) Validate() error { 471 | return m.validate(false) 472 | } 473 | 474 | // ValidateAll checks the field values on PathUnknownErrorMessageResponse with 475 | // the rules defined in the proto definition for this message. If any rules 476 | // are violated, the result is a list of violation errors wrapped in 477 | // PathUnknownErrorMessageResponseMultiError, or nil if none found. 478 | func (m *PathUnknownErrorMessageResponse) ValidateAll() error { 479 | return m.validate(true) 480 | } 481 | 482 | func (m *PathUnknownErrorMessageResponse) validate(all bool) error { 483 | if m == nil { 484 | return nil 485 | } 486 | 487 | var errors []error 488 | 489 | // no validation rules for Code 490 | 491 | // no validation rules for Message 492 | 493 | if len(errors) > 0 { 494 | return PathUnknownErrorMessageResponseMultiError(errors) 495 | } 496 | 497 | return nil 498 | } 499 | 500 | // PathUnknownErrorMessageResponseMultiError is an error wrapping multiple 501 | // validation errors returned by PathUnknownErrorMessageResponse.ValidateAll() 502 | // if the designated constraints aren't met. 503 | type PathUnknownErrorMessageResponseMultiError []error 504 | 505 | // Error returns a concatenation of all the error messages it wraps. 506 | func (m PathUnknownErrorMessageResponseMultiError) Error() string { 507 | var msgs []string 508 | for _, err := range m { 509 | msgs = append(msgs, err.Error()) 510 | } 511 | return strings.Join(msgs, "; ") 512 | } 513 | 514 | // AllErrors returns a list of validation violation errors. 515 | func (m PathUnknownErrorMessageResponseMultiError) AllErrors() []error { return m } 516 | 517 | // PathUnknownErrorMessageResponseValidationError is the validation error 518 | // returned by PathUnknownErrorMessageResponse.Validate if the designated 519 | // constraints aren't met. 520 | type PathUnknownErrorMessageResponseValidationError struct { 521 | field string 522 | reason string 523 | cause error 524 | key bool 525 | } 526 | 527 | // Field function returns field value. 528 | func (e PathUnknownErrorMessageResponseValidationError) Field() string { return e.field } 529 | 530 | // Reason function returns reason value. 531 | func (e PathUnknownErrorMessageResponseValidationError) Reason() string { return e.reason } 532 | 533 | // Cause function returns cause value. 534 | func (e PathUnknownErrorMessageResponseValidationError) Cause() error { return e.cause } 535 | 536 | // Key function returns key value. 537 | func (e PathUnknownErrorMessageResponseValidationError) Key() bool { return e.key } 538 | 539 | // ErrorName returns error name. 540 | func (e PathUnknownErrorMessageResponseValidationError) ErrorName() string { 541 | return "PathUnknownErrorMessageResponseValidationError" 542 | } 543 | 544 | // Error satisfies the builtin error interface 545 | func (e PathUnknownErrorMessageResponseValidationError) Error() string { 546 | cause := "" 547 | if e.cause != nil { 548 | cause = fmt.Sprintf(" | caused by: %v", e.cause) 549 | } 550 | 551 | key := "" 552 | if e.key { 553 | key = "key for " 554 | } 555 | 556 | return fmt.Sprintf( 557 | "invalid %sPathUnknownErrorMessageResponse.%s: %s%s", 558 | key, 559 | e.field, 560 | e.reason, 561 | cause) 562 | } 563 | 564 | var _ error = PathUnknownErrorMessageResponseValidationError{} 565 | 566 | var _ interface { 567 | Field() string 568 | Reason() string 569 | Key() bool 570 | Cause() error 571 | ErrorName() string 572 | } = PathUnknownErrorMessageResponseValidationError{} 573 | 574 | // Validate checks the field values on AbortedMessageResponse with the rules 575 | // defined in the proto definition for this message. If any rules are 576 | // violated, the first error encountered is returned, or nil if there are no violations. 577 | func (m *AbortedMessageResponse) Validate() error { 578 | return m.validate(false) 579 | } 580 | 581 | // ValidateAll checks the field values on AbortedMessageResponse with the rules 582 | // defined in the proto definition for this message. If any rules are 583 | // violated, the result is a list of violation errors wrapped in 584 | // AbortedMessageResponseMultiError, or nil if none found. 585 | func (m *AbortedMessageResponse) ValidateAll() error { 586 | return m.validate(true) 587 | } 588 | 589 | func (m *AbortedMessageResponse) validate(all bool) error { 590 | if m == nil { 591 | return nil 592 | } 593 | 594 | var errors []error 595 | 596 | // no validation rules for Code 597 | 598 | // no validation rules for Message 599 | 600 | if len(errors) > 0 { 601 | return AbortedMessageResponseMultiError(errors) 602 | } 603 | 604 | return nil 605 | } 606 | 607 | // AbortedMessageResponseMultiError is an error wrapping multiple validation 608 | // errors returned by AbortedMessageResponse.ValidateAll() if the designated 609 | // constraints aren't met. 610 | type AbortedMessageResponseMultiError []error 611 | 612 | // Error returns a concatenation of all the error messages it wraps. 613 | func (m AbortedMessageResponseMultiError) Error() string { 614 | var msgs []string 615 | for _, err := range m { 616 | msgs = append(msgs, err.Error()) 617 | } 618 | return strings.Join(msgs, "; ") 619 | } 620 | 621 | // AllErrors returns a list of validation violation errors. 622 | func (m AbortedMessageResponseMultiError) AllErrors() []error { return m } 623 | 624 | // AbortedMessageResponseValidationError is the validation error returned by 625 | // AbortedMessageResponse.Validate if the designated constraints aren't met. 626 | type AbortedMessageResponseValidationError struct { 627 | field string 628 | reason string 629 | cause error 630 | key bool 631 | } 632 | 633 | // Field function returns field value. 634 | func (e AbortedMessageResponseValidationError) Field() string { return e.field } 635 | 636 | // Reason function returns reason value. 637 | func (e AbortedMessageResponseValidationError) Reason() string { return e.reason } 638 | 639 | // Cause function returns cause value. 640 | func (e AbortedMessageResponseValidationError) Cause() error { return e.cause } 641 | 642 | // Key function returns key value. 643 | func (e AbortedMessageResponseValidationError) Key() bool { return e.key } 644 | 645 | // ErrorName returns error name. 646 | func (e AbortedMessageResponseValidationError) ErrorName() string { 647 | return "AbortedMessageResponseValidationError" 648 | } 649 | 650 | // Error satisfies the builtin error interface 651 | func (e AbortedMessageResponseValidationError) Error() string { 652 | cause := "" 653 | if e.cause != nil { 654 | cause = fmt.Sprintf(" | caused by: %v", e.cause) 655 | } 656 | 657 | key := "" 658 | if e.key { 659 | key = "key for " 660 | } 661 | 662 | return fmt.Sprintf( 663 | "invalid %sAbortedMessageResponse.%s: %s%s", 664 | key, 665 | e.field, 666 | e.reason, 667 | cause) 668 | } 669 | 670 | var _ error = AbortedMessageResponseValidationError{} 671 | 672 | var _ interface { 673 | Field() string 674 | Reason() string 675 | Key() bool 676 | Cause() error 677 | ErrorName() string 678 | } = AbortedMessageResponseValidationError{} 679 | 680 | // Validate checks the field values on ErrorMessageRequest with the rules 681 | // defined in the proto definition for this message. If any rules are 682 | // violated, the first error encountered is returned, or nil if there are no violations. 683 | func (m *ErrorMessageRequest) Validate() error { 684 | return m.validate(false) 685 | } 686 | 687 | // ValidateAll checks the field values on ErrorMessageRequest with the rules 688 | // defined in the proto definition for this message. If any rules are 689 | // violated, the result is a list of violation errors wrapped in 690 | // ErrorMessageRequestMultiError, or nil if none found. 691 | func (m *ErrorMessageRequest) ValidateAll() error { 692 | return m.validate(true) 693 | } 694 | 695 | func (m *ErrorMessageRequest) validate(all bool) error { 696 | if m == nil { 697 | return nil 698 | } 699 | 700 | var errors []error 701 | 702 | if len(errors) > 0 { 703 | return ErrorMessageRequestMultiError(errors) 704 | } 705 | 706 | return nil 707 | } 708 | 709 | // ErrorMessageRequestMultiError is an error wrapping multiple validation 710 | // errors returned by ErrorMessageRequest.ValidateAll() if the designated 711 | // constraints aren't met. 712 | type ErrorMessageRequestMultiError []error 713 | 714 | // Error returns a concatenation of all the error messages it wraps. 715 | func (m ErrorMessageRequestMultiError) Error() string { 716 | var msgs []string 717 | for _, err := range m { 718 | msgs = append(msgs, err.Error()) 719 | } 720 | return strings.Join(msgs, "; ") 721 | } 722 | 723 | // AllErrors returns a list of validation violation errors. 724 | func (m ErrorMessageRequestMultiError) AllErrors() []error { return m } 725 | 726 | // ErrorMessageRequestValidationError is the validation error returned by 727 | // ErrorMessageRequest.Validate if the designated constraints aren't met. 728 | type ErrorMessageRequestValidationError struct { 729 | field string 730 | reason string 731 | cause error 732 | key bool 733 | } 734 | 735 | // Field function returns field value. 736 | func (e ErrorMessageRequestValidationError) Field() string { return e.field } 737 | 738 | // Reason function returns reason value. 739 | func (e ErrorMessageRequestValidationError) Reason() string { return e.reason } 740 | 741 | // Cause function returns cause value. 742 | func (e ErrorMessageRequestValidationError) Cause() error { return e.cause } 743 | 744 | // Key function returns key value. 745 | func (e ErrorMessageRequestValidationError) Key() bool { return e.key } 746 | 747 | // ErrorName returns error name. 748 | func (e ErrorMessageRequestValidationError) ErrorName() string { 749 | return "ErrorMessageRequestValidationError" 750 | } 751 | 752 | // Error satisfies the builtin error interface 753 | func (e ErrorMessageRequestValidationError) Error() string { 754 | cause := "" 755 | if e.cause != nil { 756 | cause = fmt.Sprintf(" | caused by: %v", e.cause) 757 | } 758 | 759 | key := "" 760 | if e.key { 761 | key = "key for " 762 | } 763 | 764 | return fmt.Sprintf( 765 | "invalid %sErrorMessageRequest.%s: %s%s", 766 | key, 767 | e.field, 768 | e.reason, 769 | cause) 770 | } 771 | 772 | var _ error = ErrorMessageRequestValidationError{} 773 | 774 | var _ interface { 775 | Field() string 776 | Reason() string 777 | Key() bool 778 | Cause() error 779 | ErrorName() string 780 | } = ErrorMessageRequestValidationError{} 781 | 782 | // Validate checks the field values on ForbiddenResponse with the rules defined 783 | // in the proto definition for this message. If any rules are violated, the 784 | // first error encountered is returned, or nil if there are no violations. 785 | func (m *ForbiddenResponse) Validate() error { 786 | return m.validate(false) 787 | } 788 | 789 | // ValidateAll checks the field values on ForbiddenResponse with the rules 790 | // defined in the proto definition for this message. If any rules are 791 | // violated, the result is a list of violation errors wrapped in 792 | // ForbiddenResponseMultiError, or nil if none found. 793 | func (m *ForbiddenResponse) ValidateAll() error { 794 | return m.validate(true) 795 | } 796 | 797 | func (m *ForbiddenResponse) validate(all bool) error { 798 | if m == nil { 799 | return nil 800 | } 801 | 802 | var errors []error 803 | 804 | // no validation rules for Code 805 | 806 | // no validation rules for Message 807 | 808 | if len(errors) > 0 { 809 | return ForbiddenResponseMultiError(errors) 810 | } 811 | 812 | return nil 813 | } 814 | 815 | // ForbiddenResponseMultiError is an error wrapping multiple validation errors 816 | // returned by ForbiddenResponse.ValidateAll() if the designated constraints 817 | // aren't met. 818 | type ForbiddenResponseMultiError []error 819 | 820 | // Error returns a concatenation of all the error messages it wraps. 821 | func (m ForbiddenResponseMultiError) Error() string { 822 | var msgs []string 823 | for _, err := range m { 824 | msgs = append(msgs, err.Error()) 825 | } 826 | return strings.Join(msgs, "; ") 827 | } 828 | 829 | // AllErrors returns a list of validation violation errors. 830 | func (m ForbiddenResponseMultiError) AllErrors() []error { return m } 831 | 832 | // ForbiddenResponseValidationError is the validation error returned by 833 | // ForbiddenResponse.Validate if the designated constraints aren't met. 834 | type ForbiddenResponseValidationError struct { 835 | field string 836 | reason string 837 | cause error 838 | key bool 839 | } 840 | 841 | // Field function returns field value. 842 | func (e ForbiddenResponseValidationError) Field() string { return e.field } 843 | 844 | // Reason function returns reason value. 845 | func (e ForbiddenResponseValidationError) Reason() string { return e.reason } 846 | 847 | // Cause function returns cause value. 848 | func (e ForbiddenResponseValidationError) Cause() error { return e.cause } 849 | 850 | // Key function returns key value. 851 | func (e ForbiddenResponseValidationError) Key() bool { return e.key } 852 | 853 | // ErrorName returns error name. 854 | func (e ForbiddenResponseValidationError) ErrorName() string { 855 | return "ForbiddenResponseValidationError" 856 | } 857 | 858 | // Error satisfies the builtin error interface 859 | func (e ForbiddenResponseValidationError) Error() string { 860 | cause := "" 861 | if e.cause != nil { 862 | cause = fmt.Sprintf(" | caused by: %v", e.cause) 863 | } 864 | 865 | key := "" 866 | if e.key { 867 | key = "key for " 868 | } 869 | 870 | return fmt.Sprintf( 871 | "invalid %sForbiddenResponse.%s: %s%s", 872 | key, 873 | e.field, 874 | e.reason, 875 | cause) 876 | } 877 | 878 | var _ error = ForbiddenResponseValidationError{} 879 | 880 | var _ interface { 881 | Field() string 882 | Reason() string 883 | Key() bool 884 | Cause() error 885 | ErrorName() string 886 | } = ForbiddenResponseValidationError{} 887 | -------------------------------------------------------------------------------- /proto/openfga/v1/openapi.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. DO NOT EDIT. 2 | // versions: 3 | // protoc-gen-go v1.34.0 4 | // protoc (unknown) 5 | // source: openfga/v1/openapi.proto 6 | 7 | package openfgav1 8 | 9 | import ( 10 | _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" 11 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 12 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 13 | reflect "reflect" 14 | ) 15 | 16 | const ( 17 | // Verify that this generated code is sufficiently up-to-date. 18 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 19 | // Verify that runtime/protoimpl is sufficiently up-to-date. 20 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 21 | ) 22 | 23 | var File_openfga_v1_openapi_proto protoreflect.FileDescriptor 24 | 25 | var file_openfga_v1_openapi_proto_rawDesc = []byte{ 26 | 0x0a, 0x18, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 27 | 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6f, 0x70, 0x65, 0x6e, 28 | 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 29 | 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 30 | 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 31 | 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0xc3, 0x08, 0x92, 0x41, 0xa5, 0x07, 0x12, 0x80, 0x02, 32 | 0x0a, 0x07, 0x4f, 0x70, 0x65, 0x6e, 0x46, 0x47, 0x41, 0x12, 0x75, 0x41, 0x20, 0x68, 0x69, 0x67, 33 | 0x68, 0x20, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x61, 0x6e, 34 | 0x64, 0x20, 0x66, 0x6c, 0x65, 0x78, 0x69, 0x62, 0x6c, 0x65, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 35 | 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 36 | 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x20, 0x62, 0x75, 0x69, 0x6c, 0x74, 37 | 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x20, 38 | 0x61, 0x6e, 0x64, 0x20, 0x69, 0x6e, 0x73, 0x70, 0x69, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 39 | 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x5a, 0x61, 0x6e, 0x7a, 0x69, 0x62, 0x61, 0x72, 0x2e, 40 | 0x22, 0x35, 0x0a, 0x07, 0x4f, 0x70, 0x65, 0x6e, 0x46, 0x47, 0x41, 0x12, 0x13, 0x68, 0x74, 0x74, 41 | 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x64, 0x65, 0x76, 42 | 0x1a, 0x15, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x40, 0x6f, 0x70, 0x65, 0x6e, 43 | 0x66, 0x67, 0x61, 0x2e, 0x64, 0x65, 0x76, 0x2a, 0x42, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 44 | 0x65, 0x2d, 0x32, 0x2e, 0x30, 0x12, 0x34, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 45 | 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 46 | 0x61, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 47 | 0x61, 0x69, 0x6e, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x03, 0x31, 0x2e, 0x78, 48 | 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 49 | 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 50 | 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x52, 0x5d, 0x0a, 0x03, 0x34, 0x30, 0x30, 0x12, 0x56, 51 | 0x0a, 0x24, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 52 | 0x20, 0x64, 0x75, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 53 | 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x12, 0x2e, 0x0a, 0x2c, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x65, 54 | 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 55 | 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 56 | 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x44, 0x0a, 0x03, 0x34, 0x30, 0x31, 0x12, 0x3d, 0x0a, 57 | 0x12, 0x4e, 0x6f, 0x74, 0x20, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 58 | 0x65, 0x64, 0x2e, 0x12, 0x27, 0x0a, 0x25, 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 59 | 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 60 | 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x36, 0x0a, 0x03, 61 | 0x34, 0x30, 0x33, 0x12, 0x2f, 0x0a, 0x0a, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 62 | 0x2e, 0x12, 0x21, 0x0a, 0x1f, 0x1a, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 63 | 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 64 | 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x5f, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x58, 0x0a, 0x25, 0x52, 65 | 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x64, 0x75, 66 | 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x20, 0x70, 67 | 0x61, 0x74, 0x68, 0x2e, 0x12, 0x2f, 0x0a, 0x2d, 0x1a, 0x2b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 68 | 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 69 | 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 70 | 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x60, 0x0a, 0x03, 0x34, 0x30, 0x39, 0x12, 0x59, 0x0a, 0x2f, 71 | 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x77, 0x61, 0x73, 0x20, 0x61, 0x62, 0x6f, 0x72, 72 | 0x74, 0x65, 0x64, 0x20, 0x64, 0x75, 0x65, 0x20, 0x61, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 73 | 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x2e, 0x12, 74 | 0x26, 0x0a, 0x24, 0x1a, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 75 | 0x2e, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 76 | 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x74, 0x0a, 0x03, 0x34, 0x32, 0x32, 0x12, 0x6d, 77 | 0x0a, 0x36, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x64, 0x20, 78 | 0x6f, 0x75, 0x74, 0x20, 0x64, 0x75, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x78, 0x63, 0x65, 0x73, 79 | 0x73, 0x69, 0x76, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x74, 0x68, 0x72, 80 | 0x6f, 0x74, 0x74, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x12, 0x33, 0x0a, 0x31, 0x1a, 0x2f, 0x2e, 0x6f, 81 | 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x70, 0x72, 0x6f, 0x63, 82 | 0x65, 0x73, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4d, 0x65, 83 | 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x63, 0x0a, 84 | 0x03, 0x35, 0x30, 0x30, 0x12, 0x5c, 0x0a, 0x2c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 85 | 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x64, 0x75, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 86 | 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x65, 0x72, 87 | 0x72, 0x6f, 0x72, 0x2e, 0x12, 0x2c, 0x0a, 0x2a, 0x1a, 0x28, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 88 | 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x72, 89 | 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 90 | 0x73, 0x65, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 91 | 0x76, 0x31, 0x42, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 92 | 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 93 | 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 94 | 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x65, 0x6e, 95 | 0x66, 0x67, 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x4f, 0x70, 96 | 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x66, 97 | 0x67, 0x61, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x4f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x5c, 98 | 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 99 | 0x0b, 0x4f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 100 | 0x6f, 0x74, 0x6f, 0x33, 101 | } 102 | 103 | var file_openfga_v1_openapi_proto_goTypes = []interface{}{} 104 | var file_openfga_v1_openapi_proto_depIdxs = []int32{ 105 | 0, // [0:0] is the sub-list for method output_type 106 | 0, // [0:0] is the sub-list for method input_type 107 | 0, // [0:0] is the sub-list for extension type_name 108 | 0, // [0:0] is the sub-list for extension extendee 109 | 0, // [0:0] is the sub-list for field type_name 110 | } 111 | 112 | func init() { file_openfga_v1_openapi_proto_init() } 113 | func file_openfga_v1_openapi_proto_init() { 114 | if File_openfga_v1_openapi_proto != nil { 115 | return 116 | } 117 | type x struct{} 118 | out := protoimpl.TypeBuilder{ 119 | File: protoimpl.DescBuilder{ 120 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 121 | RawDescriptor: file_openfga_v1_openapi_proto_rawDesc, 122 | NumEnums: 0, 123 | NumMessages: 0, 124 | NumExtensions: 0, 125 | NumServices: 0, 126 | }, 127 | GoTypes: file_openfga_v1_openapi_proto_goTypes, 128 | DependencyIndexes: file_openfga_v1_openapi_proto_depIdxs, 129 | }.Build() 130 | File_openfga_v1_openapi_proto = out.File 131 | file_openfga_v1_openapi_proto_rawDesc = nil 132 | file_openfga_v1_openapi_proto_goTypes = nil 133 | file_openfga_v1_openapi_proto_depIdxs = nil 134 | } 135 | -------------------------------------------------------------------------------- /proto/openfga/v1/openapi.pb.validate.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-validate. DO NOT EDIT. 2 | // source: openfga/v1/openapi.proto 3 | 4 | package openfgav1 5 | 6 | import ( 7 | "bytes" 8 | "errors" 9 | "fmt" 10 | "net" 11 | "net/mail" 12 | "net/url" 13 | "regexp" 14 | "sort" 15 | "strings" 16 | "time" 17 | "unicode/utf8" 18 | 19 | "google.golang.org/protobuf/types/known/anypb" 20 | ) 21 | 22 | // ensure the imports are used 23 | var ( 24 | _ = bytes.MinRead 25 | _ = errors.New("") 26 | _ = fmt.Print 27 | _ = utf8.UTFMax 28 | _ = (*regexp.Regexp)(nil) 29 | _ = (*strings.Reader)(nil) 30 | _ = net.IPv4len 31 | _ = time.Duration(0) 32 | _ = (*url.URL)(nil) 33 | _ = (*mail.Address)(nil) 34 | _ = anypb.Any{} 35 | _ = sort.Sort 36 | ) 37 | -------------------------------------------------------------------------------- /proto/openfga/v1/openfga_service_consistency.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. DO NOT EDIT. 2 | // versions: 3 | // protoc-gen-go v1.34.0 4 | // protoc (unknown) 5 | // source: openfga/v1/openfga_service_consistency.proto 6 | 7 | package openfgav1 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 12 | reflect "reflect" 13 | sync "sync" 14 | ) 15 | 16 | const ( 17 | // Verify that this generated code is sufficiently up-to-date. 18 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 19 | // Verify that runtime/protoimpl is sufficiently up-to-date. 20 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 21 | ) 22 | 23 | // Controls the consistency preferences when calling the query APIs. 24 | type ConsistencyPreference int32 25 | 26 | const ( 27 | // Default if not set. Behavior will be the same as MINIMIZE_LATENCY. 28 | ConsistencyPreference_UNSPECIFIED ConsistencyPreference = 0 29 | // Minimize latency at the potential expense of lower consistency. 30 | ConsistencyPreference_MINIMIZE_LATENCY ConsistencyPreference = 100 31 | // Prefer higher consistency, at the potential expense of increased latency. 32 | ConsistencyPreference_HIGHER_CONSISTENCY ConsistencyPreference = 200 33 | ) 34 | 35 | // Enum value maps for ConsistencyPreference. 36 | var ( 37 | ConsistencyPreference_name = map[int32]string{ 38 | 0: "UNSPECIFIED", 39 | 100: "MINIMIZE_LATENCY", 40 | 200: "HIGHER_CONSISTENCY", 41 | } 42 | ConsistencyPreference_value = map[string]int32{ 43 | "UNSPECIFIED": 0, 44 | "MINIMIZE_LATENCY": 100, 45 | "HIGHER_CONSISTENCY": 200, 46 | } 47 | ) 48 | 49 | func (x ConsistencyPreference) Enum() *ConsistencyPreference { 50 | p := new(ConsistencyPreference) 51 | *p = x 52 | return p 53 | } 54 | 55 | func (x ConsistencyPreference) String() string { 56 | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 57 | } 58 | 59 | func (ConsistencyPreference) Descriptor() protoreflect.EnumDescriptor { 60 | return file_openfga_v1_openfga_service_consistency_proto_enumTypes[0].Descriptor() 61 | } 62 | 63 | func (ConsistencyPreference) Type() protoreflect.EnumType { 64 | return &file_openfga_v1_openfga_service_consistency_proto_enumTypes[0] 65 | } 66 | 67 | func (x ConsistencyPreference) Number() protoreflect.EnumNumber { 68 | return protoreflect.EnumNumber(x) 69 | } 70 | 71 | // Deprecated: Use ConsistencyPreference.Descriptor instead. 72 | func (ConsistencyPreference) EnumDescriptor() ([]byte, []int) { 73 | return file_openfga_v1_openfga_service_consistency_proto_rawDescGZIP(), []int{0} 74 | } 75 | 76 | var File_openfga_v1_openfga_service_consistency_proto protoreflect.FileDescriptor 77 | 78 | var file_openfga_v1_openfga_service_consistency_proto_rawDesc = []byte{ 79 | 0x0a, 0x2c, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 80 | 0x6e, 0x66, 0x67, 0x61, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 81 | 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 82 | 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2a, 0x57, 0x0a, 0x15, 0x43, 0x6f, 83 | 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 84 | 0x6e, 0x63, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 85 | 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x49, 0x4e, 0x49, 0x4d, 0x49, 0x5a, 0x45, 86 | 0x5f, 0x4c, 0x41, 0x54, 0x45, 0x4e, 0x43, 0x59, 0x10, 0x64, 0x12, 0x17, 0x0a, 0x12, 0x48, 0x49, 87 | 0x47, 0x48, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x43, 0x59, 88 | 0x10, 0xc8, 0x01, 0x42, 0xac, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 89 | 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x1e, 0x4f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x53, 90 | 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 91 | 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 92 | 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, 0x61, 0x70, 0x69, 93 | 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, 0x76, 94 | 0x31, 0x3b, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, 95 | 0x58, 0xaa, 0x02, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 96 | 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x4f, 0x70, 97 | 0x65, 0x6e, 0x66, 0x67, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 98 | 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x4f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x3a, 0x3a, 99 | 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 100 | } 101 | 102 | var ( 103 | file_openfga_v1_openfga_service_consistency_proto_rawDescOnce sync.Once 104 | file_openfga_v1_openfga_service_consistency_proto_rawDescData = file_openfga_v1_openfga_service_consistency_proto_rawDesc 105 | ) 106 | 107 | func file_openfga_v1_openfga_service_consistency_proto_rawDescGZIP() []byte { 108 | file_openfga_v1_openfga_service_consistency_proto_rawDescOnce.Do(func() { 109 | file_openfga_v1_openfga_service_consistency_proto_rawDescData = protoimpl.X.CompressGZIP(file_openfga_v1_openfga_service_consistency_proto_rawDescData) 110 | }) 111 | return file_openfga_v1_openfga_service_consistency_proto_rawDescData 112 | } 113 | 114 | var file_openfga_v1_openfga_service_consistency_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 115 | var file_openfga_v1_openfga_service_consistency_proto_goTypes = []interface{}{ 116 | (ConsistencyPreference)(0), // 0: openfga.v1.ConsistencyPreference 117 | } 118 | var file_openfga_v1_openfga_service_consistency_proto_depIdxs = []int32{ 119 | 0, // [0:0] is the sub-list for method output_type 120 | 0, // [0:0] is the sub-list for method input_type 121 | 0, // [0:0] is the sub-list for extension type_name 122 | 0, // [0:0] is the sub-list for extension extendee 123 | 0, // [0:0] is the sub-list for field type_name 124 | } 125 | 126 | func init() { file_openfga_v1_openfga_service_consistency_proto_init() } 127 | func file_openfga_v1_openfga_service_consistency_proto_init() { 128 | if File_openfga_v1_openfga_service_consistency_proto != nil { 129 | return 130 | } 131 | type x struct{} 132 | out := protoimpl.TypeBuilder{ 133 | File: protoimpl.DescBuilder{ 134 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 135 | RawDescriptor: file_openfga_v1_openfga_service_consistency_proto_rawDesc, 136 | NumEnums: 1, 137 | NumMessages: 0, 138 | NumExtensions: 0, 139 | NumServices: 0, 140 | }, 141 | GoTypes: file_openfga_v1_openfga_service_consistency_proto_goTypes, 142 | DependencyIndexes: file_openfga_v1_openfga_service_consistency_proto_depIdxs, 143 | EnumInfos: file_openfga_v1_openfga_service_consistency_proto_enumTypes, 144 | }.Build() 145 | File_openfga_v1_openfga_service_consistency_proto = out.File 146 | file_openfga_v1_openfga_service_consistency_proto_rawDesc = nil 147 | file_openfga_v1_openfga_service_consistency_proto_goTypes = nil 148 | file_openfga_v1_openfga_service_consistency_proto_depIdxs = nil 149 | } 150 | -------------------------------------------------------------------------------- /proto/openfga/v1/openfga_service_consistency.pb.validate.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-validate. DO NOT EDIT. 2 | // source: openfga/v1/openfga_service_consistency.proto 3 | 4 | package openfgav1 5 | 6 | import ( 7 | "bytes" 8 | "errors" 9 | "fmt" 10 | "net" 11 | "net/mail" 12 | "net/url" 13 | "regexp" 14 | "sort" 15 | "strings" 16 | "time" 17 | "unicode/utf8" 18 | 19 | "google.golang.org/protobuf/types/known/anypb" 20 | ) 21 | 22 | // ensure the imports are used 23 | var ( 24 | _ = bytes.MinRead 25 | _ = errors.New("") 26 | _ = fmt.Print 27 | _ = utf8.UTFMax 28 | _ = (*regexp.Regexp)(nil) 29 | _ = (*strings.Reader)(nil) 30 | _ = net.IPv4len 31 | _ = time.Duration(0) 32 | _ = (*url.URL)(nil) 33 | _ = (*mail.Address)(nil) 34 | _ = anypb.Any{} 35 | _ = sort.Sort 36 | ) 37 | -------------------------------------------------------------------------------- /proto/openfga/v1/openfga_service_grpc.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 | // versions: 3 | // - protoc-gen-go-grpc v1.3.0 4 | // - protoc (unknown) 5 | // source: openfga/v1/openfga_service.proto 6 | 7 | package openfgav1 8 | 9 | import ( 10 | context "context" 11 | grpc "google.golang.org/grpc" 12 | codes "google.golang.org/grpc/codes" 13 | status "google.golang.org/grpc/status" 14 | ) 15 | 16 | // This is a compile-time assertion to ensure that this generated file 17 | // is compatible with the grpc package it is being compiled against. 18 | // Requires gRPC-Go v1.32.0 or later. 19 | const _ = grpc.SupportPackageIsVersion7 20 | 21 | const ( 22 | OpenFGAService_Read_FullMethodName = "/openfga.v1.OpenFGAService/Read" 23 | OpenFGAService_Write_FullMethodName = "/openfga.v1.OpenFGAService/Write" 24 | OpenFGAService_Check_FullMethodName = "/openfga.v1.OpenFGAService/Check" 25 | OpenFGAService_BatchCheck_FullMethodName = "/openfga.v1.OpenFGAService/BatchCheck" 26 | OpenFGAService_Expand_FullMethodName = "/openfga.v1.OpenFGAService/Expand" 27 | OpenFGAService_ReadAuthorizationModels_FullMethodName = "/openfga.v1.OpenFGAService/ReadAuthorizationModels" 28 | OpenFGAService_ReadAuthorizationModel_FullMethodName = "/openfga.v1.OpenFGAService/ReadAuthorizationModel" 29 | OpenFGAService_WriteAuthorizationModel_FullMethodName = "/openfga.v1.OpenFGAService/WriteAuthorizationModel" 30 | OpenFGAService_WriteAssertions_FullMethodName = "/openfga.v1.OpenFGAService/WriteAssertions" 31 | OpenFGAService_ReadAssertions_FullMethodName = "/openfga.v1.OpenFGAService/ReadAssertions" 32 | OpenFGAService_ReadChanges_FullMethodName = "/openfga.v1.OpenFGAService/ReadChanges" 33 | OpenFGAService_CreateStore_FullMethodName = "/openfga.v1.OpenFGAService/CreateStore" 34 | OpenFGAService_UpdateStore_FullMethodName = "/openfga.v1.OpenFGAService/UpdateStore" 35 | OpenFGAService_DeleteStore_FullMethodName = "/openfga.v1.OpenFGAService/DeleteStore" 36 | OpenFGAService_GetStore_FullMethodName = "/openfga.v1.OpenFGAService/GetStore" 37 | OpenFGAService_ListStores_FullMethodName = "/openfga.v1.OpenFGAService/ListStores" 38 | OpenFGAService_StreamedListObjects_FullMethodName = "/openfga.v1.OpenFGAService/StreamedListObjects" 39 | OpenFGAService_ListObjects_FullMethodName = "/openfga.v1.OpenFGAService/ListObjects" 40 | OpenFGAService_ListUsers_FullMethodName = "/openfga.v1.OpenFGAService/ListUsers" 41 | ) 42 | 43 | // OpenFGAServiceClient is the client API for OpenFGAService service. 44 | // 45 | // 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. 46 | type OpenFGAServiceClient interface { 47 | Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) 48 | Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) 49 | Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) 50 | BatchCheck(ctx context.Context, in *BatchCheckRequest, opts ...grpc.CallOption) (*BatchCheckResponse, error) 51 | Expand(ctx context.Context, in *ExpandRequest, opts ...grpc.CallOption) (*ExpandResponse, error) 52 | ReadAuthorizationModels(ctx context.Context, in *ReadAuthorizationModelsRequest, opts ...grpc.CallOption) (*ReadAuthorizationModelsResponse, error) 53 | ReadAuthorizationModel(ctx context.Context, in *ReadAuthorizationModelRequest, opts ...grpc.CallOption) (*ReadAuthorizationModelResponse, error) 54 | WriteAuthorizationModel(ctx context.Context, in *WriteAuthorizationModelRequest, opts ...grpc.CallOption) (*WriteAuthorizationModelResponse, error) 55 | WriteAssertions(ctx context.Context, in *WriteAssertionsRequest, opts ...grpc.CallOption) (*WriteAssertionsResponse, error) 56 | ReadAssertions(ctx context.Context, in *ReadAssertionsRequest, opts ...grpc.CallOption) (*ReadAssertionsResponse, error) 57 | ReadChanges(ctx context.Context, in *ReadChangesRequest, opts ...grpc.CallOption) (*ReadChangesResponse, error) 58 | CreateStore(ctx context.Context, in *CreateStoreRequest, opts ...grpc.CallOption) (*CreateStoreResponse, error) 59 | UpdateStore(ctx context.Context, in *UpdateStoreRequest, opts ...grpc.CallOption) (*UpdateStoreResponse, error) 60 | DeleteStore(ctx context.Context, in *DeleteStoreRequest, opts ...grpc.CallOption) (*DeleteStoreResponse, error) 61 | GetStore(ctx context.Context, in *GetStoreRequest, opts ...grpc.CallOption) (*GetStoreResponse, error) 62 | ListStores(ctx context.Context, in *ListStoresRequest, opts ...grpc.CallOption) (*ListStoresResponse, error) 63 | StreamedListObjects(ctx context.Context, in *StreamedListObjectsRequest, opts ...grpc.CallOption) (OpenFGAService_StreamedListObjectsClient, error) 64 | ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error) 65 | ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) 66 | } 67 | 68 | type openFGAServiceClient struct { 69 | cc grpc.ClientConnInterface 70 | } 71 | 72 | func NewOpenFGAServiceClient(cc grpc.ClientConnInterface) OpenFGAServiceClient { 73 | return &openFGAServiceClient{cc} 74 | } 75 | 76 | func (c *openFGAServiceClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) { 77 | out := new(ReadResponse) 78 | err := c.cc.Invoke(ctx, OpenFGAService_Read_FullMethodName, in, out, opts...) 79 | if err != nil { 80 | return nil, err 81 | } 82 | return out, nil 83 | } 84 | 85 | func (c *openFGAServiceClient) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) { 86 | out := new(WriteResponse) 87 | err := c.cc.Invoke(ctx, OpenFGAService_Write_FullMethodName, in, out, opts...) 88 | if err != nil { 89 | return nil, err 90 | } 91 | return out, nil 92 | } 93 | 94 | func (c *openFGAServiceClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) { 95 | out := new(CheckResponse) 96 | err := c.cc.Invoke(ctx, OpenFGAService_Check_FullMethodName, in, out, opts...) 97 | if err != nil { 98 | return nil, err 99 | } 100 | return out, nil 101 | } 102 | 103 | func (c *openFGAServiceClient) BatchCheck(ctx context.Context, in *BatchCheckRequest, opts ...grpc.CallOption) (*BatchCheckResponse, error) { 104 | out := new(BatchCheckResponse) 105 | err := c.cc.Invoke(ctx, OpenFGAService_BatchCheck_FullMethodName, in, out, opts...) 106 | if err != nil { 107 | return nil, err 108 | } 109 | return out, nil 110 | } 111 | 112 | func (c *openFGAServiceClient) Expand(ctx context.Context, in *ExpandRequest, opts ...grpc.CallOption) (*ExpandResponse, error) { 113 | out := new(ExpandResponse) 114 | err := c.cc.Invoke(ctx, OpenFGAService_Expand_FullMethodName, in, out, opts...) 115 | if err != nil { 116 | return nil, err 117 | } 118 | return out, nil 119 | } 120 | 121 | func (c *openFGAServiceClient) ReadAuthorizationModels(ctx context.Context, in *ReadAuthorizationModelsRequest, opts ...grpc.CallOption) (*ReadAuthorizationModelsResponse, error) { 122 | out := new(ReadAuthorizationModelsResponse) 123 | err := c.cc.Invoke(ctx, OpenFGAService_ReadAuthorizationModels_FullMethodName, in, out, opts...) 124 | if err != nil { 125 | return nil, err 126 | } 127 | return out, nil 128 | } 129 | 130 | func (c *openFGAServiceClient) ReadAuthorizationModel(ctx context.Context, in *ReadAuthorizationModelRequest, opts ...grpc.CallOption) (*ReadAuthorizationModelResponse, error) { 131 | out := new(ReadAuthorizationModelResponse) 132 | err := c.cc.Invoke(ctx, OpenFGAService_ReadAuthorizationModel_FullMethodName, in, out, opts...) 133 | if err != nil { 134 | return nil, err 135 | } 136 | return out, nil 137 | } 138 | 139 | func (c *openFGAServiceClient) WriteAuthorizationModel(ctx context.Context, in *WriteAuthorizationModelRequest, opts ...grpc.CallOption) (*WriteAuthorizationModelResponse, error) { 140 | out := new(WriteAuthorizationModelResponse) 141 | err := c.cc.Invoke(ctx, OpenFGAService_WriteAuthorizationModel_FullMethodName, in, out, opts...) 142 | if err != nil { 143 | return nil, err 144 | } 145 | return out, nil 146 | } 147 | 148 | func (c *openFGAServiceClient) WriteAssertions(ctx context.Context, in *WriteAssertionsRequest, opts ...grpc.CallOption) (*WriteAssertionsResponse, error) { 149 | out := new(WriteAssertionsResponse) 150 | err := c.cc.Invoke(ctx, OpenFGAService_WriteAssertions_FullMethodName, in, out, opts...) 151 | if err != nil { 152 | return nil, err 153 | } 154 | return out, nil 155 | } 156 | 157 | func (c *openFGAServiceClient) ReadAssertions(ctx context.Context, in *ReadAssertionsRequest, opts ...grpc.CallOption) (*ReadAssertionsResponse, error) { 158 | out := new(ReadAssertionsResponse) 159 | err := c.cc.Invoke(ctx, OpenFGAService_ReadAssertions_FullMethodName, in, out, opts...) 160 | if err != nil { 161 | return nil, err 162 | } 163 | return out, nil 164 | } 165 | 166 | func (c *openFGAServiceClient) ReadChanges(ctx context.Context, in *ReadChangesRequest, opts ...grpc.CallOption) (*ReadChangesResponse, error) { 167 | out := new(ReadChangesResponse) 168 | err := c.cc.Invoke(ctx, OpenFGAService_ReadChanges_FullMethodName, in, out, opts...) 169 | if err != nil { 170 | return nil, err 171 | } 172 | return out, nil 173 | } 174 | 175 | func (c *openFGAServiceClient) CreateStore(ctx context.Context, in *CreateStoreRequest, opts ...grpc.CallOption) (*CreateStoreResponse, error) { 176 | out := new(CreateStoreResponse) 177 | err := c.cc.Invoke(ctx, OpenFGAService_CreateStore_FullMethodName, in, out, opts...) 178 | if err != nil { 179 | return nil, err 180 | } 181 | return out, nil 182 | } 183 | 184 | func (c *openFGAServiceClient) UpdateStore(ctx context.Context, in *UpdateStoreRequest, opts ...grpc.CallOption) (*UpdateStoreResponse, error) { 185 | out := new(UpdateStoreResponse) 186 | err := c.cc.Invoke(ctx, OpenFGAService_UpdateStore_FullMethodName, in, out, opts...) 187 | if err != nil { 188 | return nil, err 189 | } 190 | return out, nil 191 | } 192 | 193 | func (c *openFGAServiceClient) DeleteStore(ctx context.Context, in *DeleteStoreRequest, opts ...grpc.CallOption) (*DeleteStoreResponse, error) { 194 | out := new(DeleteStoreResponse) 195 | err := c.cc.Invoke(ctx, OpenFGAService_DeleteStore_FullMethodName, in, out, opts...) 196 | if err != nil { 197 | return nil, err 198 | } 199 | return out, nil 200 | } 201 | 202 | func (c *openFGAServiceClient) GetStore(ctx context.Context, in *GetStoreRequest, opts ...grpc.CallOption) (*GetStoreResponse, error) { 203 | out := new(GetStoreResponse) 204 | err := c.cc.Invoke(ctx, OpenFGAService_GetStore_FullMethodName, in, out, opts...) 205 | if err != nil { 206 | return nil, err 207 | } 208 | return out, nil 209 | } 210 | 211 | func (c *openFGAServiceClient) ListStores(ctx context.Context, in *ListStoresRequest, opts ...grpc.CallOption) (*ListStoresResponse, error) { 212 | out := new(ListStoresResponse) 213 | err := c.cc.Invoke(ctx, OpenFGAService_ListStores_FullMethodName, in, out, opts...) 214 | if err != nil { 215 | return nil, err 216 | } 217 | return out, nil 218 | } 219 | 220 | func (c *openFGAServiceClient) StreamedListObjects(ctx context.Context, in *StreamedListObjectsRequest, opts ...grpc.CallOption) (OpenFGAService_StreamedListObjectsClient, error) { 221 | stream, err := c.cc.NewStream(ctx, &OpenFGAService_ServiceDesc.Streams[0], OpenFGAService_StreamedListObjects_FullMethodName, opts...) 222 | if err != nil { 223 | return nil, err 224 | } 225 | x := &openFGAServiceStreamedListObjectsClient{stream} 226 | if err := x.ClientStream.SendMsg(in); err != nil { 227 | return nil, err 228 | } 229 | if err := x.ClientStream.CloseSend(); err != nil { 230 | return nil, err 231 | } 232 | return x, nil 233 | } 234 | 235 | type OpenFGAService_StreamedListObjectsClient interface { 236 | Recv() (*StreamedListObjectsResponse, error) 237 | grpc.ClientStream 238 | } 239 | 240 | type openFGAServiceStreamedListObjectsClient struct { 241 | grpc.ClientStream 242 | } 243 | 244 | func (x *openFGAServiceStreamedListObjectsClient) Recv() (*StreamedListObjectsResponse, error) { 245 | m := new(StreamedListObjectsResponse) 246 | if err := x.ClientStream.RecvMsg(m); err != nil { 247 | return nil, err 248 | } 249 | return m, nil 250 | } 251 | 252 | func (c *openFGAServiceClient) ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error) { 253 | out := new(ListObjectsResponse) 254 | err := c.cc.Invoke(ctx, OpenFGAService_ListObjects_FullMethodName, in, out, opts...) 255 | if err != nil { 256 | return nil, err 257 | } 258 | return out, nil 259 | } 260 | 261 | func (c *openFGAServiceClient) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) { 262 | out := new(ListUsersResponse) 263 | err := c.cc.Invoke(ctx, OpenFGAService_ListUsers_FullMethodName, in, out, opts...) 264 | if err != nil { 265 | return nil, err 266 | } 267 | return out, nil 268 | } 269 | 270 | // OpenFGAServiceServer is the server API for OpenFGAService service. 271 | // All implementations must embed UnimplementedOpenFGAServiceServer 272 | // for forward compatibility 273 | type OpenFGAServiceServer interface { 274 | Read(context.Context, *ReadRequest) (*ReadResponse, error) 275 | Write(context.Context, *WriteRequest) (*WriteResponse, error) 276 | Check(context.Context, *CheckRequest) (*CheckResponse, error) 277 | BatchCheck(context.Context, *BatchCheckRequest) (*BatchCheckResponse, error) 278 | Expand(context.Context, *ExpandRequest) (*ExpandResponse, error) 279 | ReadAuthorizationModels(context.Context, *ReadAuthorizationModelsRequest) (*ReadAuthorizationModelsResponse, error) 280 | ReadAuthorizationModel(context.Context, *ReadAuthorizationModelRequest) (*ReadAuthorizationModelResponse, error) 281 | WriteAuthorizationModel(context.Context, *WriteAuthorizationModelRequest) (*WriteAuthorizationModelResponse, error) 282 | WriteAssertions(context.Context, *WriteAssertionsRequest) (*WriteAssertionsResponse, error) 283 | ReadAssertions(context.Context, *ReadAssertionsRequest) (*ReadAssertionsResponse, error) 284 | ReadChanges(context.Context, *ReadChangesRequest) (*ReadChangesResponse, error) 285 | CreateStore(context.Context, *CreateStoreRequest) (*CreateStoreResponse, error) 286 | UpdateStore(context.Context, *UpdateStoreRequest) (*UpdateStoreResponse, error) 287 | DeleteStore(context.Context, *DeleteStoreRequest) (*DeleteStoreResponse, error) 288 | GetStore(context.Context, *GetStoreRequest) (*GetStoreResponse, error) 289 | ListStores(context.Context, *ListStoresRequest) (*ListStoresResponse, error) 290 | StreamedListObjects(*StreamedListObjectsRequest, OpenFGAService_StreamedListObjectsServer) error 291 | ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error) 292 | ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) 293 | mustEmbedUnimplementedOpenFGAServiceServer() 294 | } 295 | 296 | // UnimplementedOpenFGAServiceServer must be embedded to have forward compatible implementations. 297 | type UnimplementedOpenFGAServiceServer struct { 298 | } 299 | 300 | func (UnimplementedOpenFGAServiceServer) Read(context.Context, *ReadRequest) (*ReadResponse, error) { 301 | return nil, status.Errorf(codes.Unimplemented, "method Read not implemented") 302 | } 303 | func (UnimplementedOpenFGAServiceServer) Write(context.Context, *WriteRequest) (*WriteResponse, error) { 304 | return nil, status.Errorf(codes.Unimplemented, "method Write not implemented") 305 | } 306 | func (UnimplementedOpenFGAServiceServer) Check(context.Context, *CheckRequest) (*CheckResponse, error) { 307 | return nil, status.Errorf(codes.Unimplemented, "method Check not implemented") 308 | } 309 | func (UnimplementedOpenFGAServiceServer) BatchCheck(context.Context, *BatchCheckRequest) (*BatchCheckResponse, error) { 310 | return nil, status.Errorf(codes.Unimplemented, "method BatchCheck not implemented") 311 | } 312 | func (UnimplementedOpenFGAServiceServer) Expand(context.Context, *ExpandRequest) (*ExpandResponse, error) { 313 | return nil, status.Errorf(codes.Unimplemented, "method Expand not implemented") 314 | } 315 | func (UnimplementedOpenFGAServiceServer) ReadAuthorizationModels(context.Context, *ReadAuthorizationModelsRequest) (*ReadAuthorizationModelsResponse, error) { 316 | return nil, status.Errorf(codes.Unimplemented, "method ReadAuthorizationModels not implemented") 317 | } 318 | func (UnimplementedOpenFGAServiceServer) ReadAuthorizationModel(context.Context, *ReadAuthorizationModelRequest) (*ReadAuthorizationModelResponse, error) { 319 | return nil, status.Errorf(codes.Unimplemented, "method ReadAuthorizationModel not implemented") 320 | } 321 | func (UnimplementedOpenFGAServiceServer) WriteAuthorizationModel(context.Context, *WriteAuthorizationModelRequest) (*WriteAuthorizationModelResponse, error) { 322 | return nil, status.Errorf(codes.Unimplemented, "method WriteAuthorizationModel not implemented") 323 | } 324 | func (UnimplementedOpenFGAServiceServer) WriteAssertions(context.Context, *WriteAssertionsRequest) (*WriteAssertionsResponse, error) { 325 | return nil, status.Errorf(codes.Unimplemented, "method WriteAssertions not implemented") 326 | } 327 | func (UnimplementedOpenFGAServiceServer) ReadAssertions(context.Context, *ReadAssertionsRequest) (*ReadAssertionsResponse, error) { 328 | return nil, status.Errorf(codes.Unimplemented, "method ReadAssertions not implemented") 329 | } 330 | func (UnimplementedOpenFGAServiceServer) ReadChanges(context.Context, *ReadChangesRequest) (*ReadChangesResponse, error) { 331 | return nil, status.Errorf(codes.Unimplemented, "method ReadChanges not implemented") 332 | } 333 | func (UnimplementedOpenFGAServiceServer) CreateStore(context.Context, *CreateStoreRequest) (*CreateStoreResponse, error) { 334 | return nil, status.Errorf(codes.Unimplemented, "method CreateStore not implemented") 335 | } 336 | func (UnimplementedOpenFGAServiceServer) UpdateStore(context.Context, *UpdateStoreRequest) (*UpdateStoreResponse, error) { 337 | return nil, status.Errorf(codes.Unimplemented, "method UpdateStore not implemented") 338 | } 339 | func (UnimplementedOpenFGAServiceServer) DeleteStore(context.Context, *DeleteStoreRequest) (*DeleteStoreResponse, error) { 340 | return nil, status.Errorf(codes.Unimplemented, "method DeleteStore not implemented") 341 | } 342 | func (UnimplementedOpenFGAServiceServer) GetStore(context.Context, *GetStoreRequest) (*GetStoreResponse, error) { 343 | return nil, status.Errorf(codes.Unimplemented, "method GetStore not implemented") 344 | } 345 | func (UnimplementedOpenFGAServiceServer) ListStores(context.Context, *ListStoresRequest) (*ListStoresResponse, error) { 346 | return nil, status.Errorf(codes.Unimplemented, "method ListStores not implemented") 347 | } 348 | func (UnimplementedOpenFGAServiceServer) StreamedListObjects(*StreamedListObjectsRequest, OpenFGAService_StreamedListObjectsServer) error { 349 | return status.Errorf(codes.Unimplemented, "method StreamedListObjects not implemented") 350 | } 351 | func (UnimplementedOpenFGAServiceServer) ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error) { 352 | return nil, status.Errorf(codes.Unimplemented, "method ListObjects not implemented") 353 | } 354 | func (UnimplementedOpenFGAServiceServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) { 355 | return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented") 356 | } 357 | func (UnimplementedOpenFGAServiceServer) mustEmbedUnimplementedOpenFGAServiceServer() {} 358 | 359 | // UnsafeOpenFGAServiceServer may be embedded to opt out of forward compatibility for this service. 360 | // Use of this interface is not recommended, as added methods to OpenFGAServiceServer will 361 | // result in compilation errors. 362 | type UnsafeOpenFGAServiceServer interface { 363 | mustEmbedUnimplementedOpenFGAServiceServer() 364 | } 365 | 366 | func RegisterOpenFGAServiceServer(s grpc.ServiceRegistrar, srv OpenFGAServiceServer) { 367 | s.RegisterService(&OpenFGAService_ServiceDesc, srv) 368 | } 369 | 370 | func _OpenFGAService_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 371 | in := new(ReadRequest) 372 | if err := dec(in); err != nil { 373 | return nil, err 374 | } 375 | if interceptor == nil { 376 | return srv.(OpenFGAServiceServer).Read(ctx, in) 377 | } 378 | info := &grpc.UnaryServerInfo{ 379 | Server: srv, 380 | FullMethod: OpenFGAService_Read_FullMethodName, 381 | } 382 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 383 | return srv.(OpenFGAServiceServer).Read(ctx, req.(*ReadRequest)) 384 | } 385 | return interceptor(ctx, in, info, handler) 386 | } 387 | 388 | func _OpenFGAService_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 389 | in := new(WriteRequest) 390 | if err := dec(in); err != nil { 391 | return nil, err 392 | } 393 | if interceptor == nil { 394 | return srv.(OpenFGAServiceServer).Write(ctx, in) 395 | } 396 | info := &grpc.UnaryServerInfo{ 397 | Server: srv, 398 | FullMethod: OpenFGAService_Write_FullMethodName, 399 | } 400 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 401 | return srv.(OpenFGAServiceServer).Write(ctx, req.(*WriteRequest)) 402 | } 403 | return interceptor(ctx, in, info, handler) 404 | } 405 | 406 | func _OpenFGAService_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 407 | in := new(CheckRequest) 408 | if err := dec(in); err != nil { 409 | return nil, err 410 | } 411 | if interceptor == nil { 412 | return srv.(OpenFGAServiceServer).Check(ctx, in) 413 | } 414 | info := &grpc.UnaryServerInfo{ 415 | Server: srv, 416 | FullMethod: OpenFGAService_Check_FullMethodName, 417 | } 418 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 419 | return srv.(OpenFGAServiceServer).Check(ctx, req.(*CheckRequest)) 420 | } 421 | return interceptor(ctx, in, info, handler) 422 | } 423 | 424 | func _OpenFGAService_BatchCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 425 | in := new(BatchCheckRequest) 426 | if err := dec(in); err != nil { 427 | return nil, err 428 | } 429 | if interceptor == nil { 430 | return srv.(OpenFGAServiceServer).BatchCheck(ctx, in) 431 | } 432 | info := &grpc.UnaryServerInfo{ 433 | Server: srv, 434 | FullMethod: OpenFGAService_BatchCheck_FullMethodName, 435 | } 436 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 437 | return srv.(OpenFGAServiceServer).BatchCheck(ctx, req.(*BatchCheckRequest)) 438 | } 439 | return interceptor(ctx, in, info, handler) 440 | } 441 | 442 | func _OpenFGAService_Expand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 443 | in := new(ExpandRequest) 444 | if err := dec(in); err != nil { 445 | return nil, err 446 | } 447 | if interceptor == nil { 448 | return srv.(OpenFGAServiceServer).Expand(ctx, in) 449 | } 450 | info := &grpc.UnaryServerInfo{ 451 | Server: srv, 452 | FullMethod: OpenFGAService_Expand_FullMethodName, 453 | } 454 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 455 | return srv.(OpenFGAServiceServer).Expand(ctx, req.(*ExpandRequest)) 456 | } 457 | return interceptor(ctx, in, info, handler) 458 | } 459 | 460 | func _OpenFGAService_ReadAuthorizationModels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 461 | in := new(ReadAuthorizationModelsRequest) 462 | if err := dec(in); err != nil { 463 | return nil, err 464 | } 465 | if interceptor == nil { 466 | return srv.(OpenFGAServiceServer).ReadAuthorizationModels(ctx, in) 467 | } 468 | info := &grpc.UnaryServerInfo{ 469 | Server: srv, 470 | FullMethod: OpenFGAService_ReadAuthorizationModels_FullMethodName, 471 | } 472 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 473 | return srv.(OpenFGAServiceServer).ReadAuthorizationModels(ctx, req.(*ReadAuthorizationModelsRequest)) 474 | } 475 | return interceptor(ctx, in, info, handler) 476 | } 477 | 478 | func _OpenFGAService_ReadAuthorizationModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 479 | in := new(ReadAuthorizationModelRequest) 480 | if err := dec(in); err != nil { 481 | return nil, err 482 | } 483 | if interceptor == nil { 484 | return srv.(OpenFGAServiceServer).ReadAuthorizationModel(ctx, in) 485 | } 486 | info := &grpc.UnaryServerInfo{ 487 | Server: srv, 488 | FullMethod: OpenFGAService_ReadAuthorizationModel_FullMethodName, 489 | } 490 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 491 | return srv.(OpenFGAServiceServer).ReadAuthorizationModel(ctx, req.(*ReadAuthorizationModelRequest)) 492 | } 493 | return interceptor(ctx, in, info, handler) 494 | } 495 | 496 | func _OpenFGAService_WriteAuthorizationModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 497 | in := new(WriteAuthorizationModelRequest) 498 | if err := dec(in); err != nil { 499 | return nil, err 500 | } 501 | if interceptor == nil { 502 | return srv.(OpenFGAServiceServer).WriteAuthorizationModel(ctx, in) 503 | } 504 | info := &grpc.UnaryServerInfo{ 505 | Server: srv, 506 | FullMethod: OpenFGAService_WriteAuthorizationModel_FullMethodName, 507 | } 508 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 509 | return srv.(OpenFGAServiceServer).WriteAuthorizationModel(ctx, req.(*WriteAuthorizationModelRequest)) 510 | } 511 | return interceptor(ctx, in, info, handler) 512 | } 513 | 514 | func _OpenFGAService_WriteAssertions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 515 | in := new(WriteAssertionsRequest) 516 | if err := dec(in); err != nil { 517 | return nil, err 518 | } 519 | if interceptor == nil { 520 | return srv.(OpenFGAServiceServer).WriteAssertions(ctx, in) 521 | } 522 | info := &grpc.UnaryServerInfo{ 523 | Server: srv, 524 | FullMethod: OpenFGAService_WriteAssertions_FullMethodName, 525 | } 526 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 527 | return srv.(OpenFGAServiceServer).WriteAssertions(ctx, req.(*WriteAssertionsRequest)) 528 | } 529 | return interceptor(ctx, in, info, handler) 530 | } 531 | 532 | func _OpenFGAService_ReadAssertions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 533 | in := new(ReadAssertionsRequest) 534 | if err := dec(in); err != nil { 535 | return nil, err 536 | } 537 | if interceptor == nil { 538 | return srv.(OpenFGAServiceServer).ReadAssertions(ctx, in) 539 | } 540 | info := &grpc.UnaryServerInfo{ 541 | Server: srv, 542 | FullMethod: OpenFGAService_ReadAssertions_FullMethodName, 543 | } 544 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 545 | return srv.(OpenFGAServiceServer).ReadAssertions(ctx, req.(*ReadAssertionsRequest)) 546 | } 547 | return interceptor(ctx, in, info, handler) 548 | } 549 | 550 | func _OpenFGAService_ReadChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 551 | in := new(ReadChangesRequest) 552 | if err := dec(in); err != nil { 553 | return nil, err 554 | } 555 | if interceptor == nil { 556 | return srv.(OpenFGAServiceServer).ReadChanges(ctx, in) 557 | } 558 | info := &grpc.UnaryServerInfo{ 559 | Server: srv, 560 | FullMethod: OpenFGAService_ReadChanges_FullMethodName, 561 | } 562 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 563 | return srv.(OpenFGAServiceServer).ReadChanges(ctx, req.(*ReadChangesRequest)) 564 | } 565 | return interceptor(ctx, in, info, handler) 566 | } 567 | 568 | func _OpenFGAService_CreateStore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 569 | in := new(CreateStoreRequest) 570 | if err := dec(in); err != nil { 571 | return nil, err 572 | } 573 | if interceptor == nil { 574 | return srv.(OpenFGAServiceServer).CreateStore(ctx, in) 575 | } 576 | info := &grpc.UnaryServerInfo{ 577 | Server: srv, 578 | FullMethod: OpenFGAService_CreateStore_FullMethodName, 579 | } 580 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 581 | return srv.(OpenFGAServiceServer).CreateStore(ctx, req.(*CreateStoreRequest)) 582 | } 583 | return interceptor(ctx, in, info, handler) 584 | } 585 | 586 | func _OpenFGAService_UpdateStore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 587 | in := new(UpdateStoreRequest) 588 | if err := dec(in); err != nil { 589 | return nil, err 590 | } 591 | if interceptor == nil { 592 | return srv.(OpenFGAServiceServer).UpdateStore(ctx, in) 593 | } 594 | info := &grpc.UnaryServerInfo{ 595 | Server: srv, 596 | FullMethod: OpenFGAService_UpdateStore_FullMethodName, 597 | } 598 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 599 | return srv.(OpenFGAServiceServer).UpdateStore(ctx, req.(*UpdateStoreRequest)) 600 | } 601 | return interceptor(ctx, in, info, handler) 602 | } 603 | 604 | func _OpenFGAService_DeleteStore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 605 | in := new(DeleteStoreRequest) 606 | if err := dec(in); err != nil { 607 | return nil, err 608 | } 609 | if interceptor == nil { 610 | return srv.(OpenFGAServiceServer).DeleteStore(ctx, in) 611 | } 612 | info := &grpc.UnaryServerInfo{ 613 | Server: srv, 614 | FullMethod: OpenFGAService_DeleteStore_FullMethodName, 615 | } 616 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 617 | return srv.(OpenFGAServiceServer).DeleteStore(ctx, req.(*DeleteStoreRequest)) 618 | } 619 | return interceptor(ctx, in, info, handler) 620 | } 621 | 622 | func _OpenFGAService_GetStore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 623 | in := new(GetStoreRequest) 624 | if err := dec(in); err != nil { 625 | return nil, err 626 | } 627 | if interceptor == nil { 628 | return srv.(OpenFGAServiceServer).GetStore(ctx, in) 629 | } 630 | info := &grpc.UnaryServerInfo{ 631 | Server: srv, 632 | FullMethod: OpenFGAService_GetStore_FullMethodName, 633 | } 634 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 635 | return srv.(OpenFGAServiceServer).GetStore(ctx, req.(*GetStoreRequest)) 636 | } 637 | return interceptor(ctx, in, info, handler) 638 | } 639 | 640 | func _OpenFGAService_ListStores_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 641 | in := new(ListStoresRequest) 642 | if err := dec(in); err != nil { 643 | return nil, err 644 | } 645 | if interceptor == nil { 646 | return srv.(OpenFGAServiceServer).ListStores(ctx, in) 647 | } 648 | info := &grpc.UnaryServerInfo{ 649 | Server: srv, 650 | FullMethod: OpenFGAService_ListStores_FullMethodName, 651 | } 652 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 653 | return srv.(OpenFGAServiceServer).ListStores(ctx, req.(*ListStoresRequest)) 654 | } 655 | return interceptor(ctx, in, info, handler) 656 | } 657 | 658 | func _OpenFGAService_StreamedListObjects_Handler(srv interface{}, stream grpc.ServerStream) error { 659 | m := new(StreamedListObjectsRequest) 660 | if err := stream.RecvMsg(m); err != nil { 661 | return err 662 | } 663 | return srv.(OpenFGAServiceServer).StreamedListObjects(m, &openFGAServiceStreamedListObjectsServer{stream}) 664 | } 665 | 666 | type OpenFGAService_StreamedListObjectsServer interface { 667 | Send(*StreamedListObjectsResponse) error 668 | grpc.ServerStream 669 | } 670 | 671 | type openFGAServiceStreamedListObjectsServer struct { 672 | grpc.ServerStream 673 | } 674 | 675 | func (x *openFGAServiceStreamedListObjectsServer) Send(m *StreamedListObjectsResponse) error { 676 | return x.ServerStream.SendMsg(m) 677 | } 678 | 679 | func _OpenFGAService_ListObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 680 | in := new(ListObjectsRequest) 681 | if err := dec(in); err != nil { 682 | return nil, err 683 | } 684 | if interceptor == nil { 685 | return srv.(OpenFGAServiceServer).ListObjects(ctx, in) 686 | } 687 | info := &grpc.UnaryServerInfo{ 688 | Server: srv, 689 | FullMethod: OpenFGAService_ListObjects_FullMethodName, 690 | } 691 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 692 | return srv.(OpenFGAServiceServer).ListObjects(ctx, req.(*ListObjectsRequest)) 693 | } 694 | return interceptor(ctx, in, info, handler) 695 | } 696 | 697 | func _OpenFGAService_ListUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 698 | in := new(ListUsersRequest) 699 | if err := dec(in); err != nil { 700 | return nil, err 701 | } 702 | if interceptor == nil { 703 | return srv.(OpenFGAServiceServer).ListUsers(ctx, in) 704 | } 705 | info := &grpc.UnaryServerInfo{ 706 | Server: srv, 707 | FullMethod: OpenFGAService_ListUsers_FullMethodName, 708 | } 709 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 710 | return srv.(OpenFGAServiceServer).ListUsers(ctx, req.(*ListUsersRequest)) 711 | } 712 | return interceptor(ctx, in, info, handler) 713 | } 714 | 715 | // OpenFGAService_ServiceDesc is the grpc.ServiceDesc for OpenFGAService service. 716 | // It's only intended for direct use with grpc.RegisterService, 717 | // and not to be introspected or modified (even as a copy) 718 | var OpenFGAService_ServiceDesc = grpc.ServiceDesc{ 719 | ServiceName: "openfga.v1.OpenFGAService", 720 | HandlerType: (*OpenFGAServiceServer)(nil), 721 | Methods: []grpc.MethodDesc{ 722 | { 723 | MethodName: "Read", 724 | Handler: _OpenFGAService_Read_Handler, 725 | }, 726 | { 727 | MethodName: "Write", 728 | Handler: _OpenFGAService_Write_Handler, 729 | }, 730 | { 731 | MethodName: "Check", 732 | Handler: _OpenFGAService_Check_Handler, 733 | }, 734 | { 735 | MethodName: "BatchCheck", 736 | Handler: _OpenFGAService_BatchCheck_Handler, 737 | }, 738 | { 739 | MethodName: "Expand", 740 | Handler: _OpenFGAService_Expand_Handler, 741 | }, 742 | { 743 | MethodName: "ReadAuthorizationModels", 744 | Handler: _OpenFGAService_ReadAuthorizationModels_Handler, 745 | }, 746 | { 747 | MethodName: "ReadAuthorizationModel", 748 | Handler: _OpenFGAService_ReadAuthorizationModel_Handler, 749 | }, 750 | { 751 | MethodName: "WriteAuthorizationModel", 752 | Handler: _OpenFGAService_WriteAuthorizationModel_Handler, 753 | }, 754 | { 755 | MethodName: "WriteAssertions", 756 | Handler: _OpenFGAService_WriteAssertions_Handler, 757 | }, 758 | { 759 | MethodName: "ReadAssertions", 760 | Handler: _OpenFGAService_ReadAssertions_Handler, 761 | }, 762 | { 763 | MethodName: "ReadChanges", 764 | Handler: _OpenFGAService_ReadChanges_Handler, 765 | }, 766 | { 767 | MethodName: "CreateStore", 768 | Handler: _OpenFGAService_CreateStore_Handler, 769 | }, 770 | { 771 | MethodName: "UpdateStore", 772 | Handler: _OpenFGAService_UpdateStore_Handler, 773 | }, 774 | { 775 | MethodName: "DeleteStore", 776 | Handler: _OpenFGAService_DeleteStore_Handler, 777 | }, 778 | { 779 | MethodName: "GetStore", 780 | Handler: _OpenFGAService_GetStore_Handler, 781 | }, 782 | { 783 | MethodName: "ListStores", 784 | Handler: _OpenFGAService_ListStores_Handler, 785 | }, 786 | { 787 | MethodName: "ListObjects", 788 | Handler: _OpenFGAService_ListObjects_Handler, 789 | }, 790 | { 791 | MethodName: "ListUsers", 792 | Handler: _OpenFGAService_ListUsers_Handler, 793 | }, 794 | }, 795 | Streams: []grpc.StreamDesc{ 796 | { 797 | StreamName: "StreamedListObjects", 798 | Handler: _OpenFGAService_StreamedListObjects_Handler, 799 | ServerStreams: true, 800 | }, 801 | }, 802 | Metadata: "openfga/v1/openfga_service.proto", 803 | } 804 | -------------------------------------------------------------------------------- /scripts/update_swagger.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This script is used to cleanup swagger file 4 | if [ "$#" -ne 1 ]; then 5 | echo "Usage: update_swagger.sh " >&2 6 | exit 1 7 | fi 8 | 9 | filename=$1 10 | tmp_filename=$filename.tmp 11 | 12 | # We also need to cleanup response code that are obsolete because 13 | # either i) we override the error code or ii) we override success case where we respond with 201/204 14 | cat ${filename} | \ 15 | jq \ 16 | 'del(.paths[][]."responses"|select(has("400"))."default" ) | del(.paths[][]."responses"|select(has("201"))."200") | del(.paths[][]."responses"|select(has("204"))."200")' > ${tmp_filename} 17 | mv ${tmp_filename} ${filename} 18 | 19 | # Add an example value to the ConsistencyPreference to override the default of UNSPECIFIED being shown in the docs 20 | cat ${filename} | \ 21 | jq \ 22 | '.definitions.ConsistencyPreference.example = "MINIMIZE_LATENCY"' > ${tmp_filename} 23 | mv ${tmp_filename} ${filename} 24 | 25 | # Finally, for 204, there should be no schema 26 | cat ${filename} | \ 27 | jq \ 28 | 'del(.paths[][]."responses"."204"."schema")' > ${tmp_filename} 29 | mv ${tmp_filename} ${filename} 30 | --------------------------------------------------------------------------------