From 64c08cb9f1fe9a8629851677eddbec45ac6aba5d Mon Sep 17 00:00:00 2001 From: Maria Ines Parnisari Date: Thu, 5 Sep 2024 20:26:43 -0700 Subject: [PATCH] build: migrate to buf v2 --- buf.gen.yaml | 39 +- buf.lock | 26 +- buf.yaml | 19 +- docs/openapiv2/apidocs.swagger.json | 657 ++++++++++++-------- proto/openfga/v1/authzmodel.pb.go | 46 +- proto/openfga/v1/errors_ignore.pb.go | 18 +- proto/openfga/v1/openapi.pb.go | 4 +- proto/openfga/v1/openfga.pb.go | 52 +- proto/openfga/v1/openfga_service.pb.go | 92 +-- proto/openfga/v1/openfga_service.pb.gw.go | 9 +- proto/openfga/v1/openfga_service_grpc.pb.go | 123 ++-- 11 files changed, 622 insertions(+), 463 deletions(-) diff --git a/buf.gen.yaml b/buf.gen.yaml index d35618e9..af24ad1e 100755 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,33 +1,32 @@ -#!/usr/bin/env -S buf generate --template ---- -version: v1 +version: v2 managed: enabled: true - go_package_prefix: - default: github.com/openfga/api/proto - except: - - buf.build/googleapis/googleapis - - buf.build/envoyproxy/protoc-gen-validate - - buf.build/grpc-ecosystem/grpc-gateway + disable: + - file_option: go_package + module: buf.build/googleapis/googleapis + - file_option: go_package + module: buf.build/envoyproxy/protoc-gen-validate + - file_option: go_package + module: buf.build/grpc-ecosystem/grpc-gateway + override: + - file_option: go_package_prefix + value: github.com/openfga/api/proto plugins: - - plugin: buf.build/protocolbuffers/go:v1.34.0 + - remote: buf.build/protocolbuffers/go:v1.34.2 out: proto/ - opt: - - paths=source_relative - - plugin: buf.build/grpc/go:v1.3.0 + opt: paths=source_relative + - remote: buf.build/grpc/go:v1.5.1 out: proto/ - opt: - - paths=source_relative - - plugin: buf.build/bufbuild/validate-go:v1.0.4 + opt: paths=source_relative + - remote: buf.build/bufbuild/validate-go:v1.1.0 out: proto/ - opt: - - paths=source_relative - - plugin: buf.build/grpc-ecosystem/gateway:v2.19.1 + opt: paths=source_relative + - remote: buf.build/grpc-ecosystem/gateway:v2.22.0 out: proto/ opt: - paths=source_relative - logtostderr=true - - plugin: buf.build/grpc-ecosystem/openapiv2:v2.16.0 + - remote: buf.build/grpc-ecosystem/openapiv2:v2.22.0 out: docs/openapiv2 opt: - openapi_naming_strategy=simple diff --git a/buf.lock b/buf.lock index 6775435c..322ea838 100644 --- a/buf.lock +++ b/buf.lock @@ -1,18 +1,12 @@ # Generated by buf. DO NOT EDIT. -version: v1 +version: v2 deps: - - remote: buf.build - owner: envoyproxy - repository: protoc-gen-validate - commit: ea113bc841fa448ab34bf3f9fa6cef0f - digest: shake256:8f3653779e824957a4fe3d18cdb73531f7f7ed1393848082dfe1f90026fd187da9534e759b5833f4e5487be0d34cfa7d4ff149af9a2694863773387d61d09fce - - remote: buf.build - owner: googleapis - repository: googleapis - commit: 2011a25076274e6b974567fbf6697481 - digest: shake256:7149cf5e9955c692d381e557830555d4e93f205a0f1b8e2dfdae46d029369aa3fc1980e35df0d310f7cc3b622f93e19ad276769a283a967dd3065ddfd3a40e13 - - remote: buf.build - owner: grpc-ecosystem - repository: grpc-gateway - commit: b661eb9bddab46c7bdbad4c73161bb11 - digest: shake256:67b115260e12cb2d6c5d5ce8dbbf3a095c86f0e52b84f9dbd16dec9433b218f8694bc9aadb1d45eb6fd52f5a7029977d460e2d58afb3208ab6c680e7b21c80e4 + - name: buf.build/envoyproxy/protoc-gen-validate + commit: daf171c6cdb54629b5f51e345a79e4dd + digest: b5:c745e1521879f43740230b1df673d0729f55704efefdcfc489d4a0a2d40c92a26cacfeab62813403040a8b180142d53b398c7ca784a065e43823605ee49681de + - name: buf.build/googleapis/googleapis + commit: e7f8d366f5264595bcc4cd4139af9973 + digest: b5:0cd69a689ee320ed815663d57d1bc3a1d6823224a7a717d46fee3a68197c25a6f5f932c0b0e49f8370c70c247a6635969a6a54af5345cafd51e0667298768aca + - name: buf.build/grpc-ecosystem/grpc-gateway + commit: a48fcebcf8f140dd9d09359b9bb185a4 + digest: b5:330af8a71b579ab96c4f3ee26929d1a68a5a9e986c7cfe0a898591fc514216bb6e723dc04c74d90fdee3f3f14f9100a54b4f079eb273e6e7213f0d5baca36ff8 diff --git a/buf.yaml b/buf.yaml index 6ce1a441..016a5b3b 100644 --- a/buf.yaml +++ b/buf.yaml @@ -1,18 +1,19 @@ -version: v1 +version: v2 name: buf.build/openfga/api deps: - buf.build/envoyproxy/protoc-gen-validate - - buf.build/grpc-ecosystem/grpc-gateway - buf.build/googleapis/googleapis -breaking: - ignore_unstable_packages: true - + - buf.build/grpc-ecosystem/grpc-gateway lint: - allow_comment_ignores: true ignore_only: - ENUM_VALUE_UPPER_SNAKE_CASE: - - openfga/v1/errors_ignore.proto ENUM_VALUE_PREFIX: - openfga/v1/errors_ignore.proto + ENUM_VALUE_UPPER_SNAKE_CASE: + - openfga/v1/errors_ignore.proto ENUM_ZERO_VALUE_SUFFIX: - - openfga/v1/errors_ignore.proto \ No newline at end of file + - openfga/v1/errors_ignore.proto +breaking: + except: + - EXTENSION_NO_DELETE + - FIELD_SAME_DEFAULT + ignore_unstable_packages: true diff --git a/docs/openapiv2/apidocs.swagger.json b/docs/openapiv2/apidocs.swagger.json index e87ebe49..06fcbd88 100644 --- a/docs/openapiv2/apidocs.swagger.json +++ b/docs/openapiv2/apidocs.swagger.json @@ -76,6 +76,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -102,6 +108,12 @@ "description": "Create a unique OpenFGA store which will be used to store authorization models and relationship tuples.", "operationId": "CreateStore", "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/CreateStoreResponse" + } + }, "201": { "description": "A successful response.", "schema": { @@ -143,6 +155,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -207,6 +225,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -226,8 +250,17 @@ "description": "Delete an OpenFGA store. This does not delete the data associated with the store, like tuples or authorization models.", "operationId": "DeleteStore", "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/DeleteStoreResponse" + } + }, "204": { - "description": "A successful response." + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/DeleteStoreResponse" + } }, "400": { "description": "Request failed due to invalid input.", @@ -264,6 +297,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -326,6 +365,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -351,8 +396,17 @@ "description": "The WriteAssertions API will upsert new assertions for an authorization model id, or overwrite the existing ones. An assertion is an object that contains a tuple key, the expectation of whether a call to the Check API of that tuple key will return true or false, and optionally a list of contextual tuples.", "operationId": "WriteAssertions", "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/WriteAssertionsResponse" + } + }, "204": { - "description": "A successful response." + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/WriteAssertionsResponse" + } }, "400": { "description": "Request failed due to invalid input.", @@ -389,6 +443,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -409,20 +469,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "assertions": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/Assertion", - "maximum": 100 - } - } - }, - "required": [ - "assertions" - ] + "$ref": "#/definitions/WriteAssertionsBody" } } ], @@ -478,6 +525,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -510,6 +563,12 @@ "description": "The WriteAuthorizationModel API will add a new authorization model to a store.\nEach item in the `type_definitions` array is a type definition as specified in the field `type_definition`.\nThe response will return the authorization model's ID in the `id` field.\n\n## Example\nTo add an authorization model with `user` and `document` type definitions, call POST authorization-models API with the body: \n```json\n{\n \"type_definitions\":[\n {\n \"type\":\"user\"\n },\n {\n \"type\":\"document\",\n \"relations\":{\n \"reader\":{\n \"union\":{\n \"child\":[\n {\n \"this\":{}\n },\n {\n \"computedUserset\":{\n \"object\":\"\",\n \"relation\":\"writer\"\n }\n }\n ]\n }\n },\n \"writer\":{\n \"this\":{}\n }\n }\n }\n ]\n}\n```\nOpenFGA's response will include the version id for this authorization model, which will look like \n```\n{\"authorization_model_id\": \"01G50QVV17PECNVAHX1GG4Y5NC\"}\n```\n", "operationId": "WriteAuthorizationModel", "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/WriteAuthorizationModelResponse" + } + }, "201": { "description": "A successful response.", "schema": { @@ -551,6 +610,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -565,30 +630,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "type_definitions": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/TypeDefinition", - "minimum": 1 - } - }, - "schema_version": { - "type": "string" - }, - "conditions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Condition" - } - } - }, - "required": [ - "type_definitions", - "schema_version" - ] + "$ref": "#/definitions/WriteAuthorizationModelBody" } } ], @@ -644,6 +686,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -712,6 +760,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -793,6 +847,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -807,36 +867,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "tuple_key": { - "$ref": "#/definitions/CheckRequestTupleKey" - }, - "contextual_tuples": { - "$ref": "#/definitions/ContextualTupleKeys" - }, - "authorization_model_id": { - "type": "string", - "example": "01G5JAVJ41T49E9TT3SKVS7X1J" - }, - "trace": { - "type": "boolean", - "example": false, - "description": "Defaults to false. Making it true has performance implications.", - "readOnly": true - }, - "context": { - "type": "object", - "description": "Additional request context that will be used to evaluate any ABAC conditions encountered\nin the query evaluation." - }, - "consistency": { - "$ref": "#/definitions/ConsistencyPreference", - "description": "Controls the consistency preference for this request. Default value is UNSPECIFIED, which will have the same behavior as MINIMIZE_LATENCY." - } - }, - "required": [ - "tuple_key" - ] + "$ref": "#/definitions/CheckBody" } } ], @@ -892,6 +923,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -906,23 +943,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "tuple_key": { - "$ref": "#/definitions/ExpandRequestTupleKey" - }, - "authorization_model_id": { - "type": "string", - "example": "01G5JAVJ41T49E9TT3SKVS7X1J" - }, - "consistency": { - "$ref": "#/definitions/ConsistencyPreference", - "description": "Controls the consistency preference for this request. Default value is UNSPECIFIED, which will have the same behavior as MINIMIZE_LATENCY." - } - }, - "required": [ - "tuple_key" - ] + "$ref": "#/definitions/ExpandBody" } } ], @@ -934,7 +955,7 @@ "/stores/{store_id}/list-objects": { "post": { "summary": "List all objects of the given type that the user has a relation with", - "description": "The ListObjects API returns a list of all the objects of the given type that the user has a relation with.\n To arrive at a result, the API uses: an authorization model, explicit tuples written through the Write API, contextual tuples present in the request, and implicit tuples that exist by virtue of applying set theory (such as `document:2021-budget#viewer@document:2021-budget#viewer`; the set of users who are viewers of `document:2021-budget` are the set of users who are the viewers of `document:2021-budget`).\nAn `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance.\nYou may also specify `contextual_tuples` that will be treated as regular tuples. Each of these tuples may have an associated `condition`.\nYou may also provide a `context` object that will be used to evaluate the conditioned tuples in the system. It is strongly recommended to provide a value for all the input parameters of all the conditions, to ensure that all tuples be evaluated correctly.\nThe response will contain the related objects in an array in the \"objects\" field of the response and they will be strings in the object format `:` (e.g. \"document:roadmap\").\nThe number of objects in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_OBJECTS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_OBJECTS_MAX_RESULTS, whichever is hit first.\nThe objects given will not be sorted, and therefore two identical calls can give a given different set of objects.", + "description": "The ListObjects API returns a list of all the objects of the given type that the user has a relation with.\n To arrive at a result, the API uses: an authorization model, explicit tuples written through the Write API, contextual tuples present in the request, and implicit tuples that exist by virtue of applying set theory (such as `document:2021-budget#viewer@document:2021-budget#viewer`; the set of users who are viewers of `document:2021-budget` are the set of users who are the viewers of `document:2021-budget`).\nAn `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance.\nYou may also specify `contextual_tuples` that will be treated as regular tuples. Each of these tuples may have an associated `condition`.\nYou may also provide a `context` object that will be used to evaluate the conditioned tuples in the system. It is strongly recommended to provide a value for all the input parameters of all the conditions, to ensure that all tuples be evaluated correctly.\nThe response will contain the related objects in an array in the \"objects\" field of the response and they will be strings in the object format `\u003ctype\u003e:\u003cid\u003e` (e.g. \"document:roadmap\").\nThe number of objects in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_OBJECTS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_OBJECTS_MAX_RESULTS, whichever is hit first.\nThe objects given will not be sorted, and therefore two identical calls can give a given different set of objects.", "operationId": "ListObjects", "responses": { "200": { @@ -978,6 +999,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -992,43 +1019,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "authorization_model_id": { - "type": "string", - "example": "01G5JAVJ41T49E9TT3SKVS7X1J" - }, - "type": { - "type": "string", - "example": "document" - }, - "relation": { - "type": "string", - "example": "reader" - }, - "user": { - "type": "string", - "example": "user:anne", - "maxLength": 512, - "minLength": 1 - }, - "contextual_tuples": { - "$ref": "#/definitions/ContextualTupleKeys" - }, - "context": { - "type": "object", - "description": "Additional request context that will be used to evaluate any ABAC conditions encountered\nin the query evaluation." - }, - "consistency": { - "$ref": "#/definitions/ConsistencyPreference", - "description": "Controls the consistency preference for this request. Default value is UNSPECIFIED, which will have the same behavior as MINIMIZE_LATENCY." - } - }, - "required": [ - "type", - "relation", - "user" - ] + "$ref": "#/definitions/ListObjectsBody" } } ], @@ -1084,6 +1075,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -1098,59 +1095,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "authorization_model_id": { - "type": "string", - "example": "01G5JAVJ41T49E9TT3SKVS7X1J" - }, - "object": { - "$ref": "#/definitions/Object", - "example": "document:example" - }, - "relation": { - "type": "string", - "example": "reader" - }, - "user_filters": { - "type": "array", - "example": [ - { - "type": "user" - }, - { - "type": "group", - "relation": "member" - } - ], - "items": { - "type": "object", - "$ref": "#/definitions/UserTypeFilter" - }, - "description": "The type of results returned. Only accepts exactly one value." - }, - "contextual_tuples": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/TupleKey", - "maximum": 20 - } - }, - "context": { - "type": "object", - "description": "Additional request context that will be used to evaluate any ABAC conditions encountered\nin the query evaluation." - }, - "consistency": { - "$ref": "#/definitions/ConsistencyPreference", - "description": "Controls the consistency preference for this request. Default value is UNSPECIFIED, which will have the same behavior as MINIMIZE_LATENCY." - } - }, - "required": [ - "object", - "relation", - "user_filters" - ] + "$ref": "#/definitions/ListUsersBody" } } ], @@ -1206,6 +1151,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -1220,25 +1171,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "tuple_key": { - "$ref": "#/definitions/ReadRequestTupleKey" - }, - "page_size": { - "type": "integer", - "format": "int32", - "example": 50 - }, - "continuation_token": { - "type": "string", - "example": "eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==" - }, - "consistency": { - "$ref": "#/definitions/ConsistencyPreference", - "description": "Controls the consistency preference for this request. Default value is UNSPECIFIED, which will have the same behavior as MINIMIZE_LATENCY." - } - } + "$ref": "#/definitions/ReadBody" } } ], @@ -1303,6 +1236,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -1317,43 +1256,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "authorization_model_id": { - "type": "string", - "example": "01G5JAVJ41T49E9TT3SKVS7X1J" - }, - "type": { - "type": "string", - "example": "document" - }, - "relation": { - "type": "string", - "example": "reader" - }, - "user": { - "type": "string", - "example": "user:anne", - "maxLength": 512, - "minLength": 1 - }, - "contextual_tuples": { - "$ref": "#/definitions/ContextualTupleKeys" - }, - "context": { - "type": "object", - "description": "Additional request context that will be used to evaluate any ABAC conditions encountered\nin the query evaluation." - }, - "consistency": { - "$ref": "#/definitions/ConsistencyPreference", - "description": "Controls the consistency preference for this request. Default value is UNSPECIFIED, which will have the same behavior as MINIMIZE_LATENCY." - } - }, - "required": [ - "type", - "relation", - "user" - ] + "$ref": "#/definitions/StreamedListObjectsBody" } } ], @@ -1409,6 +1312,12 @@ "schema": { "$ref": "#/definitions/InternalErrorMessageResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } } }, "parameters": [ @@ -1423,19 +1332,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "writes": { - "$ref": "#/definitions/WriteRequestWrites" - }, - "deletes": { - "$ref": "#/definitions/WriteRequestDeletes" - }, - "authorization_model_id": { - "type": "string", - "example": "01G5JAVJ41T49E9TT3SKVS7X1J" - } - } + "$ref": "#/definitions/WriteBody" } } ], @@ -1601,6 +1498,38 @@ "type_definitions" ] }, + "CheckBody": { + "type": "object", + "properties": { + "tuple_key": { + "$ref": "#/definitions/CheckRequestTupleKey" + }, + "contextual_tuples": { + "$ref": "#/definitions/ContextualTupleKeys" + }, + "authorization_model_id": { + "type": "string", + "example": "01G5JAVJ41T49E9TT3SKVS7X1J" + }, + "trace": { + "type": "boolean", + "example": false, + "description": "Defaults to false. Making it true has performance implications.", + "readOnly": true + }, + "context": { + "type": "object", + "description": "Additional request context that will be used to evaluate any ABAC conditions encountered\nin the query evaluation." + }, + "consistency": { + "$ref": "#/definitions/ConsistencyPreference", + "description": "Controls the consistency preference for this request. Default value is UNSPECIFIED, which will have the same behavior as MINIMIZE_LATENCY." + } + }, + "required": [ + "tuple_key" + ] + }, "CheckRequestTupleKey": { "type": "object", "properties": { @@ -1833,6 +1762,25 @@ ], "default": "no_error" }, + "ExpandBody": { + "type": "object", + "properties": { + "tuple_key": { + "$ref": "#/definitions/ExpandRequestTupleKey" + }, + "authorization_model_id": { + "type": "string", + "example": "01G5JAVJ41T49E9TT3SKVS7X1J" + }, + "consistency": { + "$ref": "#/definitions/ConsistencyPreference", + "description": "Controls the consistency preference for this request. Default value is UNSPECIFIED, which will have the same behavior as MINIMIZE_LATENCY." + } + }, + "required": [ + "tuple_key" + ] + }, "ExpandRequestTupleKey": { "type": "object", "properties": { @@ -1936,6 +1884,45 @@ }, "description": "A leaf node contains either\n- a set of users (which may be individual users, or usersets\n referencing other relations)\n- a computed node, which is the result of a computed userset\n value in the authorization model\n- a tupleToUserset nodes, containing the result of expanding\n a tupleToUserset value in a authorization model." }, + "ListObjectsBody": { + "type": "object", + "properties": { + "authorization_model_id": { + "type": "string", + "example": "01G5JAVJ41T49E9TT3SKVS7X1J" + }, + "type": { + "type": "string", + "example": "document" + }, + "relation": { + "type": "string", + "example": "reader" + }, + "user": { + "type": "string", + "example": "user:anne", + "maxLength": 512, + "minLength": 1 + }, + "contextual_tuples": { + "$ref": "#/definitions/ContextualTupleKeys" + }, + "context": { + "type": "object", + "description": "Additional request context that will be used to evaluate any ABAC conditions encountered\nin the query evaluation." + }, + "consistency": { + "$ref": "#/definitions/ConsistencyPreference", + "description": "Controls the consistency preference for this request. Default value is UNSPECIFIED, which will have the same behavior as MINIMIZE_LATENCY." + } + }, + "required": [ + "type", + "relation", + "user" + ] + }, "ListObjectsResponse": { "type": "object", "properties": { @@ -1975,6 +1962,61 @@ "continuation_token" ] }, + "ListUsersBody": { + "type": "object", + "properties": { + "authorization_model_id": { + "type": "string", + "example": "01G5JAVJ41T49E9TT3SKVS7X1J" + }, + "object": { + "$ref": "#/definitions/Object", + "example": "document:example" + }, + "relation": { + "type": "string", + "example": "reader" + }, + "user_filters": { + "type": "array", + "example": [ + { + "type": "user" + }, + { + "type": "group", + "relation": "member" + } + ], + "items": { + "type": "object", + "$ref": "#/definitions/UserTypeFilter" + }, + "description": "The type of results returned. Only accepts exactly one value." + }, + "contextual_tuples": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/TupleKey", + "maximum": 20 + } + }, + "context": { + "type": "object", + "description": "Additional request context that will be used to evaluate any ABAC conditions encountered\nin the query evaluation." + }, + "consistency": { + "$ref": "#/definitions/ConsistencyPreference", + "description": "Controls the consistency preference for this request. Default value is UNSPECIFIED, which will have the same behavior as MINIMIZE_LATENCY." + } + }, + "required": [ + "object", + "relation", + "user_filters" + ] + }, "ListUsersResponse": { "type": "object", "properties": { @@ -2154,6 +2196,27 @@ "authorization_models" ] }, + "ReadBody": { + "type": "object", + "properties": { + "tuple_key": { + "$ref": "#/definitions/ReadRequestTupleKey" + }, + "page_size": { + "type": "integer", + "format": "int32", + "example": 50 + }, + "continuation_token": { + "type": "string", + "example": "eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ==" + }, + "consistency": { + "$ref": "#/definitions/ConsistencyPreference", + "description": "Controls the consistency preference for this request. Default value is UNSPECIFIED, which will have the same behavior as MINIMIZE_LATENCY." + } + } + }, "ReadChangesResponse": { "type": "object", "properties": { @@ -2331,6 +2394,45 @@ "updated_at" ] }, + "StreamedListObjectsBody": { + "type": "object", + "properties": { + "authorization_model_id": { + "type": "string", + "example": "01G5JAVJ41T49E9TT3SKVS7X1J" + }, + "type": { + "type": "string", + "example": "document" + }, + "relation": { + "type": "string", + "example": "reader" + }, + "user": { + "type": "string", + "example": "user:anne", + "maxLength": 512, + "minLength": 1 + }, + "contextual_tuples": { + "$ref": "#/definitions/ContextualTupleKeys" + }, + "context": { + "type": "object", + "description": "Additional request context that will be used to evaluate any ABAC conditions encountered\nin the query evaluation." + }, + "consistency": { + "$ref": "#/definitions/ConsistencyPreference", + "description": "Controls the consistency preference for this request. Default value is UNSPECIFIED, which will have the same behavior as MINIMIZE_LATENCY." + } + }, + "required": [ + "type", + "relation", + "user" + ] + }, "StreamedListObjectsResponse": { "type": "object", "properties": { @@ -2510,7 +2612,7 @@ "example": "employee" } }, - "description": "Type bound public access.\n\nNormally represented using the `:*` syntax\n\n`employee:*` represents every object of type `employee`, including those not currently present in the system\n\nSee https://openfga.dev/docs/concepts#what-is-type-bound-public-access", + "description": "Type bound public access.\n\nNormally represented using the `\u003ctype\u003e:*` syntax\n\n`employee:*` represents every object of type `employee`, including those not currently present in the system\n\nSee https://openfga.dev/docs/concepts#what-is-type-bound-public-access", "required": [ "type" ] @@ -2680,7 +2782,7 @@ "example": "member" } }, - "description": "Userset.\n\nA set or group of users, represented in the `:#` format\n\n`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.\n\nSee: https://openfga.dev/docs/modeling/building-blocks/usersets#what-is-a-userset", + "description": "Userset.\n\nA set or group of users, represented in the `\u003ctype\u003e:\u003cid\u003e#\u003crelation\u003e` format\n\n`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.\n\nSee: https://openfga.dev/docs/modeling/building-blocks/usersets#what-is-a-userset", "required": [ "type", "id", @@ -2720,9 +2822,51 @@ "Wildcard": { "type": "object" }, + "WriteAssertionsBody": { + "type": "object", + "properties": { + "assertions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/Assertion", + "maximum": 100 + } + } + }, + "required": [ + "assertions" + ] + }, "WriteAssertionsResponse": { "type": "object" }, + "WriteAuthorizationModelBody": { + "type": "object", + "properties": { + "type_definitions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/TypeDefinition", + "minimum": 1 + } + }, + "schema_version": { + "type": "string" + }, + "conditions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Condition" + } + } + }, + "required": [ + "type_definitions", + "schema_version" + ] + }, "WriteAuthorizationModelResponse": { "type": "object", "properties": { @@ -2735,6 +2879,21 @@ "authorization_model_id" ] }, + "WriteBody": { + "type": "object", + "properties": { + "writes": { + "$ref": "#/definitions/WriteRequestWrites" + }, + "deletes": { + "$ref": "#/definitions/WriteRequestDeletes" + }, + "authorization_model_id": { + "type": "string", + "example": "01G5JAVJ41T49E9TT3SKVS7X1J" + } + } + }, "WriteRequestDeletes": { "type": "object", "properties": { diff --git a/proto/openfga/v1/authzmodel.pb.go b/proto/openfga/v1/authzmodel.pb.go index 388a7b6b..e724af2f 100644 --- a/proto/openfga/v1/authzmodel.pb.go +++ b/proto/openfga/v1/authzmodel.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: openfga/v1/authzmodel.proto @@ -1586,7 +1586,7 @@ func file_openfga_v1_authzmodel_proto_rawDescGZIP() []byte { var file_openfga_v1_authzmodel_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_openfga_v1_authzmodel_proto_msgTypes = make([]protoimpl.MessageInfo, 23) -var file_openfga_v1_authzmodel_proto_goTypes = []interface{}{ +var file_openfga_v1_authzmodel_proto_goTypes = []any{ (ConditionParamTypeRef_TypeName)(0), // 0: openfga.v1.ConditionParamTypeRef.TypeName (*AuthorizationModel)(nil), // 1: openfga.v1.AuthorizationModel (*TypeDefinition)(nil), // 2: openfga.v1.TypeDefinition @@ -1658,7 +1658,7 @@ func file_openfga_v1_authzmodel_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_openfga_v1_authzmodel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*AuthorizationModel); i { case 0: return &v.state @@ -1670,7 +1670,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*TypeDefinition); i { case 0: return &v.state @@ -1682,7 +1682,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Relation); i { case 0: return &v.state @@ -1694,7 +1694,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*RelationTypeInfo); i { case 0: return &v.state @@ -1706,7 +1706,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Metadata); i { case 0: return &v.state @@ -1718,7 +1718,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*SourceInfo); i { case 0: return &v.state @@ -1730,7 +1730,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*RelationMetadata); i { case 0: return &v.state @@ -1742,7 +1742,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*RelationReference); i { case 0: return &v.state @@ -1754,7 +1754,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*Wildcard); i { case 0: return &v.state @@ -1766,7 +1766,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*Usersets); i { case 0: return &v.state @@ -1778,7 +1778,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*Difference); i { case 0: return &v.state @@ -1790,7 +1790,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*Userset); i { case 0: return &v.state @@ -1802,7 +1802,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*DirectUserset); i { case 0: return &v.state @@ -1814,7 +1814,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*ObjectRelation); i { case 0: return &v.state @@ -1826,7 +1826,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*ComputedUserset); i { case 0: return &v.state @@ -1838,7 +1838,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*TupleToUserset); i { case 0: return &v.state @@ -1850,7 +1850,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*Condition); i { case 0: return &v.state @@ -1862,7 +1862,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*ConditionMetadata); i { case 0: return &v.state @@ -1874,7 +1874,7 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } - file_openfga_v1_authzmodel_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_authzmodel_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*ConditionParamTypeRef); i { case 0: return &v.state @@ -1887,11 +1887,11 @@ func file_openfga_v1_authzmodel_proto_init() { } } } - file_openfga_v1_authzmodel_proto_msgTypes[7].OneofWrappers = []interface{}{ + file_openfga_v1_authzmodel_proto_msgTypes[7].OneofWrappers = []any{ (*RelationReference_Relation)(nil), (*RelationReference_Wildcard)(nil), } - file_openfga_v1_authzmodel_proto_msgTypes[11].OneofWrappers = []interface{}{ + file_openfga_v1_authzmodel_proto_msgTypes[11].OneofWrappers = []any{ (*Userset_This)(nil), (*Userset_ComputedUserset)(nil), (*Userset_TupleToUserset)(nil), diff --git a/proto/openfga/v1/errors_ignore.pb.go b/proto/openfga/v1/errors_ignore.pb.go index 562e1d84..2253bdab 100644 --- a/proto/openfga/v1/errors_ignore.pb.go +++ b/proto/openfga/v1/errors_ignore.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: openfga/v1/errors_ignore.proto @@ -1050,7 +1050,7 @@ func file_openfga_v1_errors_ignore_proto_rawDescGZIP() []byte { var file_openfga_v1_errors_ignore_proto_enumTypes = make([]protoimpl.EnumInfo, 5) var file_openfga_v1_errors_ignore_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_openfga_v1_errors_ignore_proto_goTypes = []interface{}{ +var file_openfga_v1_errors_ignore_proto_goTypes = []any{ (AuthErrorCode)(0), // 0: openfga.v1.AuthErrorCode (ErrorCode)(0), // 1: openfga.v1.ErrorCode (UnprocessableContentErrorCode)(0), // 2: openfga.v1.UnprocessableContentErrorCode @@ -1083,7 +1083,7 @@ func file_openfga_v1_errors_ignore_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_openfga_v1_errors_ignore_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_errors_ignore_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ValidationErrorMessageResponse); i { case 0: return &v.state @@ -1095,7 +1095,7 @@ func file_openfga_v1_errors_ignore_proto_init() { return nil } } - file_openfga_v1_errors_ignore_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_errors_ignore_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*UnauthenticatedResponse); i { case 0: return &v.state @@ -1107,7 +1107,7 @@ func file_openfga_v1_errors_ignore_proto_init() { return nil } } - file_openfga_v1_errors_ignore_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_errors_ignore_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*UnprocessableContentMessageResponse); i { case 0: return &v.state @@ -1119,7 +1119,7 @@ func file_openfga_v1_errors_ignore_proto_init() { return nil } } - file_openfga_v1_errors_ignore_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_errors_ignore_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*InternalErrorMessageResponse); i { case 0: return &v.state @@ -1131,7 +1131,7 @@ func file_openfga_v1_errors_ignore_proto_init() { return nil } } - file_openfga_v1_errors_ignore_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_errors_ignore_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*PathUnknownErrorMessageResponse); i { case 0: return &v.state @@ -1143,7 +1143,7 @@ func file_openfga_v1_errors_ignore_proto_init() { return nil } } - file_openfga_v1_errors_ignore_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_errors_ignore_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*AbortedMessageResponse); i { case 0: return &v.state @@ -1155,7 +1155,7 @@ func file_openfga_v1_errors_ignore_proto_init() { return nil } } - file_openfga_v1_errors_ignore_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_errors_ignore_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*ErrorMessageRequest); i { case 0: return &v.state diff --git a/proto/openfga/v1/openapi.pb.go b/proto/openfga/v1/openapi.pb.go index 33826232..01a56c6f 100644 --- a/proto/openfga/v1/openapi.pb.go +++ b/proto/openfga/v1/openapi.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: openfga/v1/openapi.proto @@ -96,7 +96,7 @@ var file_openfga_v1_openapi_proto_rawDesc = []byte{ 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -var file_openfga_v1_openapi_proto_goTypes = []interface{}{} +var file_openfga_v1_openapi_proto_goTypes = []any{} var file_openfga_v1_openapi_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/proto/openfga/v1/openfga.pb.go b/proto/openfga/v1/openfga.pb.go index 2f636756..33546618 100644 --- a/proto/openfga/v1/openfga.pb.go +++ b/proto/openfga/v1/openfga.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: openfga/v1/openfga.proto @@ -1666,7 +1666,7 @@ func file_openfga_v1_openfga_proto_rawDescGZIP() []byte { var file_openfga_v1_openfga_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_openfga_v1_openfga_proto_msgTypes = make([]protoimpl.MessageInfo, 21) -var file_openfga_v1_openfga_proto_goTypes = []interface{}{ +var file_openfga_v1_openfga_proto_goTypes = []any{ (TupleOperation)(0), // 0: openfga.v1.TupleOperation (*Object)(nil), // 1: openfga.v1.Object (*User)(nil), // 2: openfga.v1.User @@ -1733,7 +1733,7 @@ func file_openfga_v1_openfga_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_openfga_v1_openfga_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Object); i { case 0: return &v.state @@ -1745,7 +1745,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*User); i { case 0: return &v.state @@ -1757,7 +1757,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*UsersetUser); i { case 0: return &v.state @@ -1769,7 +1769,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*RelationshipCondition); i { case 0: return &v.state @@ -1781,7 +1781,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*TupleKeyWithoutCondition); i { case 0: return &v.state @@ -1793,7 +1793,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*TypedWildcard); i { case 0: return &v.state @@ -1805,7 +1805,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*TupleKey); i { case 0: return &v.state @@ -1817,7 +1817,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*Tuple); i { case 0: return &v.state @@ -1829,7 +1829,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*TupleKeys); i { case 0: return &v.state @@ -1841,7 +1841,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*ContextualTupleKeys); i { case 0: return &v.state @@ -1853,7 +1853,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*UsersetTree); i { case 0: return &v.state @@ -1865,7 +1865,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*TupleChange); i { case 0: return &v.state @@ -1877,7 +1877,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*Store); i { case 0: return &v.state @@ -1889,7 +1889,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*UserTypeFilter); i { case 0: return &v.state @@ -1901,7 +1901,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*UsersetTree_Leaf); i { case 0: return &v.state @@ -1913,7 +1913,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*UsersetTree_Nodes); i { case 0: return &v.state @@ -1925,7 +1925,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*UsersetTree_Users); i { case 0: return &v.state @@ -1937,7 +1937,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*UsersetTree_Computed); i { case 0: return &v.state @@ -1949,7 +1949,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*UsersetTree_TupleToUserset); i { case 0: return &v.state @@ -1961,7 +1961,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*UsersetTree_Difference); i { case 0: return &v.state @@ -1973,7 +1973,7 @@ func file_openfga_v1_openfga_proto_init() { return nil } } - file_openfga_v1_openfga_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*UsersetTree_Node); i { case 0: return &v.state @@ -1986,17 +1986,17 @@ func file_openfga_v1_openfga_proto_init() { } } } - file_openfga_v1_openfga_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_openfga_v1_openfga_proto_msgTypes[1].OneofWrappers = []any{ (*User_Object)(nil), (*User_Userset)(nil), (*User_Wildcard)(nil), } - file_openfga_v1_openfga_proto_msgTypes[14].OneofWrappers = []interface{}{ + file_openfga_v1_openfga_proto_msgTypes[14].OneofWrappers = []any{ (*UsersetTree_Leaf_Users)(nil), (*UsersetTree_Leaf_Computed)(nil), (*UsersetTree_Leaf_TupleToUserset)(nil), } - file_openfga_v1_openfga_proto_msgTypes[20].OneofWrappers = []interface{}{ + file_openfga_v1_openfga_proto_msgTypes[20].OneofWrappers = []any{ (*UsersetTree_Node_Leaf)(nil), (*UsersetTree_Node_Difference)(nil), (*UsersetTree_Node_Union)(nil), diff --git a/proto/openfga/v1/openfga_service.pb.go b/proto/openfga/v1/openfga_service.pb.go index 1b2c369f..347ee29e 100644 --- a/proto/openfga/v1/openfga_service.pb.go +++ b/proto/openfga/v1/openfga_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: openfga/v1/openfga_service.proto @@ -5055,7 +5055,7 @@ func file_openfga_v1_openfga_service_proto_rawDescGZIP() []byte { var file_openfga_v1_openfga_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_openfga_v1_openfga_service_proto_msgTypes = make([]protoimpl.MessageInfo, 45) -var file_openfga_v1_openfga_service_proto_goTypes = []interface{}{ +var file_openfga_v1_openfga_service_proto_goTypes = []any{ (ConsistencyPreference)(0), // 0: openfga.v1.ConsistencyPreference (*ListObjectsRequest)(nil), // 1: openfga.v1.ListObjectsRequest (*ListObjectsResponse)(nil), // 2: openfga.v1.ListObjectsResponse @@ -5221,7 +5221,7 @@ func file_openfga_v1_openfga_service_proto_init() { file_openfga_v1_authzmodel_proto_init() file_openfga_v1_openfga_proto_init() if !protoimpl.UnsafeEnabled { - file_openfga_v1_openfga_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ListObjectsRequest); i { case 0: return &v.state @@ -5233,7 +5233,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ListObjectsResponse); i { case 0: return &v.state @@ -5245,7 +5245,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ListUsersRequest); i { case 0: return &v.state @@ -5257,7 +5257,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ListUsersResponse); i { case 0: return &v.state @@ -5269,7 +5269,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*StreamedListObjectsRequest); i { case 0: return &v.state @@ -5281,7 +5281,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*StreamedListObjectsResponse); i { case 0: return &v.state @@ -5293,7 +5293,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*ReadRequest); i { case 0: return &v.state @@ -5305,7 +5305,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*ReadRequestTupleKey); i { case 0: return &v.state @@ -5317,7 +5317,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*ReadResponse); i { case 0: return &v.state @@ -5329,7 +5329,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*WriteRequestWrites); i { case 0: return &v.state @@ -5341,7 +5341,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*WriteRequestDeletes); i { case 0: return &v.state @@ -5353,7 +5353,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*WriteRequest); i { case 0: return &v.state @@ -5365,7 +5365,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*WriteResponse); i { case 0: return &v.state @@ -5377,7 +5377,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*CheckRequest); i { case 0: return &v.state @@ -5389,7 +5389,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*CheckRequestTupleKey); i { case 0: return &v.state @@ -5401,7 +5401,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*CheckResponse); i { case 0: return &v.state @@ -5413,7 +5413,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*ExpandRequest); i { case 0: return &v.state @@ -5425,7 +5425,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*ExpandRequestTupleKey); i { case 0: return &v.state @@ -5437,7 +5437,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*ExpandResponse); i { case 0: return &v.state @@ -5449,7 +5449,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*ReadAuthorizationModelRequest); i { case 0: return &v.state @@ -5461,7 +5461,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*ReadAuthorizationModelResponse); i { case 0: return &v.state @@ -5473,7 +5473,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*WriteAuthorizationModelRequest); i { case 0: return &v.state @@ -5485,7 +5485,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*WriteAuthorizationModelResponse); i { case 0: return &v.state @@ -5497,7 +5497,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*ReadAuthorizationModelsRequest); i { case 0: return &v.state @@ -5509,7 +5509,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*ReadAuthorizationModelsResponse); i { case 0: return &v.state @@ -5521,7 +5521,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[25].Exporter = func(v any, i int) any { switch v := v.(*WriteAssertionsRequest); i { case 0: return &v.state @@ -5533,7 +5533,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[26].Exporter = func(v any, i int) any { switch v := v.(*WriteAssertionsResponse); i { case 0: return &v.state @@ -5545,7 +5545,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[27].Exporter = func(v any, i int) any { switch v := v.(*ReadAssertionsRequest); i { case 0: return &v.state @@ -5557,7 +5557,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[28].Exporter = func(v any, i int) any { switch v := v.(*ReadAssertionsResponse); i { case 0: return &v.state @@ -5569,7 +5569,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[29].Exporter = func(v any, i int) any { switch v := v.(*ReadChangesRequest); i { case 0: return &v.state @@ -5581,7 +5581,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[30].Exporter = func(v any, i int) any { switch v := v.(*ReadChangesResponse); i { case 0: return &v.state @@ -5593,7 +5593,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[31].Exporter = func(v any, i int) any { switch v := v.(*CreateStoreRequest); i { case 0: return &v.state @@ -5605,7 +5605,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[32].Exporter = func(v any, i int) any { switch v := v.(*CreateStoreResponse); i { case 0: return &v.state @@ -5617,7 +5617,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[33].Exporter = func(v any, i int) any { switch v := v.(*UpdateStoreRequest); i { case 0: return &v.state @@ -5629,7 +5629,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[34].Exporter = func(v any, i int) any { switch v := v.(*UpdateStoreResponse); i { case 0: return &v.state @@ -5641,7 +5641,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[35].Exporter = func(v any, i int) any { switch v := v.(*DeleteStoreRequest); i { case 0: return &v.state @@ -5653,7 +5653,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[36].Exporter = func(v any, i int) any { switch v := v.(*DeleteStoreResponse); i { case 0: return &v.state @@ -5665,7 +5665,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[37].Exporter = func(v any, i int) any { switch v := v.(*GetStoreRequest); i { case 0: return &v.state @@ -5677,7 +5677,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[38].Exporter = func(v any, i int) any { switch v := v.(*GetStoreResponse); i { case 0: return &v.state @@ -5689,7 +5689,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[39].Exporter = func(v any, i int) any { switch v := v.(*ListStoresRequest); i { case 0: return &v.state @@ -5701,7 +5701,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[40].Exporter = func(v any, i int) any { switch v := v.(*ListStoresResponse); i { case 0: return &v.state @@ -5713,7 +5713,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[41].Exporter = func(v any, i int) any { switch v := v.(*AssertionTupleKey); i { case 0: return &v.state @@ -5725,7 +5725,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[42].Exporter = func(v any, i int) any { switch v := v.(*Assertion); i { case 0: return &v.state @@ -5737,7 +5737,7 @@ func file_openfga_v1_openfga_service_proto_init() { return nil } } - file_openfga_v1_openfga_service_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + file_openfga_v1_openfga_service_proto_msgTypes[43].Exporter = func(v any, i int) any { switch v := v.(*Assertions); i { case 0: return &v.state diff --git a/proto/openfga/v1/openfga_service.pb.gw.go b/proto/openfga/v1/openfga_service.pb.gw.go index 6528507e..6fa76eb4 100644 --- a/proto/openfga/v1/openfga_service.pb.gw.go +++ b/proto/openfga/v1/openfga_service.pb.gw.go @@ -1083,6 +1083,7 @@ func local_request_OpenFGAService_ListUsers_0(ctx context.Context, marshaler run // UnaryRPC :call OpenFGAServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterOpenFGAServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterOpenFGAServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OpenFGAServiceServer) error { mux.Handle("POST", pattern_OpenFGAService_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1523,21 +1524,21 @@ func RegisterOpenFGAServiceHandlerServer(ctx context.Context, mux *runtime.Serve // RegisterOpenFGAServiceHandlerFromEndpoint is same as RegisterOpenFGAServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterOpenFGAServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -1555,7 +1556,7 @@ func RegisterOpenFGAServiceHandler(ctx context.Context, mux *runtime.ServeMux, c // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "OpenFGAServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "OpenFGAServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "OpenFGAServiceClient" to call the correct interceptors. +// "OpenFGAServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterOpenFGAServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OpenFGAServiceClient) error { mux.Handle("POST", pattern_OpenFGAService_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/proto/openfga/v1/openfga_service_grpc.pb.go b/proto/openfga/v1/openfga_service_grpc.pb.go index 1d720485..0d1e0bed 100644 --- a/proto/openfga/v1/openfga_service_grpc.pb.go +++ b/proto/openfga/v1/openfga_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: openfga/v1/openfga_service.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( OpenFGAService_Read_FullMethodName = "/openfga.v1.OpenFGAService/Read" @@ -58,7 +58,7 @@ type OpenFGAServiceClient interface { DeleteStore(ctx context.Context, in *DeleteStoreRequest, opts ...grpc.CallOption) (*DeleteStoreResponse, error) GetStore(ctx context.Context, in *GetStoreRequest, opts ...grpc.CallOption) (*GetStoreResponse, error) ListStores(ctx context.Context, in *ListStoresRequest, opts ...grpc.CallOption) (*ListStoresResponse, error) - StreamedListObjects(ctx context.Context, in *StreamedListObjectsRequest, opts ...grpc.CallOption) (OpenFGAService_StreamedListObjectsClient, error) + StreamedListObjects(ctx context.Context, in *StreamedListObjectsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamedListObjectsResponse], error) ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) } @@ -72,8 +72,9 @@ func NewOpenFGAServiceClient(cc grpc.ClientConnInterface) OpenFGAServiceClient { } func (c *openFGAServiceClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ReadResponse) - err := c.cc.Invoke(ctx, OpenFGAService_Read_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_Read_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -81,8 +82,9 @@ func (c *openFGAServiceClient) Read(ctx context.Context, in *ReadRequest, opts . } func (c *openFGAServiceClient) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WriteResponse) - err := c.cc.Invoke(ctx, OpenFGAService_Write_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_Write_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -90,8 +92,9 @@ func (c *openFGAServiceClient) Write(ctx context.Context, in *WriteRequest, opts } func (c *openFGAServiceClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CheckResponse) - err := c.cc.Invoke(ctx, OpenFGAService_Check_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_Check_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -99,8 +102,9 @@ func (c *openFGAServiceClient) Check(ctx context.Context, in *CheckRequest, opts } func (c *openFGAServiceClient) Expand(ctx context.Context, in *ExpandRequest, opts ...grpc.CallOption) (*ExpandResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ExpandResponse) - err := c.cc.Invoke(ctx, OpenFGAService_Expand_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_Expand_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -108,8 +112,9 @@ func (c *openFGAServiceClient) Expand(ctx context.Context, in *ExpandRequest, op } func (c *openFGAServiceClient) ReadAuthorizationModels(ctx context.Context, in *ReadAuthorizationModelsRequest, opts ...grpc.CallOption) (*ReadAuthorizationModelsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ReadAuthorizationModelsResponse) - err := c.cc.Invoke(ctx, OpenFGAService_ReadAuthorizationModels_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_ReadAuthorizationModels_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -117,8 +122,9 @@ func (c *openFGAServiceClient) ReadAuthorizationModels(ctx context.Context, in * } func (c *openFGAServiceClient) ReadAuthorizationModel(ctx context.Context, in *ReadAuthorizationModelRequest, opts ...grpc.CallOption) (*ReadAuthorizationModelResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ReadAuthorizationModelResponse) - err := c.cc.Invoke(ctx, OpenFGAService_ReadAuthorizationModel_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_ReadAuthorizationModel_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -126,8 +132,9 @@ func (c *openFGAServiceClient) ReadAuthorizationModel(ctx context.Context, in *R } func (c *openFGAServiceClient) WriteAuthorizationModel(ctx context.Context, in *WriteAuthorizationModelRequest, opts ...grpc.CallOption) (*WriteAuthorizationModelResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WriteAuthorizationModelResponse) - err := c.cc.Invoke(ctx, OpenFGAService_WriteAuthorizationModel_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_WriteAuthorizationModel_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -135,8 +142,9 @@ func (c *openFGAServiceClient) WriteAuthorizationModel(ctx context.Context, in * } func (c *openFGAServiceClient) WriteAssertions(ctx context.Context, in *WriteAssertionsRequest, opts ...grpc.CallOption) (*WriteAssertionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WriteAssertionsResponse) - err := c.cc.Invoke(ctx, OpenFGAService_WriteAssertions_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_WriteAssertions_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -144,8 +152,9 @@ func (c *openFGAServiceClient) WriteAssertions(ctx context.Context, in *WriteAss } func (c *openFGAServiceClient) ReadAssertions(ctx context.Context, in *ReadAssertionsRequest, opts ...grpc.CallOption) (*ReadAssertionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ReadAssertionsResponse) - err := c.cc.Invoke(ctx, OpenFGAService_ReadAssertions_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_ReadAssertions_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -153,8 +162,9 @@ func (c *openFGAServiceClient) ReadAssertions(ctx context.Context, in *ReadAsser } func (c *openFGAServiceClient) ReadChanges(ctx context.Context, in *ReadChangesRequest, opts ...grpc.CallOption) (*ReadChangesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ReadChangesResponse) - err := c.cc.Invoke(ctx, OpenFGAService_ReadChanges_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_ReadChanges_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -162,8 +172,9 @@ func (c *openFGAServiceClient) ReadChanges(ctx context.Context, in *ReadChangesR } func (c *openFGAServiceClient) CreateStore(ctx context.Context, in *CreateStoreRequest, opts ...grpc.CallOption) (*CreateStoreResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateStoreResponse) - err := c.cc.Invoke(ctx, OpenFGAService_CreateStore_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_CreateStore_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -171,8 +182,9 @@ func (c *openFGAServiceClient) CreateStore(ctx context.Context, in *CreateStoreR } func (c *openFGAServiceClient) UpdateStore(ctx context.Context, in *UpdateStoreRequest, opts ...grpc.CallOption) (*UpdateStoreResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateStoreResponse) - err := c.cc.Invoke(ctx, OpenFGAService_UpdateStore_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_UpdateStore_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -180,8 +192,9 @@ func (c *openFGAServiceClient) UpdateStore(ctx context.Context, in *UpdateStoreR } func (c *openFGAServiceClient) DeleteStore(ctx context.Context, in *DeleteStoreRequest, opts ...grpc.CallOption) (*DeleteStoreResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteStoreResponse) - err := c.cc.Invoke(ctx, OpenFGAService_DeleteStore_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_DeleteStore_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -189,8 +202,9 @@ func (c *openFGAServiceClient) DeleteStore(ctx context.Context, in *DeleteStoreR } func (c *openFGAServiceClient) GetStore(ctx context.Context, in *GetStoreRequest, opts ...grpc.CallOption) (*GetStoreResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetStoreResponse) - err := c.cc.Invoke(ctx, OpenFGAService_GetStore_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_GetStore_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -198,20 +212,22 @@ func (c *openFGAServiceClient) GetStore(ctx context.Context, in *GetStoreRequest } func (c *openFGAServiceClient) ListStores(ctx context.Context, in *ListStoresRequest, opts ...grpc.CallOption) (*ListStoresResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListStoresResponse) - err := c.cc.Invoke(ctx, OpenFGAService_ListStores_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_ListStores_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *openFGAServiceClient) StreamedListObjects(ctx context.Context, in *StreamedListObjectsRequest, opts ...grpc.CallOption) (OpenFGAService_StreamedListObjectsClient, error) { - stream, err := c.cc.NewStream(ctx, &OpenFGAService_ServiceDesc.Streams[0], OpenFGAService_StreamedListObjects_FullMethodName, opts...) +func (c *openFGAServiceClient) StreamedListObjects(ctx context.Context, in *StreamedListObjectsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamedListObjectsResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &OpenFGAService_ServiceDesc.Streams[0], OpenFGAService_StreamedListObjects_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &openFGAServiceStreamedListObjectsClient{stream} + x := &grpc.GenericClientStream[StreamedListObjectsRequest, StreamedListObjectsResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -221,26 +237,13 @@ func (c *openFGAServiceClient) StreamedListObjects(ctx context.Context, in *Stre return x, nil } -type OpenFGAService_StreamedListObjectsClient interface { - Recv() (*StreamedListObjectsResponse, error) - grpc.ClientStream -} - -type openFGAServiceStreamedListObjectsClient struct { - grpc.ClientStream -} - -func (x *openFGAServiceStreamedListObjectsClient) Recv() (*StreamedListObjectsResponse, error) { - m := new(StreamedListObjectsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type OpenFGAService_StreamedListObjectsClient = grpc.ServerStreamingClient[StreamedListObjectsResponse] func (c *openFGAServiceClient) ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListObjectsResponse) - err := c.cc.Invoke(ctx, OpenFGAService_ListObjects_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_ListObjects_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -248,8 +251,9 @@ func (c *openFGAServiceClient) ListObjects(ctx context.Context, in *ListObjectsR } func (c *openFGAServiceClient) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListUsersResponse) - err := c.cc.Invoke(ctx, OpenFGAService_ListUsers_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, OpenFGAService_ListUsers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -258,7 +262,7 @@ func (c *openFGAServiceClient) ListUsers(ctx context.Context, in *ListUsersReque // OpenFGAServiceServer is the server API for OpenFGAService service. // All implementations must embed UnimplementedOpenFGAServiceServer -// for forward compatibility +// for forward compatibility. type OpenFGAServiceServer interface { Read(context.Context, *ReadRequest) (*ReadResponse, error) Write(context.Context, *WriteRequest) (*WriteResponse, error) @@ -275,15 +279,18 @@ type OpenFGAServiceServer interface { DeleteStore(context.Context, *DeleteStoreRequest) (*DeleteStoreResponse, error) GetStore(context.Context, *GetStoreRequest) (*GetStoreResponse, error) ListStores(context.Context, *ListStoresRequest) (*ListStoresResponse, error) - StreamedListObjects(*StreamedListObjectsRequest, OpenFGAService_StreamedListObjectsServer) error + StreamedListObjects(*StreamedListObjectsRequest, grpc.ServerStreamingServer[StreamedListObjectsResponse]) error ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) mustEmbedUnimplementedOpenFGAServiceServer() } -// UnimplementedOpenFGAServiceServer must be embedded to have forward compatible implementations. -type UnimplementedOpenFGAServiceServer struct { -} +// UnimplementedOpenFGAServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedOpenFGAServiceServer struct{} func (UnimplementedOpenFGAServiceServer) Read(context.Context, *ReadRequest) (*ReadResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Read not implemented") @@ -330,7 +337,7 @@ func (UnimplementedOpenFGAServiceServer) GetStore(context.Context, *GetStoreRequ func (UnimplementedOpenFGAServiceServer) ListStores(context.Context, *ListStoresRequest) (*ListStoresResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListStores not implemented") } -func (UnimplementedOpenFGAServiceServer) StreamedListObjects(*StreamedListObjectsRequest, OpenFGAService_StreamedListObjectsServer) error { +func (UnimplementedOpenFGAServiceServer) StreamedListObjects(*StreamedListObjectsRequest, grpc.ServerStreamingServer[StreamedListObjectsResponse]) error { return status.Errorf(codes.Unimplemented, "method StreamedListObjects not implemented") } func (UnimplementedOpenFGAServiceServer) ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error) { @@ -340,6 +347,7 @@ func (UnimplementedOpenFGAServiceServer) ListUsers(context.Context, *ListUsersRe return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented") } func (UnimplementedOpenFGAServiceServer) mustEmbedUnimplementedOpenFGAServiceServer() {} +func (UnimplementedOpenFGAServiceServer) testEmbeddedByValue() {} // UnsafeOpenFGAServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to OpenFGAServiceServer will @@ -349,6 +357,13 @@ type UnsafeOpenFGAServiceServer interface { } func RegisterOpenFGAServiceServer(s grpc.ServiceRegistrar, srv OpenFGAServiceServer) { + // If the following call pancis, it indicates UnimplementedOpenFGAServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&OpenFGAService_ServiceDesc, srv) } @@ -627,21 +642,11 @@ func _OpenFGAService_StreamedListObjects_Handler(srv interface{}, stream grpc.Se if err := stream.RecvMsg(m); err != nil { return err } - return srv.(OpenFGAServiceServer).StreamedListObjects(m, &openFGAServiceStreamedListObjectsServer{stream}) -} - -type OpenFGAService_StreamedListObjectsServer interface { - Send(*StreamedListObjectsResponse) error - grpc.ServerStream + return srv.(OpenFGAServiceServer).StreamedListObjects(m, &grpc.GenericServerStream[StreamedListObjectsRequest, StreamedListObjectsResponse]{ServerStream: stream}) } -type openFGAServiceStreamedListObjectsServer struct { - grpc.ServerStream -} - -func (x *openFGAServiceStreamedListObjectsServer) Send(m *StreamedListObjectsResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type OpenFGAService_StreamedListObjectsServer = grpc.ServerStreamingServer[StreamedListObjectsResponse] func _OpenFGAService_ListObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListObjectsRequest)