snapshot of https://github.com/ory/keto.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
CI / Run lints and checks (push) Failing after 47s
CI / Run tests (push) Failing after 1s
CI / Run race tests (push) Failing after 5s
CI / Build CLI docs (push) Has been skipped
CI / Run buf actions (push) Failing after 5s
CodeQL / Analyze (go) (push) Failing after 3s
CodeQL / Analyze (javascript) (push) Failing after 2s
Docker Image Scanners / scanners (push) Failing after 3s
Format / format (push) Failing after 3s
Synchronize Issue Labels / Synchronize Issue Labels (push) Has been skipped
CI / Generate release (push) Has been skipped
CI / Draft newsletter (push) Has been skipped
CI / Pending approval Slack notification (push) Has been skipped
CI / Send newsletter (push) Has been skipped
Some checks failed
CI / Run lints and checks (push) Failing after 47s
CI / Run tests (push) Failing after 1s
CI / Run race tests (push) Failing after 5s
CI / Build CLI docs (push) Has been skipped
CI / Run buf actions (push) Failing after 5s
CodeQL / Analyze (go) (push) Failing after 3s
CodeQL / Analyze (javascript) (push) Failing after 2s
Docker Image Scanners / scanners (push) Failing after 3s
Format / format (push) Failing after 3s
Synchronize Issue Labels / Synchronize Issue Labels (push) Has been skipped
CI / Generate release (push) Has been skipped
CI / Draft newsletter (push) Has been skipped
CI / Pending approval Slack notification (push) Has been skipped
CI / Send newsletter (push) Has been skipped
This commit is contained in:
652
gen/doc/buf.md
Normal file
652
gen/doc/buf.md
Normal file
@@ -0,0 +1,652 @@
|
||||
<!-- This file is automatically generated. DO NOT EDIT! -->
|
||||
<!-- Needed because of https://github.com/pseudomuto/protoc-gen-doc/issues/274 -->
|
||||
|
||||
# Protocol Documentation
|
||||
|
||||
<a name="top"></a>
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [ory/keto/opl/v1alpha1/syntax_service.proto](#ory_keto_opl_v1alpha1_syntax_service-proto)
|
||||
- [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest)
|
||||
- [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse)
|
||||
- [ParseError](#ory-keto-opl-v1alpha1-ParseError)
|
||||
- [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition)
|
||||
- [SyntaxService](#ory-keto-opl-v1alpha1-SyntaxService)
|
||||
|
||||
- [ory/keto/relation_tuples/v1alpha2/relation_tuples.proto](#ory_keto_relation_tuples_v1alpha2_relation_tuples-proto)
|
||||
- [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery)
|
||||
- [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple)
|
||||
- [Subject](#ory-keto-relation_tuples-v1alpha2-Subject)
|
||||
- [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet)
|
||||
- [ory/keto/relation_tuples/v1alpha2/check_service.proto](#ory_keto_relation_tuples_v1alpha2_check_service-proto)
|
||||
- [BatchCheckRequest](#ory-keto-relation_tuples-v1alpha2-BatchCheckRequest)
|
||||
- [BatchCheckResponse](#ory-keto-relation_tuples-v1alpha2-BatchCheckResponse)
|
||||
- [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest)
|
||||
- [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse)
|
||||
- [CheckResponseWithError](#ory-keto-relation_tuples-v1alpha2-CheckResponseWithError)
|
||||
- [CheckService](#ory-keto-relation_tuples-v1alpha2-CheckService)
|
||||
|
||||
- [ory/keto/relation_tuples/v1alpha2/expand_service.proto](#ory_keto_relation_tuples_v1alpha2_expand_service-proto)
|
||||
- [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest)
|
||||
- [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse)
|
||||
- [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree)
|
||||
- [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType)
|
||||
- [ExpandService](#ory-keto-relation_tuples-v1alpha2-ExpandService)
|
||||
|
||||
- [ory/keto/relation_tuples/v1alpha2/namespaces_service.proto](#ory_keto_relation_tuples_v1alpha2_namespaces_service-proto)
|
||||
- [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest)
|
||||
- [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse)
|
||||
- [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace)
|
||||
- [NamespacesService](#ory-keto-relation_tuples-v1alpha2-NamespacesService)
|
||||
|
||||
- [ory/keto/relation_tuples/v1alpha2/read_service.proto](#ory_keto_relation_tuples_v1alpha2_read_service-proto)
|
||||
- [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest)
|
||||
- [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query)
|
||||
- [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse)
|
||||
- [ReadService](#ory-keto-relation_tuples-v1alpha2-ReadService)
|
||||
|
||||
- [ory/keto/relation_tuples/v1alpha2/version.proto](#ory_keto_relation_tuples_v1alpha2_version-proto)
|
||||
- [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest)
|
||||
- [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse)
|
||||
- [VersionService](#ory-keto-relation_tuples-v1alpha2-VersionService)
|
||||
|
||||
- [ory/keto/relation_tuples/v1alpha2/write_service.proto](#ory_keto_relation_tuples_v1alpha2_write_service-proto)
|
||||
- [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest)
|
||||
- [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query)
|
||||
- [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse)
|
||||
- [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta)
|
||||
- [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest)
|
||||
- [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse)
|
||||
- [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action)
|
||||
- [WriteService](#ory-keto-relation_tuples-v1alpha2-WriteService)
|
||||
|
||||
- [Scalar Value Types](#scalar-value-types)
|
||||
|
||||
<a name="ory_keto_opl_v1alpha1_syntax_service-proto"></a>
|
||||
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## ory/keto/opl/v1alpha1/syntax_service.proto
|
||||
|
||||
<a name="ory-keto-opl-v1alpha1-CheckRequest"></a>
|
||||
|
||||
### CheckRequest
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ------- | --------------- | ----- | ----------- |
|
||||
| content | [bytes](#bytes) | | |
|
||||
|
||||
<a name="ory-keto-opl-v1alpha1-CheckResponse"></a>
|
||||
|
||||
### CheckResponse
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ------------ | ----------------------------------------------- | -------- | ----------- |
|
||||
| parse_errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | |
|
||||
|
||||
<a name="ory-keto-opl-v1alpha1-ParseError"></a>
|
||||
|
||||
### ParseError
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ------- | ------------------------------------------------------- | ----- | ----------- |
|
||||
| message | [string](#string) | | |
|
||||
| start | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | |
|
||||
| end | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | |
|
||||
|
||||
<a name="ory-keto-opl-v1alpha1-SourcePosition"></a>
|
||||
|
||||
### SourcePosition
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ------ | ----------------- | ----- | ----------- |
|
||||
| line | [uint32](#uint32) | | |
|
||||
| column | [uint32](#uint32) | | |
|
||||
|
||||
<!-- end messages -->
|
||||
|
||||
<!-- end enums -->
|
||||
|
||||
<!-- end HasExtensions -->
|
||||
|
||||
<a name="ory-keto-opl-v1alpha1-SyntaxService"></a>
|
||||
|
||||
### SyntaxService
|
||||
|
||||
The service that checks the syntax of an OPL file.
|
||||
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ----------- | --------------------------------------------------- | ----------------------------------------------------- | -------------------------------- |
|
||||
| Check | [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) | [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) | Performs a syntax check request. |
|
||||
|
||||
<!-- end services -->
|
||||
|
||||
<a name="ory_keto_relation_tuples_v1alpha2_relation_tuples-proto"></a>
|
||||
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## ory/keto/relation_tuples/v1alpha2/relation_tuples.proto
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-RelationQuery"></a>
|
||||
|
||||
### RelationQuery
|
||||
|
||||
The query for listing relationships. Clients can specify any optional field to
|
||||
partially filter for specific relationships.
|
||||
|
||||
Example use cases (namespace is always required):
|
||||
|
||||
- object only: display a list of all permissions referring to a specific object
|
||||
- relation only: get all groups that have members; get all directories that have
|
||||
content
|
||||
- object & relation: display all subjects that have a specific permission
|
||||
relation
|
||||
- subject & relation: display all groups a subject belongs to; display all
|
||||
objects a subject has access to
|
||||
- object & relation & subject: check whether the relation tuple already exists
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| --------- | ----------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| namespace | [string](#string) | optional | The namespace this relation tuple lives in. |
|
||||
| object | [string](#string) | optional | The object related by this tuple.<br/>It is an object in the namespace of the tuple. |
|
||||
| relation | [string](#string) | optional | The relation between an Object and a Subject. |
|
||||
| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | optional | The subject related by this tuple.<br/>A Subject either represents a concrete subject id or<br/>a `SubjectSet` that expands to more Subjects. |
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-RelationTuple"></a>
|
||||
|
||||
### RelationTuple
|
||||
|
||||
RelationTuple defines a relation between an Object and a Subject.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| --------- | ----------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| namespace | [string](#string) | | The namespace this relation tuple lives in. |
|
||||
| object | [string](#string) | | The object related by this tuple.<br/>It is an object in the namespace of the tuple. |
|
||||
| relation | [string](#string) | | The relation between an Object and a Subject. |
|
||||
| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject related by this tuple.<br/>A Subject either represents a concrete subject id or<br/>a `SubjectSet` that expands to more Subjects. |
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-Subject"></a>
|
||||
|
||||
### Subject
|
||||
|
||||
Subject is either a concrete subject id or a `SubjectSet` expanding to more
|
||||
Subjects.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ----------------------------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| id | [string](#string) | | A concrete id of the subject. |
|
||||
| set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects.<br/>More information are available under [concepts](../concepts/15_subjects.mdx). |
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-SubjectSet"></a>
|
||||
|
||||
### SubjectSet
|
||||
|
||||
SubjectSet refers to all subjects who have the same `relation` on an `object`.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| --------- | ----------------- | ----- | ---------------------------------------------------------------------------- |
|
||||
| namespace | [string](#string) | | The namespace of the object and relation<br/>referenced in this subject set. |
|
||||
| object | [string](#string) | | The object related by this subject set. |
|
||||
| relation | [string](#string) | | The relation between the object and the subjects. |
|
||||
|
||||
<!-- end messages -->
|
||||
|
||||
<!-- end enums -->
|
||||
|
||||
<!-- end HasExtensions -->
|
||||
|
||||
<!-- end services -->
|
||||
|
||||
<a name="ory_keto_relation_tuples_v1alpha2_check_service-proto"></a>
|
||||
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## ory/keto/relation_tuples/v1alpha2/check_service.proto
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-BatchCheckRequest"></a>
|
||||
|
||||
### BatchCheckRequest
|
||||
|
||||
The request for a CheckService.BatchCheck RPC. Checks a batch of relations.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| --------- | ----------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| tuples | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | repeated | |
|
||||
| latest | [bool](#bool) | | This field is not implemented yet and has no effect.<br/><!--<br/>Set this field to `true` in case your application<br/>needs to authorize depending on up to date ACLs,<br/>also called a "content-change check".<br/><br/>If set to `true` the `snaptoken` field is ignored,<br/>the check is evaluated at the latest snapshot<br/>(globally consistent) and the response includes a<br/>snaptoken for clients to store along with object<br/>contents that can be used for subsequent checks<br/>of the same content version.<br/><br/>Example use case:<br/> - You need to authorize a user to modify/delete some resource<br/> and it is unacceptable that if the permission to do that had<br/> just been revoked some seconds ago so that the change had not<br/> yet been fully replicated to all availability zones.<br/>--> |
|
||||
| snaptoken | [string](#string) | | This field is not implemented yet and has no effect.<br/><!--<br/>Optional. Like reads, a check is always evaluated at a<br/>consistent snapshot no earlier than the given snaptoken.<br/><br/>Leave this field blank if you want to evaluate the check<br/>based on eventually consistent ACLs, benefiting from very<br/>low latency, but possibly slightly stale results.<br/><br/>If the specified token is too old and no longer known,<br/>the server falls back as if no snaptoken had been specified.<br/><br/>If not specified the server tries to evaluate the check<br/>on the best snapshot version where it is very likely that<br/>ACLs had already been replicated to all availability zones.<br/>--> |
|
||||
| max_depth | [int32](#int32) | | The maximum depth to search for a relation.<br/><br/>If the value is less than 1 or greater than the global<br/>max-depth then the global max-depth will be used instead. |
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-BatchCheckResponse"></a>
|
||||
|
||||
### BatchCheckResponse
|
||||
|
||||
The response for a CheckService.BatchCheck rpc.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ------- | ----------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------- |
|
||||
| results | [CheckResponseWithError](#ory-keto-relation_tuples-v1alpha2-CheckResponseWithError) | repeated | The results of the batch check. The order of these<br/>results will match the order of the input. |
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-CheckRequest"></a>
|
||||
|
||||
### CheckRequest
|
||||
|
||||
The request for a CheckService.Check RPC. Checks whether a specific subject is
|
||||
related to an object.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| --------- | ----------------------------------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| namespace | [string](#string) | | **Deprecated.** The namespace to evaluate the check.<br/><br/>Note: If you use the expand-API and the check<br/>evaluates a RelationTuple specifying a SubjectSet as<br/>subject or due to a rewrite rule in a namespace config<br/>this check request may involve other namespaces automatically. |
|
||||
| object | [string](#string) | | **Deprecated.** The related object in this check. |
|
||||
| relation | [string](#string) | | **Deprecated.** The relation between the Object and the Subject. |
|
||||
| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The related subject in this check. |
|
||||
| tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | |
|
||||
| latest | [bool](#bool) | | This field is not implemented yet and has no effect.<br/><!--<br/>Set this field to `true` in case your application<br/>needs to authorize depending on up to date ACLs,<br/>also called a "content-change check".<br/><br/>If set to `true` the `snaptoken` field is ignored,<br/>the check is evaluated at the latest snapshot<br/>(globally consistent) and the response includes a<br/>snaptoken for clients to store along with object<br/>contents that can be used for subsequent checks<br/>of the same content version.<br/><br/>Example use case:<br/> - You need to authorize a user to modify/delete some resource<br/> and it is unacceptable that if the permission to do that had<br/> just been revoked some seconds ago so that the change had not<br/> yet been fully replicated to all availability zones.<br/>--> |
|
||||
| snaptoken | [string](#string) | | This field is not implemented yet and has no effect.<br/><!--<br/>Optional. Like reads, a check is always evaluated at a<br/>consistent snapshot no earlier than the given snaptoken.<br/><br/>Leave this field blank if you want to evaluate the check<br/>based on eventually consistent ACLs, benefiting from very<br/>low latency, but possibly slightly stale results.<br/><br/>If the specified token is too old and no longer known,<br/>the server falls back as if no snaptoken had been specified.<br/><br/>If not specified the server tries to evaluate the check<br/>on the best snapshot version where it is very likely that<br/>ACLs had already been replicated to all availability zones.<br/>--> |
|
||||
| max_depth | [int32](#int32) | | The maximum depth to search for a relation.<br/><br/>If the value is less than 1 or greater than the global<br/>max-depth then the global max-depth will be used instead. |
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-CheckResponse"></a>
|
||||
|
||||
### CheckResponse
|
||||
|
||||
The response for a CheckService.Check rpc.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| --------- | ----------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| allowed | [bool](#bool) | | Whether the specified subject (id)<br/>is related to the requested object.<br/><br/>It is false by default if no ACL matches. |
|
||||
| snaptoken | [string](#string) | | This field is not implemented yet and has no effect.<br/><!--<br/>The last known snapshot token ONLY specified if<br/>the request had not specified a snaptoken,<br/>since this performed a "content-change request"<br/>and consistently fetched the last known snapshot token.<br/><br/>This field is not set if the request had specified a snaptoken!<br/><br/>If set, clients should cache and use this token<br/>for subsequent requests to have minimal latency,<br/>but allow slightly stale responses (only some milliseconds or seconds).<br/>--> |
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-CheckResponseWithError"></a>
|
||||
|
||||
### CheckResponseWithError
|
||||
|
||||
The response for an individual check in the CheckService.BatchCheck rpc.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| --------- | ----------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| allowed | [bool](#bool) | | Whether the specified subject (id)<br/>is related to the requested object.<br/><br/>It is false by default if no ACL matches. |
|
||||
| error | [string](#string) | | If there was an error checking the tuple,<br/>this will contain the error message.<br/><br/>If the check was performed successfully, this will be empty. |
|
||||
| snaptoken | [string](#string) | | This field is not implemented yet and has no effect.<br/><!--<br/>The last known snapshot token ONLY specified if<br/>the request had not specified a snaptoken,<br/>since this performed a "content-change request"<br/>and consistently fetched the last known snapshot token.<br/><br/>This field is not set if the request had specified a snaptoken!<br/><br/>If set, clients should cache and use this token<br/>for subsequent requests to have minimal latency,<br/>but allow slightly stale responses (only some milliseconds or seconds).<br/>--> |
|
||||
|
||||
<!-- end messages -->
|
||||
|
||||
<!-- end enums -->
|
||||
|
||||
<!-- end HasExtensions -->
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-CheckService"></a>
|
||||
|
||||
### CheckService
|
||||
|
||||
The service that performs authorization checks based on the stored Access
|
||||
Control Lists.
|
||||
|
||||
This service is part of the
|
||||
[read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ----------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------- |
|
||||
| Check | [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) | [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) | Performs an authorization check. |
|
||||
| BatchCheck | [BatchCheckRequest](#ory-keto-relation_tuples-v1alpha2-BatchCheckRequest) | [BatchCheckResponse](#ory-keto-relation_tuples-v1alpha2-BatchCheckResponse) | |
|
||||
|
||||
<!-- end services -->
|
||||
|
||||
<a name="ory_keto_relation_tuples_v1alpha2_expand_service-proto"></a>
|
||||
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## ory/keto/relation_tuples/v1alpha2/expand_service.proto
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-ExpandRequest"></a>
|
||||
|
||||
### ExpandRequest
|
||||
|
||||
The request for an ExpandService.Expand RPC. Expands the given subject set.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| --------- | ----------------------------------------------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject to expand. |
|
||||
| max_depth | [int32](#int32) | | The maximum depth of tree to build.<br/><br/>If the value is less than 1 or greater than the global<br/>max-depth then the global max-depth will be used instead.<br/><br/>It is important to set this parameter to a meaningful<br/>value. Ponder how deep you really want to display this. |
|
||||
| snaptoken | [string](#string) | | This field is not implemented yet and has no effect.<br/><!--<br/>Optional. Like reads, a expand is always evaluated at a<br/>consistent snapshot no earlier than the given snaptoken.<br/><br/>Leave this field blank if you want to expand<br/>based on eventually consistent ACLs, benefiting from very<br/>low latency, but possibly slightly stale results.<br/><br/>If the specified token is too old and no longer known,<br/>the server falls back as if no snaptoken had been specified.<br/><br/>If not specified the server tries to build the tree<br/>on the best snapshot version where it is very likely that<br/>ACLs had already been replicated to all availability zones.<br/>--> |
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-ExpandResponse"></a>
|
||||
|
||||
### ExpandResponse
|
||||
|
||||
The response for a ExpandService.Expand RPC.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ------------------------------------------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| tree | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | | The tree the requested subject set expands to.<br/>The requested subject set is the subject of the root.<br/><br/>This field can be nil in some circumstances. |
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-SubjectTree"></a>
|
||||
|
||||
### SubjectTree
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| --------- | ----------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| node_type | [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) | | The type of the node. |
|
||||
| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The subject this node represents.<br/>Deprecated: More information is now available in the tuple field. |
|
||||
| tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The relation tuple this node represents. |
|
||||
| children | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | repeated | The children of this node.<br/><br/>This is never set if `node_type` == `NODE_TYPE_LEAF`. |
|
||||
|
||||
<!-- end messages -->
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-NodeType"></a>
|
||||
|
||||
### NodeType
|
||||
|
||||
| Name | Number | Description |
|
||||
| ---------------------- | ------ | -------------------------------------------------------------------------------------------------------------- |
|
||||
| NODE_TYPE_UNSPECIFIED | 0 | |
|
||||
| NODE_TYPE_UNION | 1 | This node expands to a union of all children. |
|
||||
| NODE_TYPE_EXCLUSION | 2 | Not implemented yet. |
|
||||
| NODE_TYPE_INTERSECTION | 3 | Not implemented yet. |
|
||||
| NODE_TYPE_LEAF | 4 | This node is a leaf and contains no children.<br/>Its subject is a `SubjectID` unless `max_depth` was reached. |
|
||||
|
||||
<!-- end enums -->
|
||||
|
||||
<!-- end HasExtensions -->
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-ExpandService"></a>
|
||||
|
||||
### ExpandService
|
||||
|
||||
The service that performs subject set expansion based on the stored Access
|
||||
Control Lists.
|
||||
|
||||
This service is part of the
|
||||
[read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ----------- | ----------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------ |
|
||||
| Expand | [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) | [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) | Expands the subject set into a tree of subjects. |
|
||||
|
||||
<!-- end services -->
|
||||
|
||||
<a name="ory_keto_relation_tuples_v1alpha2_namespaces_service-proto"></a>
|
||||
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## ory/keto/relation_tuples/v1alpha2/namespaces_service.proto
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest"></a>
|
||||
|
||||
### ListNamespacesRequest
|
||||
|
||||
Request for ReadService.ListNamespaces RPC.
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse"></a>
|
||||
|
||||
### ListNamespacesResponse
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ---------- | --------------------------------------------------------- | -------- | ----------- |
|
||||
| namespaces | [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) | repeated | |
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-Namespace"></a>
|
||||
|
||||
### Namespace
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ----------------- | ----- | ----------- |
|
||||
| name | [string](#string) | | |
|
||||
|
||||
<!-- end messages -->
|
||||
|
||||
<!-- end enums -->
|
||||
|
||||
<!-- end HasExtensions -->
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-NamespacesService"></a>
|
||||
|
||||
### NamespacesService
|
||||
|
||||
The service to query namespaces.
|
||||
|
||||
This service is part of the
|
||||
[read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| -------------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---------------- |
|
||||
| ListNamespaces | [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) | [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) | Lists Namespaces |
|
||||
|
||||
<!-- end services -->
|
||||
|
||||
<a name="ory_keto_relation_tuples_v1alpha2_read_service-proto"></a>
|
||||
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## ory/keto/relation_tuples/v1alpha2/read_service.proto
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest"></a>
|
||||
|
||||
### ListRelationTuplesRequest
|
||||
|
||||
Request for ReadService.ListRelationTuples RPC. See
|
||||
`ListRelationTuplesRequest_Query` for how to filter the query.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| -------------- | ----------------------------------------------------------------------------------------------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| query | [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) | | **Deprecated.** All query constraints are concatenated<br/>with a logical AND operator.<br/><br/>The RelationTuple list from ListRelationTuplesResponse<br/>is ordered from the newest RelationTuple to the oldest. |
|
||||
| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | |
|
||||
| expand_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | This field is not implemented yet and has no effect.<br/><!--<br/>Optional. The list of fields to be expanded<br/>in the RelationTuple list returned in `ListRelationTuplesResponse`.<br/>Leaving this field unspecified means all fields are expanded.<br/><br/>Available fields:<br/>"object", "relation", "subject",<br/>"namespace", "subject.id", "subject.namespace",<br/>"subject.object", "subject.relation"<br/>--> |
|
||||
| snaptoken | [string](#string) | | This field is not implemented yet and has no effect.<br/><!--<br/>Optional. The snapshot token for this read.<br/>--> |
|
||||
| page_size | [int32](#int32) | | Optional. The maximum number of<br/>RelationTuples to return in the response.<br/><br/>Default: 100 |
|
||||
| page_token | [string](#string) | | Optional. An opaque pagination token returned from<br/>a previous call to `ListRelationTuples` that<br/>indicates where the page should start at.<br/><br/>An empty token denotes the first page. All successive<br/>pages require the token from the previous page. |
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query"></a>
|
||||
|
||||
### ListRelationTuplesRequest.Query
|
||||
|
||||
The query for listing relationships. Clients can specify any optional field to
|
||||
partially filter for specific relationships.
|
||||
|
||||
Example use cases (namespace is always required):
|
||||
|
||||
- object only: display a list of all permissions referring to a specific object
|
||||
- relation only: get all groups that have members; get all directories that have
|
||||
content
|
||||
- object & relation: display all subjects that have a specific permission
|
||||
relation
|
||||
- subject & relation: display all groups a subject belongs to; display all
|
||||
objects a subject has access to
|
||||
- object & relation & subject: check whether the relation tuple already exists
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| --------- | ----------------------------------------------------- | ----- | ------------------------------------ |
|
||||
| namespace | [string](#string) | | Required. The namespace to query. |
|
||||
| object | [string](#string) | | Optional. The object to query for. |
|
||||
| relation | [string](#string) | | Optional. The relation to query for. |
|
||||
| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. |
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse"></a>
|
||||
|
||||
### ListRelationTuplesResponse
|
||||
|
||||
The response of a ReadService.ListRelationTuples RPC.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| --------------- | ----------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------- |
|
||||
| relation_tuples | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | repeated | The relationships matching the list request. |
|
||||
| next_page_token | [string](#string) | | The token required to get the next page.<br/>If this is the last page, the token will be the empty string. |
|
||||
|
||||
<!-- end messages -->
|
||||
|
||||
<!-- end enums -->
|
||||
|
||||
<!-- end HasExtensions -->
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-ReadService"></a>
|
||||
|
||||
### ReadService
|
||||
|
||||
The service to query relationships.
|
||||
|
||||
This service is part of the
|
||||
[read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ------------------ | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------ |
|
||||
| ListRelationTuples | [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) | [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) | Lists ACL relationships. |
|
||||
|
||||
<!-- end services -->
|
||||
|
||||
<a name="ory_keto_relation_tuples_v1alpha2_version-proto"></a>
|
||||
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## ory/keto/relation_tuples/v1alpha2/version.proto
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-GetVersionRequest"></a>
|
||||
|
||||
### GetVersionRequest
|
||||
|
||||
Request for the VersionService.GetVersion RPC.
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-GetVersionResponse"></a>
|
||||
|
||||
### GetVersionResponse
|
||||
|
||||
Response of the VersionService.GetVersion RPC.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ------- | ----------------- | ----- | -------------------------------------------- |
|
||||
| version | [string](#string) | | The version string of the Ory Keto instance. |
|
||||
|
||||
<!-- end messages -->
|
||||
|
||||
<!-- end enums -->
|
||||
|
||||
<!-- end HasExtensions -->
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-VersionService"></a>
|
||||
|
||||
### VersionService
|
||||
|
||||
The service returning the specific Ory Keto instance version.
|
||||
|
||||
This service is part of the
|
||||
[read-APIs](../concepts/25_api-overview.mdx#read-apis) and
|
||||
[write-APIs](../concepts/25_api-overview.mdx#write-apis).
|
||||
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ----------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------- |
|
||||
| GetVersion | [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) | [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) | Returns the version of the Ory Keto instance. |
|
||||
|
||||
<!-- end services -->
|
||||
|
||||
<a name="ory_keto_relation_tuples_v1alpha2_write_service-proto"></a>
|
||||
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## ory/keto/relation_tuples/v1alpha2/write_service.proto
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest"></a>
|
||||
|
||||
### DeleteRelationTuplesRequest
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| -------------- | --------------------------------------------------------------------------------------------------------- | ----- | --------------- |
|
||||
| query | [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) | | **Deprecated.** |
|
||||
| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | |
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query"></a>
|
||||
|
||||
### DeleteRelationTuplesRequest.Query
|
||||
|
||||
The query for deleting relationships
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| --------- | ----------------------------------------------------- | ----- | ------------------------------------ |
|
||||
| namespace | [string](#string) | | Optional. The namespace to query. |
|
||||
| object | [string](#string) | | Optional. The object to query for. |
|
||||
| relation | [string](#string) | | Optional. The relation to query for. |
|
||||
| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. |
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse"></a>
|
||||
|
||||
### DeleteRelationTuplesResponse
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-RelationTupleDelta"></a>
|
||||
|
||||
### RelationTupleDelta
|
||||
|
||||
Write-delta for a TransactRelationTuplesRequest.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| -------------- | ----------------------------------------------------------------------------------------- | ----- | -------------------------------------- |
|
||||
| action | [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) | | The action to do on the RelationTuple. |
|
||||
| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The target RelationTuple. |
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest"></a>
|
||||
|
||||
### TransactRelationTuplesRequest
|
||||
|
||||
The request of a WriteService.TransactRelationTuples RPC.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| --------------------- | --------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| relation_tuple_deltas | [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) | repeated | The write delta for the relationships operated in one single transaction.<br/>Either all actions succeed or no change takes effect on error. |
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse"></a>
|
||||
|
||||
### TransactRelationTuplesResponse
|
||||
|
||||
The response of a WriteService.TransactRelationTuples rpc.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ---------- | ----------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| snaptokens | [string](#string) | repeated | This field is not implemented yet and has no effect.<br/><!--<br/>The list of the new latest snapshot tokens of the affected RelationTuple,<br/>with the same index as specified in the `relation_tuple_deltas` field of<br/>the TransactRelationTuplesRequest request.<br/><br/>If the RelationTupleDelta_Action was DELETE<br/>the snaptoken is empty at the same index.<br/>--> |
|
||||
|
||||
<!-- end messages -->
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action"></a>
|
||||
|
||||
### RelationTupleDelta.Action
|
||||
|
||||
| Name | Number | Description |
|
||||
| ------------------ | ------ | ------------------------------------------------------------------------------------------------------------------- |
|
||||
| ACTION_UNSPECIFIED | 0 | Unspecified.<br/>The `TransactRelationTuples` RPC ignores this<br/>RelationTupleDelta if an action was unspecified. |
|
||||
| ACTION_INSERT | 1 | Insertion of a new RelationTuple. |
|
||||
| ACTION_DELETE | 2 | Deletion of the RelationTuple.<br/>It is ignored if it does not exist. |
|
||||
|
||||
<!-- end enums -->
|
||||
|
||||
<!-- end HasExtensions -->
|
||||
|
||||
<a name="ory-keto-relation_tuples-v1alpha2-WriteService"></a>
|
||||
|
||||
### WriteService
|
||||
|
||||
The write service to create and delete Access Control Lists.
|
||||
|
||||
This service is part of the
|
||||
[write-APIs](../concepts/25_api-overview.mdx#write-apis).
|
||||
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
|
||||
| TransactRelationTuples | [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) | [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) | Writes one or more relationships in a single transaction. |
|
||||
| DeleteRelationTuples | [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) | [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) | Deletes relationships based on relation query |
|
||||
|
||||
<!-- end services -->
|
||||
|
||||
## Scalar Value Types
|
||||
|
||||
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
|
||||
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------- | ----------- | ------- | ---------- | -------------- | ------------------------------ |
|
||||
| <a name="double" /> double | | double | double | float | float64 | double | float | Float |
|
||||
| <a name="float" /> float | | float | float | float | float32 | float | float | Float |
|
||||
| <a name="int32" /> int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
|
||||
| <a name="int64" /> int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
|
||||
| <a name="uint32" /> uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
|
||||
| <a name="uint64" /> uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
|
||||
| <a name="sint32" /> sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
|
||||
| <a name="sint64" /> sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
|
||||
| <a name="fixed32" /> fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
|
||||
| <a name="fixed64" /> fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
|
||||
| <a name="sfixed32" /> sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
|
||||
| <a name="sfixed64" /> sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
|
||||
| <a name="bool" /> bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass |
|
||||
| <a name="string" /> string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
|
||||
| <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |
|
||||
32
gen/es/ory/keto/opl/v1alpha1/syntax_service_connect.d.ts
vendored
Normal file
32
gen/es/ory/keto/opl/v1alpha1/syntax_service_connect.d.ts
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-connect-es v1.7.0
|
||||
// @generated from file ory/keto/opl/v1alpha1/syntax_service.proto (package ory.keto.opl.v1alpha1, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { CheckRequest, CheckResponse } from "./syntax_service_pb.js"
|
||||
import { MethodKind } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* The service that checks the syntax of an OPL file.
|
||||
*
|
||||
* @generated from service ory.keto.opl.v1alpha1.SyntaxService
|
||||
*/
|
||||
export declare const SyntaxService: {
|
||||
readonly typeName: "ory.keto.opl.v1alpha1.SyntaxService"
|
||||
readonly methods: {
|
||||
/**
|
||||
* Performs a syntax check request.
|
||||
*
|
||||
* @generated from rpc ory.keto.opl.v1alpha1.SyntaxService.Check
|
||||
*/
|
||||
readonly check: {
|
||||
readonly name: "Check"
|
||||
readonly I: typeof CheckRequest
|
||||
readonly O: typeof CheckResponse
|
||||
readonly kind: MethodKind.Unary
|
||||
}
|
||||
}
|
||||
}
|
||||
32
gen/es/ory/keto/opl/v1alpha1/syntax_service_connect.js
Normal file
32
gen/es/ory/keto/opl/v1alpha1/syntax_service_connect.js
Normal file
@@ -0,0 +1,32 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-connect-es v1.7.0
|
||||
// @generated from file ory/keto/opl/v1alpha1/syntax_service.proto (package ory.keto.opl.v1alpha1, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { CheckRequest, CheckResponse } from "./syntax_service_pb.js"
|
||||
import { MethodKind } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* The service that checks the syntax of an OPL file.
|
||||
*
|
||||
* @generated from service ory.keto.opl.v1alpha1.SyntaxService
|
||||
*/
|
||||
export const SyntaxService = {
|
||||
typeName: "ory.keto.opl.v1alpha1.SyntaxService",
|
||||
methods: {
|
||||
/**
|
||||
* Performs a syntax check request.
|
||||
*
|
||||
* @generated from rpc ory.keto.opl.v1alpha1.SyntaxService.Check
|
||||
*/
|
||||
check: {
|
||||
name: "Check",
|
||||
I: CheckRequest,
|
||||
O: CheckResponse,
|
||||
kind: MethodKind.Unary,
|
||||
},
|
||||
},
|
||||
}
|
||||
118
gen/es/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts
vendored
Normal file
118
gen/es/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-es v2.11.0
|
||||
// @generated from file ory/keto/opl/v1alpha1/syntax_service.proto (package ory.keto.opl.v1alpha1, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type {
|
||||
GenFile,
|
||||
GenMessage,
|
||||
GenService,
|
||||
} from "@bufbuild/protobuf/codegenv2"
|
||||
import type { Message } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* Describes the file ory/keto/opl/v1alpha1/syntax_service.proto.
|
||||
*/
|
||||
export declare const file_ory_keto_opl_v1alpha1_syntax_service: GenFile
|
||||
|
||||
/**
|
||||
* @generated from message ory.keto.opl.v1alpha1.CheckRequest
|
||||
*/
|
||||
export declare type CheckRequest =
|
||||
Message<"ory.keto.opl.v1alpha1.CheckRequest"> & {
|
||||
/**
|
||||
* @generated from field: bytes content = 1;
|
||||
*/
|
||||
content: Uint8Array
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.opl.v1alpha1.CheckRequest.
|
||||
* Use `create(CheckRequestSchema)` to create a new message.
|
||||
*/
|
||||
export declare const CheckRequestSchema: GenMessage<CheckRequest>
|
||||
|
||||
/**
|
||||
* @generated from message ory.keto.opl.v1alpha1.CheckResponse
|
||||
*/
|
||||
export declare type CheckResponse =
|
||||
Message<"ory.keto.opl.v1alpha1.CheckResponse"> & {
|
||||
/**
|
||||
* @generated from field: repeated ory.keto.opl.v1alpha1.ParseError parse_errors = 1;
|
||||
*/
|
||||
parseErrors: ParseError[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.opl.v1alpha1.CheckResponse.
|
||||
* Use `create(CheckResponseSchema)` to create a new message.
|
||||
*/
|
||||
export declare const CheckResponseSchema: GenMessage<CheckResponse>
|
||||
|
||||
/**
|
||||
* @generated from message ory.keto.opl.v1alpha1.ParseError
|
||||
*/
|
||||
export declare type ParseError = Message<"ory.keto.opl.v1alpha1.ParseError"> & {
|
||||
/**
|
||||
* @generated from field: string message = 1;
|
||||
*/
|
||||
message: string
|
||||
|
||||
/**
|
||||
* @generated from field: ory.keto.opl.v1alpha1.SourcePosition start = 2;
|
||||
*/
|
||||
start?: SourcePosition
|
||||
|
||||
/**
|
||||
* @generated from field: ory.keto.opl.v1alpha1.SourcePosition end = 3;
|
||||
*/
|
||||
end?: SourcePosition
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.opl.v1alpha1.ParseError.
|
||||
* Use `create(ParseErrorSchema)` to create a new message.
|
||||
*/
|
||||
export declare const ParseErrorSchema: GenMessage<ParseError>
|
||||
|
||||
/**
|
||||
* @generated from message ory.keto.opl.v1alpha1.SourcePosition
|
||||
*/
|
||||
export declare type SourcePosition =
|
||||
Message<"ory.keto.opl.v1alpha1.SourcePosition"> & {
|
||||
/**
|
||||
* @generated from field: uint32 line = 1;
|
||||
*/
|
||||
line: number
|
||||
|
||||
/**
|
||||
* @generated from field: uint32 column = 2;
|
||||
*/
|
||||
column: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.opl.v1alpha1.SourcePosition.
|
||||
* Use `create(SourcePositionSchema)` to create a new message.
|
||||
*/
|
||||
export declare const SourcePositionSchema: GenMessage<SourcePosition>
|
||||
|
||||
/**
|
||||
* The service that checks the syntax of an OPL file.
|
||||
*
|
||||
* @generated from service ory.keto.opl.v1alpha1.SyntaxService
|
||||
*/
|
||||
export declare const SyntaxService: GenService<{
|
||||
/**
|
||||
* Performs a syntax check request.
|
||||
*
|
||||
* @generated from rpc ory.keto.opl.v1alpha1.SyntaxService.Check
|
||||
*/
|
||||
check: {
|
||||
methodKind: "unary"
|
||||
input: typeof CheckRequestSchema
|
||||
output: typeof CheckResponseSchema
|
||||
}
|
||||
}>
|
||||
62
gen/es/ory/keto/opl/v1alpha1/syntax_service_pb.js
Normal file
62
gen/es/ory/keto/opl/v1alpha1/syntax_service_pb.js
Normal file
@@ -0,0 +1,62 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-es v2.11.0
|
||||
// @generated from file ory/keto/opl/v1alpha1/syntax_service.proto (package ory.keto.opl.v1alpha1, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import {
|
||||
fileDesc,
|
||||
messageDesc,
|
||||
serviceDesc,
|
||||
} from "@bufbuild/protobuf/codegenv2"
|
||||
|
||||
/**
|
||||
* Describes the file ory/keto/opl/v1alpha1/syntax_service.proto.
|
||||
*/
|
||||
export const file_ory_keto_opl_v1alpha1_syntax_service =
|
||||
/*@__PURE__*/
|
||||
fileDesc(
|
||||
"Cipvcnkva2V0by9vcGwvdjFhbHBoYTEvc3ludGF4X3NlcnZpY2UucHJvdG8SFW9yeS5rZXRvLm9wbC52MWFscGhhMSIfCgxDaGVja1JlcXVlc3QSDwoHY29udGVudBgBIAEoDCJICg1DaGVja1Jlc3BvbnNlEjcKDHBhcnNlX2Vycm9ycxgBIAMoCzIhLm9yeS5rZXRvLm9wbC52MWFscGhhMS5QYXJzZUVycm9yIocBCgpQYXJzZUVycm9yEg8KB21lc3NhZ2UYASABKAkSNAoFc3RhcnQYAiABKAsyJS5vcnkua2V0by5vcGwudjFhbHBoYTEuU291cmNlUG9zaXRpb24SMgoDZW5kGAMgASgLMiUub3J5LmtldG8ub3BsLnYxYWxwaGExLlNvdXJjZVBvc2l0aW9uIi4KDlNvdXJjZVBvc2l0aW9uEgwKBGxpbmUYASABKA0SDgoGY29sdW1uGAIgASgNMmMKDVN5bnRheFNlcnZpY2USUgoFQ2hlY2sSIy5vcnkua2V0by5vcGwudjFhbHBoYTEuQ2hlY2tSZXF1ZXN0GiQub3J5LmtldG8ub3BsLnYxYWxwaGExLkNoZWNrUmVzcG9uc2VC3AEKGWNvbS5vcnkua2V0by5vcGwudjFhbHBoYTFCElN5bnRheFNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL29yeS9rZXRvL2dlbi9nby9vcnkva2V0by9vcGwvdjFhbHBoYTE7b3BsogIDT0tPqgIVT3J5LktldG8uT3BsLlYxYWxwaGExygIVT3J5XEtldG9cT3BsXFYxYWxwaGEx4gIhT3J5XEtldG9cT3BsXFYxYWxwaGExXEdQQk1ldGFkYXRh6gIYT3J5OjpLZXRvOjpPcGw6OlYxYWxwaGExYgZwcm90bzM",
|
||||
)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.opl.v1alpha1.CheckRequest.
|
||||
* Use `create(CheckRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const CheckRequestSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_opl_v1alpha1_syntax_service, 0)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.opl.v1alpha1.CheckResponse.
|
||||
* Use `create(CheckResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const CheckResponseSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_opl_v1alpha1_syntax_service, 1)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.opl.v1alpha1.ParseError.
|
||||
* Use `create(ParseErrorSchema)` to create a new message.
|
||||
*/
|
||||
export const ParseErrorSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_opl_v1alpha1_syntax_service, 2)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.opl.v1alpha1.SourcePosition.
|
||||
* Use `create(SourcePositionSchema)` to create a new message.
|
||||
*/
|
||||
export const SourcePositionSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_opl_v1alpha1_syntax_service, 3)
|
||||
|
||||
/**
|
||||
* The service that checks the syntax of an OPL file.
|
||||
*
|
||||
* @generated from service ory.keto.opl.v1alpha1.SyntaxService
|
||||
*/
|
||||
export const SyntaxService =
|
||||
/*@__PURE__*/
|
||||
serviceDesc(file_ory_keto_opl_v1alpha1_syntax_service, 0)
|
||||
49
gen/es/ory/keto/relation_tuples/v1alpha2/check_service_connect.d.ts
vendored
Normal file
49
gen/es/ory/keto/relation_tuples/v1alpha2/check_service_connect.d.ts
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-connect-es v1.7.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/check_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import {
|
||||
BatchCheckRequest,
|
||||
BatchCheckResponse,
|
||||
CheckRequest,
|
||||
CheckResponse,
|
||||
} from "./check_service_pb.js"
|
||||
import { MethodKind } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* The service that performs authorization checks
|
||||
* based on the stored Access Control Lists.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.CheckService
|
||||
*/
|
||||
export declare const CheckService: {
|
||||
readonly typeName: "ory.keto.relation_tuples.v1alpha2.CheckService"
|
||||
readonly methods: {
|
||||
/**
|
||||
* Performs an authorization check.
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.CheckService.Check
|
||||
*/
|
||||
readonly check: {
|
||||
readonly name: "Check"
|
||||
readonly I: typeof CheckRequest
|
||||
readonly O: typeof CheckResponse
|
||||
readonly kind: MethodKind.Unary
|
||||
}
|
||||
/**
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.CheckService.BatchCheck
|
||||
*/
|
||||
readonly batchCheck: {
|
||||
readonly name: "BatchCheck"
|
||||
readonly I: typeof BatchCheckRequest
|
||||
readonly O: typeof BatchCheckResponse
|
||||
readonly kind: MethodKind.Unary
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-connect-es v1.7.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/check_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import {
|
||||
BatchCheckRequest,
|
||||
BatchCheckResponse,
|
||||
CheckRequest,
|
||||
CheckResponse,
|
||||
} from "./check_service_pb.js"
|
||||
import { MethodKind } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* The service that performs authorization checks
|
||||
* based on the stored Access Control Lists.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.CheckService
|
||||
*/
|
||||
export const CheckService = {
|
||||
typeName: "ory.keto.relation_tuples.v1alpha2.CheckService",
|
||||
methods: {
|
||||
/**
|
||||
* Performs an authorization check.
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.CheckService.Check
|
||||
*/
|
||||
check: {
|
||||
name: "Check",
|
||||
I: CheckRequest,
|
||||
O: CheckResponse,
|
||||
kind: MethodKind.Unary,
|
||||
},
|
||||
/**
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.CheckService.BatchCheck
|
||||
*/
|
||||
batchCheck: {
|
||||
name: "BatchCheck",
|
||||
I: BatchCheckRequest,
|
||||
O: BatchCheckResponse,
|
||||
kind: MethodKind.Unary,
|
||||
},
|
||||
},
|
||||
}
|
||||
357
gen/es/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts
vendored
Normal file
357
gen/es/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts
vendored
Normal file
@@ -0,0 +1,357 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-es v2.11.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/check_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type {
|
||||
GenFile,
|
||||
GenMessage,
|
||||
GenService,
|
||||
} from "@bufbuild/protobuf/codegenv2"
|
||||
import type { Message } from "@bufbuild/protobuf"
|
||||
import type { RelationTuple, Subject } from "./relation_tuples_pb"
|
||||
|
||||
/**
|
||||
* Describes the file ory/keto/relation_tuples/v1alpha2/check_service.proto.
|
||||
*/
|
||||
export declare const file_ory_keto_relation_tuples_v1alpha2_check_service: GenFile
|
||||
|
||||
/**
|
||||
* The request for a CheckService.Check RPC.
|
||||
* Checks whether a specific subject is related to an object.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.CheckRequest
|
||||
*/
|
||||
export declare type CheckRequest =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.CheckRequest"> & {
|
||||
/**
|
||||
* The namespace to evaluate the check.
|
||||
*
|
||||
* Note: If you use the expand-API and the check
|
||||
* evaluates a RelationTuple specifying a SubjectSet as
|
||||
* subject or due to a rewrite rule in a namespace config
|
||||
* this check request may involve other namespaces automatically.
|
||||
*
|
||||
* @generated from field: string namespace = 1 [deprecated = true];
|
||||
* @deprecated
|
||||
*/
|
||||
namespace: string
|
||||
|
||||
/**
|
||||
* The related object in this check.
|
||||
*
|
||||
* @generated from field: string object = 2 [deprecated = true];
|
||||
* @deprecated
|
||||
*/
|
||||
object: string
|
||||
|
||||
/**
|
||||
* The relation between the Object and the Subject.
|
||||
*
|
||||
* @generated from field: string relation = 3 [deprecated = true];
|
||||
* @deprecated
|
||||
*/
|
||||
relation: string
|
||||
|
||||
/**
|
||||
* The related subject in this check.
|
||||
*
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.Subject subject = 4 [deprecated = true];
|
||||
* @deprecated
|
||||
*/
|
||||
subject?: Subject
|
||||
|
||||
/**
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.RelationTuple tuple = 8;
|
||||
*/
|
||||
tuple?: RelationTuple
|
||||
|
||||
/**
|
||||
* This field is not implemented yet and has no effect.
|
||||
* <!--
|
||||
* Set this field to `true` in case your application
|
||||
* needs to authorize depending on up to date ACLs,
|
||||
* also called a "content-change check".
|
||||
*
|
||||
* If set to `true` the `snaptoken` field is ignored,
|
||||
* the check is evaluated at the latest snapshot
|
||||
* (globally consistent) and the response includes a
|
||||
* snaptoken for clients to store along with object
|
||||
* contents that can be used for subsequent checks
|
||||
* of the same content version.
|
||||
*
|
||||
* Example use case:
|
||||
* - You need to authorize a user to modify/delete some resource
|
||||
* and it is unacceptable that if the permission to do that had
|
||||
* just been revoked some seconds ago so that the change had not
|
||||
* yet been fully replicated to all availability zones.
|
||||
* -->
|
||||
*
|
||||
* @generated from field: bool latest = 5;
|
||||
*/
|
||||
latest: boolean
|
||||
|
||||
/**
|
||||
* This field is not implemented yet and has no effect.
|
||||
* <!--
|
||||
* Optional. Like reads, a check is always evaluated at a
|
||||
* consistent snapshot no earlier than the given snaptoken.
|
||||
*
|
||||
* Leave this field blank if you want to evaluate the check
|
||||
* based on eventually consistent ACLs, benefiting from very
|
||||
* low latency, but possibly slightly stale results.
|
||||
*
|
||||
* If the specified token is too old and no longer known,
|
||||
* the server falls back as if no snaptoken had been specified.
|
||||
*
|
||||
* If not specified the server tries to evaluate the check
|
||||
* on the best snapshot version where it is very likely that
|
||||
* ACLs had already been replicated to all availability zones.
|
||||
* -->
|
||||
*
|
||||
* @generated from field: string snaptoken = 6;
|
||||
*/
|
||||
snaptoken: string
|
||||
|
||||
/**
|
||||
* The maximum depth to search for a relation.
|
||||
*
|
||||
* If the value is less than 1 or greater than the global
|
||||
* max-depth then the global max-depth will be used instead.
|
||||
*
|
||||
* @generated from field: int32 max_depth = 7;
|
||||
*/
|
||||
maxDepth: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.CheckRequest.
|
||||
* Use `create(CheckRequestSchema)` to create a new message.
|
||||
*/
|
||||
export declare const CheckRequestSchema: GenMessage<CheckRequest>
|
||||
|
||||
/**
|
||||
* The response for a CheckService.Check rpc.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.CheckResponse
|
||||
*/
|
||||
export declare type CheckResponse =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.CheckResponse"> & {
|
||||
/**
|
||||
* Whether the specified subject (id)
|
||||
* is related to the requested object.
|
||||
*
|
||||
* It is false by default if no ACL matches.
|
||||
*
|
||||
* @generated from field: bool allowed = 1;
|
||||
*/
|
||||
allowed: boolean
|
||||
|
||||
/**
|
||||
* This field is not implemented yet and has no effect.
|
||||
* <!--
|
||||
* The last known snapshot token ONLY specified if
|
||||
* the request had not specified a snaptoken,
|
||||
* since this performed a "content-change request"
|
||||
* and consistently fetched the last known snapshot token.
|
||||
*
|
||||
* This field is not set if the request had specified a snaptoken!
|
||||
*
|
||||
* If set, clients should cache and use this token
|
||||
* for subsequent requests to have minimal latency,
|
||||
* but allow slightly stale responses (only some milliseconds or seconds).
|
||||
* -->
|
||||
*
|
||||
* @generated from field: string snaptoken = 2;
|
||||
*/
|
||||
snaptoken: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.CheckResponse.
|
||||
* Use `create(CheckResponseSchema)` to create a new message.
|
||||
*/
|
||||
export declare const CheckResponseSchema: GenMessage<CheckResponse>
|
||||
|
||||
/**
|
||||
* The response for an individual check in the CheckService.BatchCheck rpc.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.CheckResponseWithError
|
||||
*/
|
||||
export declare type CheckResponseWithError =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.CheckResponseWithError"> & {
|
||||
/**
|
||||
* Whether the specified subject (id)
|
||||
* is related to the requested object.
|
||||
*
|
||||
* It is false by default if no ACL matches.
|
||||
*
|
||||
* @generated from field: bool allowed = 1;
|
||||
*/
|
||||
allowed: boolean
|
||||
|
||||
/**
|
||||
* If there was an error checking the tuple,
|
||||
* this will contain the error message.
|
||||
*
|
||||
* If the check was performed successfully, this will be empty.
|
||||
*
|
||||
* @generated from field: string error = 2;
|
||||
*/
|
||||
error: string
|
||||
|
||||
/**
|
||||
* This field is not implemented yet and has no effect.
|
||||
* <!--
|
||||
* The last known snapshot token ONLY specified if
|
||||
* the request had not specified a snaptoken,
|
||||
* since this performed a "content-change request"
|
||||
* and consistently fetched the last known snapshot token.
|
||||
*
|
||||
* This field is not set if the request had specified a snaptoken!
|
||||
*
|
||||
* If set, clients should cache and use this token
|
||||
* for subsequent requests to have minimal latency,
|
||||
* but allow slightly stale responses (only some milliseconds or seconds).
|
||||
* -->
|
||||
*
|
||||
* @generated from field: string snaptoken = 3;
|
||||
*/
|
||||
snaptoken: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.CheckResponseWithError.
|
||||
* Use `create(CheckResponseWithErrorSchema)` to create a new message.
|
||||
*/
|
||||
export declare const CheckResponseWithErrorSchema: GenMessage<CheckResponseWithError>
|
||||
|
||||
/**
|
||||
* The request for a CheckService.BatchCheck RPC.
|
||||
* Checks a batch of relations.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.BatchCheckRequest
|
||||
*/
|
||||
export declare type BatchCheckRequest =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.BatchCheckRequest"> & {
|
||||
/**
|
||||
* @generated from field: repeated ory.keto.relation_tuples.v1alpha2.RelationTuple tuples = 1;
|
||||
*/
|
||||
tuples: RelationTuple[]
|
||||
|
||||
/**
|
||||
* This field is not implemented yet and has no effect.
|
||||
* <!--
|
||||
* Set this field to `true` in case your application
|
||||
* needs to authorize depending on up to date ACLs,
|
||||
* also called a "content-change check".
|
||||
*
|
||||
* If set to `true` the `snaptoken` field is ignored,
|
||||
* the check is evaluated at the latest snapshot
|
||||
* (globally consistent) and the response includes a
|
||||
* snaptoken for clients to store along with object
|
||||
* contents that can be used for subsequent checks
|
||||
* of the same content version.
|
||||
*
|
||||
* Example use case:
|
||||
* - You need to authorize a user to modify/delete some resource
|
||||
* and it is unacceptable that if the permission to do that had
|
||||
* just been revoked some seconds ago so that the change had not
|
||||
* yet been fully replicated to all availability zones.
|
||||
* -->
|
||||
*
|
||||
* @generated from field: bool latest = 2;
|
||||
*/
|
||||
latest: boolean
|
||||
|
||||
/**
|
||||
* This field is not implemented yet and has no effect.
|
||||
* <!--
|
||||
* Optional. Like reads, a check is always evaluated at a
|
||||
* consistent snapshot no earlier than the given snaptoken.
|
||||
*
|
||||
* Leave this field blank if you want to evaluate the check
|
||||
* based on eventually consistent ACLs, benefiting from very
|
||||
* low latency, but possibly slightly stale results.
|
||||
*
|
||||
* If the specified token is too old and no longer known,
|
||||
* the server falls back as if no snaptoken had been specified.
|
||||
*
|
||||
* If not specified the server tries to evaluate the check
|
||||
* on the best snapshot version where it is very likely that
|
||||
* ACLs had already been replicated to all availability zones.
|
||||
* -->
|
||||
*
|
||||
* @generated from field: string snaptoken = 3;
|
||||
*/
|
||||
snaptoken: string
|
||||
|
||||
/**
|
||||
* The maximum depth to search for a relation.
|
||||
*
|
||||
* If the value is less than 1 or greater than the global
|
||||
* max-depth then the global max-depth will be used instead.
|
||||
*
|
||||
* @generated from field: int32 max_depth = 4;
|
||||
*/
|
||||
maxDepth: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.BatchCheckRequest.
|
||||
* Use `create(BatchCheckRequestSchema)` to create a new message.
|
||||
*/
|
||||
export declare const BatchCheckRequestSchema: GenMessage<BatchCheckRequest>
|
||||
|
||||
/**
|
||||
* The response for a CheckService.BatchCheck rpc.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.BatchCheckResponse
|
||||
*/
|
||||
export declare type BatchCheckResponse =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.BatchCheckResponse"> & {
|
||||
/**
|
||||
* The results of the batch check. The order of these
|
||||
* results will match the order of the input.
|
||||
*
|
||||
* @generated from field: repeated ory.keto.relation_tuples.v1alpha2.CheckResponseWithError results = 1;
|
||||
*/
|
||||
results: CheckResponseWithError[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.BatchCheckResponse.
|
||||
* Use `create(BatchCheckResponseSchema)` to create a new message.
|
||||
*/
|
||||
export declare const BatchCheckResponseSchema: GenMessage<BatchCheckResponse>
|
||||
|
||||
/**
|
||||
* The service that performs authorization checks
|
||||
* based on the stored Access Control Lists.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.CheckService
|
||||
*/
|
||||
export declare const CheckService: GenService<{
|
||||
/**
|
||||
* Performs an authorization check.
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.CheckService.Check
|
||||
*/
|
||||
check: {
|
||||
methodKind: "unary"
|
||||
input: typeof CheckRequestSchema
|
||||
output: typeof CheckResponseSchema
|
||||
}
|
||||
/**
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.CheckService.BatchCheck
|
||||
*/
|
||||
batchCheck: {
|
||||
methodKind: "unary"
|
||||
input: typeof BatchCheckRequestSchema
|
||||
output: typeof BatchCheckResponseSchema
|
||||
}
|
||||
}>
|
||||
75
gen/es/ory/keto/relation_tuples/v1alpha2/check_service_pb.js
Normal file
75
gen/es/ory/keto/relation_tuples/v1alpha2/check_service_pb.js
Normal file
@@ -0,0 +1,75 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-es v2.11.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/check_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import {
|
||||
fileDesc,
|
||||
messageDesc,
|
||||
serviceDesc,
|
||||
} from "@bufbuild/protobuf/codegenv2"
|
||||
import { file_ory_keto_relation_tuples_v1alpha2_relation_tuples } from "./relation_tuples_pb"
|
||||
|
||||
/**
|
||||
* Describes the file ory/keto/relation_tuples/v1alpha2/check_service.proto.
|
||||
*/
|
||||
export const file_ory_keto_relation_tuples_v1alpha2_check_service =
|
||||
/*@__PURE__*/
|
||||
fileDesc(
|
||||
"CjVvcnkva2V0by9yZWxhdGlvbl90dXBsZXMvdjFhbHBoYTIvY2hlY2tfc2VydmljZS5wcm90bxIhb3J5LmtldG8ucmVsYXRpb25fdHVwbGVzLnYxYWxwaGEyIocCCgxDaGVja1JlcXVlc3QSFQoJbmFtZXNwYWNlGAEgASgJQgIYARISCgZvYmplY3QYAiABKAlCAhgBEhQKCHJlbGF0aW9uGAMgASgJQgIYARI/CgdzdWJqZWN0GAQgASgLMioub3J5LmtldG8ucmVsYXRpb25fdHVwbGVzLnYxYWxwaGEyLlN1YmplY3RCAhgBEj8KBXR1cGxlGAggASgLMjAub3J5LmtldG8ucmVsYXRpb25fdHVwbGVzLnYxYWxwaGEyLlJlbGF0aW9uVHVwbGUSDgoGbGF0ZXN0GAUgASgIEhEKCXNuYXB0b2tlbhgGIAEoCRIRCgltYXhfZGVwdGgYByABKAUiMwoNQ2hlY2tSZXNwb25zZRIPCgdhbGxvd2VkGAEgASgIEhEKCXNuYXB0b2tlbhgCIAEoCSJLChZDaGVja1Jlc3BvbnNlV2l0aEVycm9yEg8KB2FsbG93ZWQYASABKAgSDQoFZXJyb3IYAiABKAkSEQoJc25hcHRva2VuGAMgASgJIosBChFCYXRjaENoZWNrUmVxdWVzdBJACgZ0dXBsZXMYASADKAsyMC5vcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTIuUmVsYXRpb25UdXBsZRIOCgZsYXRlc3QYAiABKAgSEQoJc25hcHRva2VuGAMgASgJEhEKCW1heF9kZXB0aBgEIAEoBSJgChJCYXRjaENoZWNrUmVzcG9uc2USSgoHcmVzdWx0cxgBIAMoCzI5Lm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMi5DaGVja1Jlc3BvbnNlV2l0aEVycm9yMvUBCgxDaGVja1NlcnZpY2USagoFQ2hlY2sSLy5vcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTIuQ2hlY2tSZXF1ZXN0GjAub3J5LmtldG8ucmVsYXRpb25fdHVwbGVzLnYxYWxwaGEyLkNoZWNrUmVzcG9uc2USeQoKQmF0Y2hDaGVjaxI0Lm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMi5CYXRjaENoZWNrUmVxdWVzdBo1Lm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMi5CYXRjaENoZWNrUmVzcG9uc2VCqgIKJWNvbS5vcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTJCEUNoZWNrU2VydmljZVByb3RvUAFaS2dpdGh1Yi5jb20vb3J5L2tldG8vZ2VuL2dvL29yeS9rZXRvL3JlbGF0aW9uX3R1cGxlcy92MWFscGhhMjtyZWxhdGlvbnR1cGxlc6ICA09LUqoCIE9yeS5LZXRvLlJlbGF0aW9uVHVwbGVzLlYxYWxwaGEyygIgT3J5XEtldG9cUmVsYXRpb25UdXBsZXNcVjFhbHBoYTLiAixPcnlcS2V0b1xSZWxhdGlvblR1cGxlc1xWMWFscGhhMlxHUEJNZXRhZGF0YeoCI09yeTo6S2V0bzo6UmVsYXRpb25UdXBsZXM6OlYxYWxwaGEyYgZwcm90bzM",
|
||||
[file_ory_keto_relation_tuples_v1alpha2_relation_tuples],
|
||||
)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.CheckRequest.
|
||||
* Use `create(CheckRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const CheckRequestSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_check_service, 0)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.CheckResponse.
|
||||
* Use `create(CheckResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const CheckResponseSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_check_service, 1)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.CheckResponseWithError.
|
||||
* Use `create(CheckResponseWithErrorSchema)` to create a new message.
|
||||
*/
|
||||
export const CheckResponseWithErrorSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_check_service, 2)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.BatchCheckRequest.
|
||||
* Use `create(BatchCheckRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const BatchCheckRequestSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_check_service, 3)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.BatchCheckResponse.
|
||||
* Use `create(BatchCheckResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const BatchCheckResponseSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_check_service, 4)
|
||||
|
||||
/**
|
||||
* The service that performs authorization checks
|
||||
* based on the stored Access Control Lists.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.CheckService
|
||||
*/
|
||||
export const CheckService =
|
||||
/*@__PURE__*/
|
||||
serviceDesc(file_ory_keto_relation_tuples_v1alpha2_check_service, 0)
|
||||
35
gen/es/ory/keto/relation_tuples/v1alpha2/expand_service_connect.d.ts
vendored
Normal file
35
gen/es/ory/keto/relation_tuples/v1alpha2/expand_service_connect.d.ts
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-connect-es v1.7.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/expand_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ExpandRequest, ExpandResponse } from "./expand_service_pb.js"
|
||||
import { MethodKind } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* The service that performs subject set expansion
|
||||
* based on the stored Access Control Lists.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.ExpandService
|
||||
*/
|
||||
export declare const ExpandService: {
|
||||
readonly typeName: "ory.keto.relation_tuples.v1alpha2.ExpandService"
|
||||
readonly methods: {
|
||||
/**
|
||||
* Expands the subject set into a tree of subjects.
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.ExpandService.Expand
|
||||
*/
|
||||
readonly expand: {
|
||||
readonly name: "Expand"
|
||||
readonly I: typeof ExpandRequest
|
||||
readonly O: typeof ExpandResponse
|
||||
readonly kind: MethodKind.Unary
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-connect-es v1.7.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/expand_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ExpandRequest, ExpandResponse } from "./expand_service_pb.js"
|
||||
import { MethodKind } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* The service that performs subject set expansion
|
||||
* based on the stored Access Control Lists.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.ExpandService
|
||||
*/
|
||||
export const ExpandService = {
|
||||
typeName: "ory.keto.relation_tuples.v1alpha2.ExpandService",
|
||||
methods: {
|
||||
/**
|
||||
* Expands the subject set into a tree of subjects.
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.ExpandService.Expand
|
||||
*/
|
||||
expand: {
|
||||
name: "Expand",
|
||||
I: ExpandRequest,
|
||||
O: ExpandResponse,
|
||||
kind: MethodKind.Unary,
|
||||
},
|
||||
},
|
||||
}
|
||||
210
gen/es/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts
vendored
Normal file
210
gen/es/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts
vendored
Normal file
@@ -0,0 +1,210 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-es v2.11.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/expand_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type {
|
||||
GenEnum,
|
||||
GenFile,
|
||||
GenMessage,
|
||||
GenService,
|
||||
} from "@bufbuild/protobuf/codegenv2"
|
||||
import type { Message } from "@bufbuild/protobuf"
|
||||
import type { RelationTuple, Subject } from "./relation_tuples_pb"
|
||||
|
||||
/**
|
||||
* Describes the file ory/keto/relation_tuples/v1alpha2/expand_service.proto.
|
||||
*/
|
||||
export declare const file_ory_keto_relation_tuples_v1alpha2_expand_service: GenFile
|
||||
|
||||
/**
|
||||
* The request for an ExpandService.Expand RPC.
|
||||
* Expands the given subject set.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.ExpandRequest
|
||||
*/
|
||||
export declare type ExpandRequest =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.ExpandRequest"> & {
|
||||
/**
|
||||
* The subject to expand.
|
||||
*
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.Subject subject = 1;
|
||||
*/
|
||||
subject?: Subject
|
||||
|
||||
/**
|
||||
* The maximum depth of tree to build.
|
||||
*
|
||||
* If the value is less than 1 or greater than the global
|
||||
* max-depth then the global max-depth will be used instead.
|
||||
*
|
||||
* It is important to set this parameter to a meaningful
|
||||
* value. Ponder how deep you really want to display this.
|
||||
*
|
||||
* @generated from field: int32 max_depth = 2;
|
||||
*/
|
||||
maxDepth: number
|
||||
|
||||
/**
|
||||
* This field is not implemented yet and has no effect.
|
||||
* <!--
|
||||
* Optional. Like reads, a expand is always evaluated at a
|
||||
* consistent snapshot no earlier than the given snaptoken.
|
||||
*
|
||||
* Leave this field blank if you want to expand
|
||||
* based on eventually consistent ACLs, benefiting from very
|
||||
* low latency, but possibly slightly stale results.
|
||||
*
|
||||
* If the specified token is too old and no longer known,
|
||||
* the server falls back as if no snaptoken had been specified.
|
||||
*
|
||||
* If not specified the server tries to build the tree
|
||||
* on the best snapshot version where it is very likely that
|
||||
* ACLs had already been replicated to all availability zones.
|
||||
* -->
|
||||
*
|
||||
* @generated from field: string snaptoken = 3;
|
||||
*/
|
||||
snaptoken: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.ExpandRequest.
|
||||
* Use `create(ExpandRequestSchema)` to create a new message.
|
||||
*/
|
||||
export declare const ExpandRequestSchema: GenMessage<ExpandRequest>
|
||||
|
||||
/**
|
||||
* The response for a ExpandService.Expand RPC.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.ExpandResponse
|
||||
*/
|
||||
export declare type ExpandResponse =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.ExpandResponse"> & {
|
||||
/**
|
||||
* The tree the requested subject set expands to.
|
||||
* The requested subject set is the subject of the root.
|
||||
*
|
||||
* This field can be nil in some circumstances.
|
||||
*
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.SubjectTree tree = 1;
|
||||
*/
|
||||
tree?: SubjectTree
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.ExpandResponse.
|
||||
* Use `create(ExpandResponseSchema)` to create a new message.
|
||||
*/
|
||||
export declare const ExpandResponseSchema: GenMessage<ExpandResponse>
|
||||
|
||||
/**
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.SubjectTree
|
||||
*/
|
||||
export declare type SubjectTree =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.SubjectTree"> & {
|
||||
/**
|
||||
* The type of the node.
|
||||
*
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.NodeType node_type = 1;
|
||||
*/
|
||||
nodeType: NodeType
|
||||
|
||||
/**
|
||||
* The subject this node represents.
|
||||
* Deprecated: More information is now available in the tuple field.
|
||||
*
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.Subject subject = 2 [deprecated = true];
|
||||
* @deprecated
|
||||
*/
|
||||
subject?: Subject
|
||||
|
||||
/**
|
||||
* The relation tuple this node represents.
|
||||
*
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.RelationTuple tuple = 4;
|
||||
*/
|
||||
tuple?: RelationTuple
|
||||
|
||||
/**
|
||||
* The children of this node.
|
||||
*
|
||||
* This is never set if `node_type` == `NODE_TYPE_LEAF`.
|
||||
*
|
||||
* @generated from field: repeated ory.keto.relation_tuples.v1alpha2.SubjectTree children = 3;
|
||||
*/
|
||||
children: SubjectTree[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.SubjectTree.
|
||||
* Use `create(SubjectTreeSchema)` to create a new message.
|
||||
*/
|
||||
export declare const SubjectTreeSchema: GenMessage<SubjectTree>
|
||||
|
||||
/**
|
||||
* @generated from enum ory.keto.relation_tuples.v1alpha2.NodeType
|
||||
*/
|
||||
export enum NodeType {
|
||||
/**
|
||||
* @generated from enum value: NODE_TYPE_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
|
||||
/**
|
||||
* This node expands to a union of all children.
|
||||
*
|
||||
* @generated from enum value: NODE_TYPE_UNION = 1;
|
||||
*/
|
||||
UNION = 1,
|
||||
|
||||
/**
|
||||
* Not implemented yet.
|
||||
*
|
||||
* @generated from enum value: NODE_TYPE_EXCLUSION = 2;
|
||||
*/
|
||||
EXCLUSION = 2,
|
||||
|
||||
/**
|
||||
* Not implemented yet.
|
||||
*
|
||||
* @generated from enum value: NODE_TYPE_INTERSECTION = 3;
|
||||
*/
|
||||
INTERSECTION = 3,
|
||||
|
||||
/**
|
||||
* This node is a leaf and contains no children.
|
||||
* Its subject is a `SubjectID` unless `max_depth` was reached.
|
||||
*
|
||||
* @generated from enum value: NODE_TYPE_LEAF = 4;
|
||||
*/
|
||||
LEAF = 4,
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the enum ory.keto.relation_tuples.v1alpha2.NodeType.
|
||||
*/
|
||||
export declare const NodeTypeSchema: GenEnum<NodeType>
|
||||
|
||||
/**
|
||||
* The service that performs subject set expansion
|
||||
* based on the stored Access Control Lists.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.ExpandService
|
||||
*/
|
||||
export declare const ExpandService: GenService<{
|
||||
/**
|
||||
* Expands the subject set into a tree of subjects.
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.ExpandService.Expand
|
||||
*/
|
||||
expand: {
|
||||
methodKind: "unary"
|
||||
input: typeof ExpandRequestSchema
|
||||
output: typeof ExpandResponseSchema
|
||||
}
|
||||
}>
|
||||
@@ -0,0 +1,73 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-es v2.11.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/expand_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import {
|
||||
enumDesc,
|
||||
fileDesc,
|
||||
messageDesc,
|
||||
serviceDesc,
|
||||
tsEnum,
|
||||
} from "@bufbuild/protobuf/codegenv2"
|
||||
import { file_ory_keto_relation_tuples_v1alpha2_relation_tuples } from "./relation_tuples_pb"
|
||||
|
||||
/**
|
||||
* Describes the file ory/keto/relation_tuples/v1alpha2/expand_service.proto.
|
||||
*/
|
||||
export const file_ory_keto_relation_tuples_v1alpha2_expand_service =
|
||||
/*@__PURE__*/
|
||||
fileDesc(
|
||||
"CjZvcnkva2V0by9yZWxhdGlvbl90dXBsZXMvdjFhbHBoYTIvZXhwYW5kX3NlcnZpY2UucHJvdG8SIW9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMiJyCg1FeHBhbmRSZXF1ZXN0EjsKB3N1YmplY3QYASABKAsyKi5vcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTIuU3ViamVjdBIRCgltYXhfZGVwdGgYAiABKAUSEQoJc25hcHRva2VuGAMgASgJIk4KDkV4cGFuZFJlc3BvbnNlEjwKBHRyZWUYASABKAsyLi5vcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTIuU3ViamVjdFRyZWUikQIKC1N1YmplY3RUcmVlEj4KCW5vZGVfdHlwZRgBIAEoDjIrLm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMi5Ob2RlVHlwZRI/CgdzdWJqZWN0GAIgASgLMioub3J5LmtldG8ucmVsYXRpb25fdHVwbGVzLnYxYWxwaGEyLlN1YmplY3RCAhgBEj8KBXR1cGxlGAQgASgLMjAub3J5LmtldG8ucmVsYXRpb25fdHVwbGVzLnYxYWxwaGEyLlJlbGF0aW9uVHVwbGUSQAoIY2hpbGRyZW4YAyADKAsyLi5vcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTIuU3ViamVjdFRyZWUqgwEKCE5vZGVUeXBlEhkKFU5PREVfVFlQRV9VTlNQRUNJRklFRBAAEhMKD05PREVfVFlQRV9VTklPThABEhcKE05PREVfVFlQRV9FWENMVVNJT04QAhIaChZOT0RFX1RZUEVfSU5URVJTRUNUSU9OEAMSEgoOTk9ERV9UWVBFX0xFQUYQBDJ+Cg1FeHBhbmRTZXJ2aWNlEm0KBkV4cGFuZBIwLm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMi5FeHBhbmRSZXF1ZXN0GjEub3J5LmtldG8ucmVsYXRpb25fdHVwbGVzLnYxYWxwaGEyLkV4cGFuZFJlc3BvbnNlQqsCCiVjb20ub3J5LmtldG8ucmVsYXRpb25fdHVwbGVzLnYxYWxwaGEyQhJFeHBhbmRTZXJ2aWNlUHJvdG9QAVpLZ2l0aHViLmNvbS9vcnkva2V0by9nZW4vZ28vb3J5L2tldG8vcmVsYXRpb25fdHVwbGVzL3YxYWxwaGEyO3JlbGF0aW9udHVwbGVzogIDT0tSqgIgT3J5LktldG8uUmVsYXRpb25UdXBsZXMuVjFhbHBoYTLKAiBPcnlcS2V0b1xSZWxhdGlvblR1cGxlc1xWMWFscGhhMuICLE9yeVxLZXRvXFJlbGF0aW9uVHVwbGVzXFYxYWxwaGEyXEdQQk1ldGFkYXRh6gIjT3J5OjpLZXRvOjpSZWxhdGlvblR1cGxlczo6VjFhbHBoYTJiBnByb3RvMw",
|
||||
[file_ory_keto_relation_tuples_v1alpha2_relation_tuples],
|
||||
)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.ExpandRequest.
|
||||
* Use `create(ExpandRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const ExpandRequestSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_expand_service, 0)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.ExpandResponse.
|
||||
* Use `create(ExpandResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const ExpandResponseSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_expand_service, 1)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.SubjectTree.
|
||||
* Use `create(SubjectTreeSchema)` to create a new message.
|
||||
*/
|
||||
export const SubjectTreeSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_expand_service, 2)
|
||||
|
||||
/**
|
||||
* Describes the enum ory.keto.relation_tuples.v1alpha2.NodeType.
|
||||
*/
|
||||
export const NodeTypeSchema =
|
||||
/*@__PURE__*/
|
||||
enumDesc(file_ory_keto_relation_tuples_v1alpha2_expand_service, 0)
|
||||
|
||||
/**
|
||||
* @generated from enum ory.keto.relation_tuples.v1alpha2.NodeType
|
||||
*/
|
||||
export const NodeType = /*@__PURE__*/ tsEnum(NodeTypeSchema)
|
||||
|
||||
/**
|
||||
* The service that performs subject set expansion
|
||||
* based on the stored Access Control Lists.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.ExpandService
|
||||
*/
|
||||
export const ExpandService =
|
||||
/*@__PURE__*/
|
||||
serviceDesc(file_ory_keto_relation_tuples_v1alpha2_expand_service, 0)
|
||||
37
gen/es/ory/keto/relation_tuples/v1alpha2/namespaces_service_connect.d.ts
vendored
Normal file
37
gen/es/ory/keto/relation_tuples/v1alpha2/namespaces_service_connect.d.ts
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-connect-es v1.7.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/namespaces_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import {
|
||||
ListNamespacesRequest,
|
||||
ListNamespacesResponse,
|
||||
} from "./namespaces_service_pb.js"
|
||||
import { MethodKind } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* The service to query namespaces.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.NamespacesService
|
||||
*/
|
||||
export declare const NamespacesService: {
|
||||
readonly typeName: "ory.keto.relation_tuples.v1alpha2.NamespacesService"
|
||||
readonly methods: {
|
||||
/**
|
||||
* Lists Namespaces
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.NamespacesService.ListNamespaces
|
||||
*/
|
||||
readonly listNamespaces: {
|
||||
readonly name: "ListNamespaces"
|
||||
readonly I: typeof ListNamespacesRequest
|
||||
readonly O: typeof ListNamespacesResponse
|
||||
readonly kind: MethodKind.Unary
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-connect-es v1.7.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/namespaces_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import {
|
||||
ListNamespacesRequest,
|
||||
ListNamespacesResponse,
|
||||
} from "./namespaces_service_pb.js"
|
||||
import { MethodKind } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* The service to query namespaces.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.NamespacesService
|
||||
*/
|
||||
export const NamespacesService = {
|
||||
typeName: "ory.keto.relation_tuples.v1alpha2.NamespacesService",
|
||||
methods: {
|
||||
/**
|
||||
* Lists Namespaces
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.NamespacesService.ListNamespaces
|
||||
*/
|
||||
listNamespaces: {
|
||||
name: "ListNamespaces",
|
||||
I: ListNamespacesRequest,
|
||||
O: ListNamespacesResponse,
|
||||
kind: MethodKind.Unary,
|
||||
},
|
||||
},
|
||||
}
|
||||
86
gen/es/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.d.ts
vendored
Normal file
86
gen/es/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.d.ts
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-es v2.11.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/namespaces_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type {
|
||||
GenFile,
|
||||
GenMessage,
|
||||
GenService,
|
||||
} from "@bufbuild/protobuf/codegenv2"
|
||||
import type { Message } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* Describes the file ory/keto/relation_tuples/v1alpha2/namespaces_service.proto.
|
||||
*/
|
||||
export declare const file_ory_keto_relation_tuples_v1alpha2_namespaces_service: GenFile
|
||||
|
||||
/**
|
||||
* Request for ReadService.ListNamespaces RPC.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest
|
||||
*/
|
||||
export declare type ListNamespacesRequest =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest"> & {}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest.
|
||||
* Use `create(ListNamespacesRequestSchema)` to create a new message.
|
||||
*/
|
||||
export declare const ListNamespacesRequestSchema: GenMessage<ListNamespacesRequest>
|
||||
|
||||
/**
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse
|
||||
*/
|
||||
export declare type ListNamespacesResponse =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse"> & {
|
||||
/**
|
||||
* @generated from field: repeated ory.keto.relation_tuples.v1alpha2.Namespace namespaces = 1;
|
||||
*/
|
||||
namespaces: Namespace[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.
|
||||
* Use `create(ListNamespacesResponseSchema)` to create a new message.
|
||||
*/
|
||||
export declare const ListNamespacesResponseSchema: GenMessage<ListNamespacesResponse>
|
||||
|
||||
/**
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.Namespace
|
||||
*/
|
||||
export declare type Namespace =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.Namespace"> & {
|
||||
/**
|
||||
* @generated from field: string name = 1;
|
||||
*/
|
||||
name: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.Namespace.
|
||||
* Use `create(NamespaceSchema)` to create a new message.
|
||||
*/
|
||||
export declare const NamespaceSchema: GenMessage<Namespace>
|
||||
|
||||
/**
|
||||
* The service to query namespaces.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.NamespacesService
|
||||
*/
|
||||
export declare const NamespacesService: GenService<{
|
||||
/**
|
||||
* Lists Namespaces
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.NamespacesService.ListNamespaces
|
||||
*/
|
||||
listNamespaces: {
|
||||
methodKind: "unary"
|
||||
input: typeof ListNamespacesRequestSchema
|
||||
output: typeof ListNamespacesResponseSchema
|
||||
}
|
||||
}>
|
||||
@@ -0,0 +1,56 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-es v2.11.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/namespaces_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import {
|
||||
fileDesc,
|
||||
messageDesc,
|
||||
serviceDesc,
|
||||
} from "@bufbuild/protobuf/codegenv2"
|
||||
|
||||
/**
|
||||
* Describes the file ory/keto/relation_tuples/v1alpha2/namespaces_service.proto.
|
||||
*/
|
||||
export const file_ory_keto_relation_tuples_v1alpha2_namespaces_service =
|
||||
/*@__PURE__*/
|
||||
fileDesc(
|
||||
"Cjpvcnkva2V0by9yZWxhdGlvbl90dXBsZXMvdjFhbHBoYTIvbmFtZXNwYWNlc19zZXJ2aWNlLnByb3RvEiFvcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTIiFwoVTGlzdE5hbWVzcGFjZXNSZXF1ZXN0IloKFkxpc3ROYW1lc3BhY2VzUmVzcG9uc2USQAoKbmFtZXNwYWNlcxgBIAMoCzIsLm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMi5OYW1lc3BhY2UiGQoJTmFtZXNwYWNlEgwKBG5hbWUYASABKAkymwEKEU5hbWVzcGFjZXNTZXJ2aWNlEoUBCg5MaXN0TmFtZXNwYWNlcxI4Lm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMi5MaXN0TmFtZXNwYWNlc1JlcXVlc3QaOS5vcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTIuTGlzdE5hbWVzcGFjZXNSZXNwb25zZUKvAgolY29tLm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMkIWTmFtZXNwYWNlc1NlcnZpY2VQcm90b1ABWktnaXRodWIuY29tL29yeS9rZXRvL2dlbi9nby9vcnkva2V0by9yZWxhdGlvbl90dXBsZXMvdjFhbHBoYTI7cmVsYXRpb250dXBsZXOiAgNPS1KqAiBPcnkuS2V0by5SZWxhdGlvblR1cGxlcy5WMWFscGhhMsoCIE9yeVxLZXRvXFJlbGF0aW9uVHVwbGVzXFYxYWxwaGEy4gIsT3J5XEtldG9cUmVsYXRpb25UdXBsZXNcVjFhbHBoYTJcR1BCTWV0YWRhdGHqAiNPcnk6OktldG86OlJlbGF0aW9uVHVwbGVzOjpWMWFscGhhMmIGcHJvdG8z",
|
||||
)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest.
|
||||
* Use `create(ListNamespacesRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const ListNamespacesRequestSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_namespaces_service, 0)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.
|
||||
* Use `create(ListNamespacesResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const ListNamespacesResponseSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_namespaces_service, 1)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.Namespace.
|
||||
* Use `create(NamespaceSchema)` to create a new message.
|
||||
*/
|
||||
export const NamespaceSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_namespaces_service, 2)
|
||||
|
||||
/**
|
||||
* The service to query namespaces.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.NamespacesService
|
||||
*/
|
||||
export const NamespacesService =
|
||||
/*@__PURE__*/
|
||||
serviceDesc(file_ory_keto_relation_tuples_v1alpha2_namespaces_service, 0)
|
||||
37
gen/es/ory/keto/relation_tuples/v1alpha2/read_service_connect.d.ts
vendored
Normal file
37
gen/es/ory/keto/relation_tuples/v1alpha2/read_service_connect.d.ts
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-connect-es v1.7.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/read_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import {
|
||||
ListRelationTuplesRequest,
|
||||
ListRelationTuplesResponse,
|
||||
} from "./read_service_pb.js"
|
||||
import { MethodKind } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* The service to query relationships.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.ReadService
|
||||
*/
|
||||
export declare const ReadService: {
|
||||
readonly typeName: "ory.keto.relation_tuples.v1alpha2.ReadService"
|
||||
readonly methods: {
|
||||
/**
|
||||
* Lists ACL relationships.
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.ReadService.ListRelationTuples
|
||||
*/
|
||||
readonly listRelationTuples: {
|
||||
readonly name: "ListRelationTuples"
|
||||
readonly I: typeof ListRelationTuplesRequest
|
||||
readonly O: typeof ListRelationTuplesResponse
|
||||
readonly kind: MethodKind.Unary
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-connect-es v1.7.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/read_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import {
|
||||
ListRelationTuplesRequest,
|
||||
ListRelationTuplesResponse,
|
||||
} from "./read_service_pb.js"
|
||||
import { MethodKind } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* The service to query relationships.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.ReadService
|
||||
*/
|
||||
export const ReadService = {
|
||||
typeName: "ory.keto.relation_tuples.v1alpha2.ReadService",
|
||||
methods: {
|
||||
/**
|
||||
* Lists ACL relationships.
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.ReadService.ListRelationTuples
|
||||
*/
|
||||
listRelationTuples: {
|
||||
name: "ListRelationTuples",
|
||||
I: ListRelationTuplesRequest,
|
||||
O: ListRelationTuplesResponse,
|
||||
kind: MethodKind.Unary,
|
||||
},
|
||||
},
|
||||
}
|
||||
206
gen/es/ory/keto/relation_tuples/v1alpha2/read_service_pb.d.ts
vendored
Normal file
206
gen/es/ory/keto/relation_tuples/v1alpha2/read_service_pb.d.ts
vendored
Normal file
@@ -0,0 +1,206 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-es v2.11.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/read_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type {
|
||||
GenFile,
|
||||
GenMessage,
|
||||
GenService,
|
||||
} from "@bufbuild/protobuf/codegenv2"
|
||||
import type { Message } from "@bufbuild/protobuf"
|
||||
import type {
|
||||
RelationQuery,
|
||||
RelationTuple,
|
||||
Subject,
|
||||
} from "./relation_tuples_pb"
|
||||
import type { FieldMask } from "@bufbuild/protobuf/wkt"
|
||||
|
||||
/**
|
||||
* Describes the file ory/keto/relation_tuples/v1alpha2/read_service.proto.
|
||||
*/
|
||||
export declare const file_ory_keto_relation_tuples_v1alpha2_read_service: GenFile
|
||||
|
||||
/**
|
||||
* Request for ReadService.ListRelationTuples RPC.
|
||||
* See `ListRelationTuplesRequest_Query` for how to filter the query.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest
|
||||
*/
|
||||
export declare type ListRelationTuplesRequest =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest"> & {
|
||||
/**
|
||||
* All query constraints are concatenated
|
||||
* with a logical AND operator.
|
||||
*
|
||||
* The RelationTuple list from ListRelationTuplesResponse
|
||||
* is ordered from the newest RelationTuple to the oldest.
|
||||
*
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query query = 1 [deprecated = true];
|
||||
* @deprecated
|
||||
*/
|
||||
query?: ListRelationTuplesRequest_Query
|
||||
|
||||
/**
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.RelationQuery relation_query = 6;
|
||||
*/
|
||||
relationQuery?: RelationQuery
|
||||
|
||||
/**
|
||||
* This field is not implemented yet and has no effect.
|
||||
* <!--
|
||||
* Optional. The list of fields to be expanded
|
||||
* in the RelationTuple list returned in `ListRelationTuplesResponse`.
|
||||
* Leaving this field unspecified means all fields are expanded.
|
||||
*
|
||||
* Available fields:
|
||||
* "object", "relation", "subject",
|
||||
* "namespace", "subject.id", "subject.namespace",
|
||||
* "subject.object", "subject.relation"
|
||||
* -->
|
||||
*
|
||||
* @generated from field: google.protobuf.FieldMask expand_mask = 2;
|
||||
*/
|
||||
expandMask?: FieldMask
|
||||
|
||||
/**
|
||||
* This field is not implemented yet and has no effect.
|
||||
* <!--
|
||||
* Optional. The snapshot token for this read.
|
||||
* -->
|
||||
*
|
||||
* @generated from field: string snaptoken = 3;
|
||||
*/
|
||||
snaptoken: string
|
||||
|
||||
/**
|
||||
* Optional. The maximum number of
|
||||
* RelationTuples to return in the response.
|
||||
*
|
||||
* Default: 100
|
||||
*
|
||||
* @generated from field: int32 page_size = 4;
|
||||
*/
|
||||
pageSize: number
|
||||
|
||||
/**
|
||||
* Optional. An opaque pagination token returned from
|
||||
* a previous call to `ListRelationTuples` that
|
||||
* indicates where the page should start at.
|
||||
*
|
||||
* An empty token denotes the first page. All successive
|
||||
* pages require the token from the previous page.
|
||||
*
|
||||
* @generated from field: string page_token = 5;
|
||||
*/
|
||||
pageToken: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.
|
||||
* Use `create(ListRelationTuplesRequestSchema)` to create a new message.
|
||||
*/
|
||||
export declare const ListRelationTuplesRequestSchema: GenMessage<ListRelationTuplesRequest>
|
||||
|
||||
/**
|
||||
* The query for listing relationships.
|
||||
* Clients can specify any optional field to
|
||||
* partially filter for specific relationships.
|
||||
*
|
||||
* Example use cases (namespace is always required):
|
||||
* - object only: display a list of all permissions referring to a specific object
|
||||
* - relation only: get all groups that have members; get all directories that have content
|
||||
* - object & relation: display all subjects that have a specific permission relation
|
||||
* - subject & relation: display all groups a subject belongs to; display all objects a subject has access to
|
||||
* - object & relation & subject: check whether the relation tuple already exists
|
||||
*
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query
|
||||
*/
|
||||
export declare type ListRelationTuplesRequest_Query =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query"> & {
|
||||
/**
|
||||
* Required. The namespace to query.
|
||||
*
|
||||
* @generated from field: string namespace = 1;
|
||||
*/
|
||||
namespace: string
|
||||
|
||||
/**
|
||||
* Optional. The object to query for.
|
||||
*
|
||||
* @generated from field: string object = 2;
|
||||
*/
|
||||
object: string
|
||||
|
||||
/**
|
||||
* Optional. The relation to query for.
|
||||
*
|
||||
* @generated from field: string relation = 3;
|
||||
*/
|
||||
relation: string
|
||||
|
||||
/**
|
||||
* Optional. The subject to query for.
|
||||
*
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.Subject subject = 4;
|
||||
*/
|
||||
subject?: Subject
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.
|
||||
* Use `create(ListRelationTuplesRequest_QuerySchema)` to create a new message.
|
||||
*/
|
||||
export declare const ListRelationTuplesRequest_QuerySchema: GenMessage<ListRelationTuplesRequest_Query>
|
||||
|
||||
/**
|
||||
* The response of a ReadService.ListRelationTuples RPC.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse
|
||||
*/
|
||||
export declare type ListRelationTuplesResponse =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse"> & {
|
||||
/**
|
||||
* The relationships matching the list request.
|
||||
*
|
||||
* @generated from field: repeated ory.keto.relation_tuples.v1alpha2.RelationTuple relation_tuples = 1;
|
||||
*/
|
||||
relationTuples: RelationTuple[]
|
||||
|
||||
/**
|
||||
* The token required to get the next page.
|
||||
* If this is the last page, the token will be the empty string.
|
||||
*
|
||||
* @generated from field: string next_page_token = 2;
|
||||
*/
|
||||
nextPageToken: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.
|
||||
* Use `create(ListRelationTuplesResponseSchema)` to create a new message.
|
||||
*/
|
||||
export declare const ListRelationTuplesResponseSchema: GenMessage<ListRelationTuplesResponse>
|
||||
|
||||
/**
|
||||
* The service to query relationships.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.ReadService
|
||||
*/
|
||||
export declare const ReadService: GenService<{
|
||||
/**
|
||||
* Lists ACL relationships.
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.ReadService.ListRelationTuples
|
||||
*/
|
||||
listRelationTuples: {
|
||||
methodKind: "unary"
|
||||
input: typeof ListRelationTuplesRequestSchema
|
||||
output: typeof ListRelationTuplesResponseSchema
|
||||
}
|
||||
}>
|
||||
62
gen/es/ory/keto/relation_tuples/v1alpha2/read_service_pb.js
Normal file
62
gen/es/ory/keto/relation_tuples/v1alpha2/read_service_pb.js
Normal file
@@ -0,0 +1,62 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-es v2.11.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/read_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import {
|
||||
fileDesc,
|
||||
messageDesc,
|
||||
serviceDesc,
|
||||
} from "@bufbuild/protobuf/codegenv2"
|
||||
import { file_ory_keto_relation_tuples_v1alpha2_relation_tuples } from "./relation_tuples_pb"
|
||||
import { file_google_protobuf_field_mask } from "@bufbuild/protobuf/wkt"
|
||||
|
||||
/**
|
||||
* Describes the file ory/keto/relation_tuples/v1alpha2/read_service.proto.
|
||||
*/
|
||||
export const file_ory_keto_relation_tuples_v1alpha2_read_service =
|
||||
/*@__PURE__*/
|
||||
fileDesc(
|
||||
"CjRvcnkva2V0by9yZWxhdGlvbl90dXBsZXMvdjFhbHBoYTIvcmVhZF9zZXJ2aWNlLnByb3RvEiFvcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTIiogMKGUxpc3RSZWxhdGlvblR1cGxlc1JlcXVlc3QSVQoFcXVlcnkYASABKAsyQi5vcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTIuTGlzdFJlbGF0aW9uVHVwbGVzUmVxdWVzdC5RdWVyeUICGAESSAoOcmVsYXRpb25fcXVlcnkYBiABKAsyMC5vcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTIuUmVsYXRpb25RdWVyeRIvCgtleHBhbmRfbWFzaxgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2sSEQoJc25hcHRva2VuGAMgASgJEhEKCXBhZ2Vfc2l6ZRgEIAEoBRISCgpwYWdlX3Rva2VuGAUgASgJGnkKBVF1ZXJ5EhEKCW5hbWVzcGFjZRgBIAEoCRIOCgZvYmplY3QYAiABKAkSEAoIcmVsYXRpb24YAyABKAkSOwoHc3ViamVjdBgEIAEoCzIqLm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMi5TdWJqZWN0IoABChpMaXN0UmVsYXRpb25UdXBsZXNSZXNwb25zZRJJCg9yZWxhdGlvbl90dXBsZXMYASADKAsyMC5vcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTIuUmVsYXRpb25UdXBsZRIXCg9uZXh0X3BhZ2VfdG9rZW4YAiABKAkyoQEKC1JlYWRTZXJ2aWNlEpEBChJMaXN0UmVsYXRpb25UdXBsZXMSPC5vcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTIuTGlzdFJlbGF0aW9uVHVwbGVzUmVxdWVzdBo9Lm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMi5MaXN0UmVsYXRpb25UdXBsZXNSZXNwb25zZUKpAgolY29tLm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMkIQUmVhZFNlcnZpY2VQcm90b1ABWktnaXRodWIuY29tL29yeS9rZXRvL2dlbi9nby9vcnkva2V0by9yZWxhdGlvbl90dXBsZXMvdjFhbHBoYTI7cmVsYXRpb250dXBsZXOiAgNPS1KqAiBPcnkuS2V0by5SZWxhdGlvblR1cGxlcy5WMWFscGhhMsoCIE9yeVxLZXRvXFJlbGF0aW9uVHVwbGVzXFYxYWxwaGEy4gIsT3J5XEtldG9cUmVsYXRpb25UdXBsZXNcVjFhbHBoYTJcR1BCTWV0YWRhdGHqAiNPcnk6OktldG86OlJlbGF0aW9uVHVwbGVzOjpWMWFscGhhMmIGcHJvdG8z",
|
||||
[
|
||||
file_ory_keto_relation_tuples_v1alpha2_relation_tuples,
|
||||
file_google_protobuf_field_mask,
|
||||
],
|
||||
)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.
|
||||
* Use `create(ListRelationTuplesRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const ListRelationTuplesRequestSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_read_service, 0)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.
|
||||
* Use `create(ListRelationTuplesRequest_QuerySchema)` to create a new message.
|
||||
*/
|
||||
export const ListRelationTuplesRequest_QuerySchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_read_service, 0, 0)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.
|
||||
* Use `create(ListRelationTuplesResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const ListRelationTuplesResponseSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_read_service, 1)
|
||||
|
||||
/**
|
||||
* The service to query relationships.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.ReadService
|
||||
*/
|
||||
export const ReadService =
|
||||
/*@__PURE__*/
|
||||
serviceDesc(file_ory_keto_relation_tuples_v1alpha2_read_service, 0)
|
||||
192
gen/es/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.d.ts
vendored
Normal file
192
gen/es/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.d.ts
vendored
Normal file
@@ -0,0 +1,192 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-es v2.11.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/relation_tuples.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"
|
||||
import type { Message } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* Describes the file ory/keto/relation_tuples/v1alpha2/relation_tuples.proto.
|
||||
*/
|
||||
export declare const file_ory_keto_relation_tuples_v1alpha2_relation_tuples: GenFile
|
||||
|
||||
/**
|
||||
* RelationTuple defines a relation between an Object and a Subject.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.RelationTuple
|
||||
*/
|
||||
export declare type RelationTuple =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.RelationTuple"> & {
|
||||
/**
|
||||
* The namespace this relation tuple lives in.
|
||||
*
|
||||
* @generated from field: string namespace = 1;
|
||||
*/
|
||||
namespace: string
|
||||
|
||||
/**
|
||||
* The object related by this tuple.
|
||||
* It is an object in the namespace of the tuple.
|
||||
*
|
||||
* @generated from field: string object = 2;
|
||||
*/
|
||||
object: string
|
||||
|
||||
/**
|
||||
* The relation between an Object and a Subject.
|
||||
*
|
||||
* @generated from field: string relation = 3;
|
||||
*/
|
||||
relation: string
|
||||
|
||||
/**
|
||||
* The subject related by this tuple.
|
||||
* A Subject either represents a concrete subject id or
|
||||
* a `SubjectSet` that expands to more Subjects.
|
||||
*
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.Subject subject = 4;
|
||||
*/
|
||||
subject?: Subject
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.RelationTuple.
|
||||
* Use `create(RelationTupleSchema)` to create a new message.
|
||||
*/
|
||||
export declare const RelationTupleSchema: GenMessage<RelationTuple>
|
||||
|
||||
/**
|
||||
* The query for listing relationships.
|
||||
* Clients can specify any optional field to
|
||||
* partially filter for specific relationships.
|
||||
*
|
||||
* Example use cases (namespace is always required):
|
||||
* - object only: display a list of all permissions referring to a specific object
|
||||
* - relation only: get all groups that have members; get all directories that have content
|
||||
* - object & relation: display all subjects that have a specific permission relation
|
||||
* - subject & relation: display all groups a subject belongs to; display all objects a subject has access to
|
||||
* - object & relation & subject: check whether the relation tuple already exists
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.RelationQuery
|
||||
*/
|
||||
export declare type RelationQuery =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.RelationQuery"> & {
|
||||
/**
|
||||
* The namespace this relation tuple lives in.
|
||||
*
|
||||
* @generated from field: optional string namespace = 1;
|
||||
*/
|
||||
namespace?: string
|
||||
|
||||
/**
|
||||
* The object related by this tuple.
|
||||
* It is an object in the namespace of the tuple.
|
||||
*
|
||||
* @generated from field: optional string object = 2;
|
||||
*/
|
||||
object?: string
|
||||
|
||||
/**
|
||||
* The relation between an Object and a Subject.
|
||||
*
|
||||
* @generated from field: optional string relation = 3;
|
||||
*/
|
||||
relation?: string
|
||||
|
||||
/**
|
||||
* The subject related by this tuple.
|
||||
* A Subject either represents a concrete subject id or
|
||||
* a `SubjectSet` that expands to more Subjects.
|
||||
*
|
||||
* @generated from field: optional ory.keto.relation_tuples.v1alpha2.Subject subject = 4;
|
||||
*/
|
||||
subject?: Subject
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.RelationQuery.
|
||||
* Use `create(RelationQuerySchema)` to create a new message.
|
||||
*/
|
||||
export declare const RelationQuerySchema: GenMessage<RelationQuery>
|
||||
|
||||
/**
|
||||
* Subject is either a concrete subject id or
|
||||
* a `SubjectSet` expanding to more Subjects.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.Subject
|
||||
*/
|
||||
export declare type Subject =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.Subject"> & {
|
||||
/**
|
||||
* The reference of this abstract subject.
|
||||
*
|
||||
* @generated from oneof ory.keto.relation_tuples.v1alpha2.Subject.ref
|
||||
*/
|
||||
ref:
|
||||
| {
|
||||
/**
|
||||
* A concrete id of the subject.
|
||||
*
|
||||
* @generated from field: string id = 1;
|
||||
*/
|
||||
value: string
|
||||
case: "id"
|
||||
}
|
||||
| {
|
||||
/**
|
||||
* A subject set that expands to more Subjects.
|
||||
* More information are available under [concepts](../concepts/15_subjects.mdx).
|
||||
*
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.SubjectSet set = 2;
|
||||
*/
|
||||
value: SubjectSet
|
||||
case: "set"
|
||||
}
|
||||
| { case: undefined; value?: undefined }
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.Subject.
|
||||
* Use `create(SubjectSchema)` to create a new message.
|
||||
*/
|
||||
export declare const SubjectSchema: GenMessage<Subject>
|
||||
|
||||
/**
|
||||
* SubjectSet refers to all subjects who have
|
||||
* the same `relation` on an `object`.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.SubjectSet
|
||||
*/
|
||||
export declare type SubjectSet =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.SubjectSet"> & {
|
||||
/**
|
||||
* The namespace of the object and relation
|
||||
* referenced in this subject set.
|
||||
*
|
||||
* @generated from field: string namespace = 1;
|
||||
*/
|
||||
namespace: string
|
||||
|
||||
/**
|
||||
* The object related by this subject set.
|
||||
*
|
||||
* @generated from field: string object = 2;
|
||||
*/
|
||||
object: string
|
||||
|
||||
/**
|
||||
* The relation between the object and the subjects.
|
||||
*
|
||||
* @generated from field: string relation = 3;
|
||||
*/
|
||||
relation: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.SubjectSet.
|
||||
* Use `create(SubjectSetSchema)` to create a new message.
|
||||
*/
|
||||
export declare const SubjectSetSchema: GenMessage<SubjectSet>
|
||||
@@ -0,0 +1,49 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-es v2.11.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/relation_tuples.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2"
|
||||
|
||||
/**
|
||||
* Describes the file ory/keto/relation_tuples/v1alpha2/relation_tuples.proto.
|
||||
*/
|
||||
export const file_ory_keto_relation_tuples_v1alpha2_relation_tuples =
|
||||
/*@__PURE__*/
|
||||
fileDesc(
|
||||
"Cjdvcnkva2V0by9yZWxhdGlvbl90dXBsZXMvdjFhbHBoYTIvcmVsYXRpb25fdHVwbGVzLnByb3RvEiFvcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTIigQEKDVJlbGF0aW9uVHVwbGUSEQoJbmFtZXNwYWNlGAEgASgJEg4KBm9iamVjdBgCIAEoCRIQCghyZWxhdGlvbhgDIAEoCRI7CgdzdWJqZWN0GAQgASgLMioub3J5LmtldG8ucmVsYXRpb25fdHVwbGVzLnYxYWxwaGEyLlN1YmplY3QixwEKDVJlbGF0aW9uUXVlcnkSFgoJbmFtZXNwYWNlGAEgASgJSACIAQESEwoGb2JqZWN0GAIgASgJSAGIAQESFQoIcmVsYXRpb24YAyABKAlIAogBARJACgdzdWJqZWN0GAQgASgLMioub3J5LmtldG8ucmVsYXRpb25fdHVwbGVzLnYxYWxwaGEyLlN1YmplY3RIA4gBAUIMCgpfbmFtZXNwYWNlQgkKB19vYmplY3RCCwoJX3JlbGF0aW9uQgoKCF9zdWJqZWN0IlwKB1N1YmplY3QSDAoCaWQYASABKAlIABI8CgNzZXQYAiABKAsyLS5vcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTIuU3ViamVjdFNldEgAQgUKA3JlZiJBCgpTdWJqZWN0U2V0EhEKCW5hbWVzcGFjZRgBIAEoCRIOCgZvYmplY3QYAiABKAkSEAoIcmVsYXRpb24YAyABKAlCrAIKJWNvbS5vcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTJCE1JlbGF0aW9uVHVwbGVzUHJvdG9QAVpLZ2l0aHViLmNvbS9vcnkva2V0by9nZW4vZ28vb3J5L2tldG8vcmVsYXRpb25fdHVwbGVzL3YxYWxwaGEyO3JlbGF0aW9udHVwbGVzogIDT0tSqgIgT3J5LktldG8uUmVsYXRpb25UdXBsZXMuVjFhbHBoYTLKAiBPcnlcS2V0b1xSZWxhdGlvblR1cGxlc1xWMWFscGhhMuICLE9yeVxLZXRvXFJlbGF0aW9uVHVwbGVzXFYxYWxwaGEyXEdQQk1ldGFkYXRh6gIjT3J5OjpLZXRvOjpSZWxhdGlvblR1cGxlczo6VjFhbHBoYTJiBnByb3RvMw",
|
||||
)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.RelationTuple.
|
||||
* Use `create(RelationTupleSchema)` to create a new message.
|
||||
*/
|
||||
export const RelationTupleSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_relation_tuples, 0)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.RelationQuery.
|
||||
* Use `create(RelationQuerySchema)` to create a new message.
|
||||
*/
|
||||
export const RelationQuerySchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_relation_tuples, 1)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.Subject.
|
||||
* Use `create(SubjectSchema)` to create a new message.
|
||||
*/
|
||||
export const SubjectSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_relation_tuples, 2)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.SubjectSet.
|
||||
* Use `create(SubjectSetSchema)` to create a new message.
|
||||
*/
|
||||
export const SubjectSetSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_relation_tuples, 3)
|
||||
34
gen/es/ory/keto/relation_tuples/v1alpha2/version_connect.d.ts
vendored
Normal file
34
gen/es/ory/keto/relation_tuples/v1alpha2/version_connect.d.ts
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-connect-es v1.7.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/version.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { GetVersionRequest, GetVersionResponse } from "./version_pb.js"
|
||||
import { MethodKind } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* The service returning the specific Ory Keto instance version.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis) and [write-APIs](../concepts/25_api-overview.mdx#write-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.VersionService
|
||||
*/
|
||||
export declare const VersionService: {
|
||||
readonly typeName: "ory.keto.relation_tuples.v1alpha2.VersionService"
|
||||
readonly methods: {
|
||||
/**
|
||||
* Returns the version of the Ory Keto instance.
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.VersionService.GetVersion
|
||||
*/
|
||||
readonly getVersion: {
|
||||
readonly name: "GetVersion"
|
||||
readonly I: typeof GetVersionRequest
|
||||
readonly O: typeof GetVersionResponse
|
||||
readonly kind: MethodKind.Unary
|
||||
}
|
||||
}
|
||||
}
|
||||
34
gen/es/ory/keto/relation_tuples/v1alpha2/version_connect.js
Normal file
34
gen/es/ory/keto/relation_tuples/v1alpha2/version_connect.js
Normal file
@@ -0,0 +1,34 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-connect-es v1.7.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/version.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { GetVersionRequest, GetVersionResponse } from "./version_pb.js"
|
||||
import { MethodKind } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* The service returning the specific Ory Keto instance version.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis) and [write-APIs](../concepts/25_api-overview.mdx#write-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.VersionService
|
||||
*/
|
||||
export const VersionService = {
|
||||
typeName: "ory.keto.relation_tuples.v1alpha2.VersionService",
|
||||
methods: {
|
||||
/**
|
||||
* Returns the version of the Ory Keto instance.
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.VersionService.GetVersion
|
||||
*/
|
||||
getVersion: {
|
||||
name: "GetVersion",
|
||||
I: GetVersionRequest,
|
||||
O: GetVersionResponse,
|
||||
kind: MethodKind.Unary,
|
||||
},
|
||||
},
|
||||
}
|
||||
73
gen/es/ory/keto/relation_tuples/v1alpha2/version_pb.d.ts
vendored
Normal file
73
gen/es/ory/keto/relation_tuples/v1alpha2/version_pb.d.ts
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-es v2.11.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/version.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type {
|
||||
GenFile,
|
||||
GenMessage,
|
||||
GenService,
|
||||
} from "@bufbuild/protobuf/codegenv2"
|
||||
import type { Message } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* Describes the file ory/keto/relation_tuples/v1alpha2/version.proto.
|
||||
*/
|
||||
export declare const file_ory_keto_relation_tuples_v1alpha2_version: GenFile
|
||||
|
||||
/**
|
||||
* Request for the VersionService.GetVersion RPC.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.GetVersionRequest
|
||||
*/
|
||||
export declare type GetVersionRequest =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.GetVersionRequest"> & {}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.GetVersionRequest.
|
||||
* Use `create(GetVersionRequestSchema)` to create a new message.
|
||||
*/
|
||||
export declare const GetVersionRequestSchema: GenMessage<GetVersionRequest>
|
||||
|
||||
/**
|
||||
* Response of the VersionService.GetVersion RPC.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.GetVersionResponse
|
||||
*/
|
||||
export declare type GetVersionResponse =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.GetVersionResponse"> & {
|
||||
/**
|
||||
* The version string of the Ory Keto instance.
|
||||
*
|
||||
* @generated from field: string version = 1;
|
||||
*/
|
||||
version: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.GetVersionResponse.
|
||||
* Use `create(GetVersionResponseSchema)` to create a new message.
|
||||
*/
|
||||
export declare const GetVersionResponseSchema: GenMessage<GetVersionResponse>
|
||||
|
||||
/**
|
||||
* The service returning the specific Ory Keto instance version.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis) and [write-APIs](../concepts/25_api-overview.mdx#write-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.VersionService
|
||||
*/
|
||||
export declare const VersionService: GenService<{
|
||||
/**
|
||||
* Returns the version of the Ory Keto instance.
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.VersionService.GetVersion
|
||||
*/
|
||||
getVersion: {
|
||||
methodKind: "unary"
|
||||
input: typeof GetVersionRequestSchema
|
||||
output: typeof GetVersionResponseSchema
|
||||
}
|
||||
}>
|
||||
48
gen/es/ory/keto/relation_tuples/v1alpha2/version_pb.js
Normal file
48
gen/es/ory/keto/relation_tuples/v1alpha2/version_pb.js
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-es v2.11.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/version.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import {
|
||||
fileDesc,
|
||||
messageDesc,
|
||||
serviceDesc,
|
||||
} from "@bufbuild/protobuf/codegenv2"
|
||||
|
||||
/**
|
||||
* Describes the file ory/keto/relation_tuples/v1alpha2/version.proto.
|
||||
*/
|
||||
export const file_ory_keto_relation_tuples_v1alpha2_version =
|
||||
/*@__PURE__*/
|
||||
fileDesc(
|
||||
"Ci9vcnkva2V0by9yZWxhdGlvbl90dXBsZXMvdjFhbHBoYTIvdmVyc2lvbi5wcm90bxIhb3J5LmtldG8ucmVsYXRpb25fdHVwbGVzLnYxYWxwaGEyIhMKEUdldFZlcnNpb25SZXF1ZXN0IiUKEkdldFZlcnNpb25SZXNwb25zZRIPCgd2ZXJzaW9uGAEgASgJMosBCg5WZXJzaW9uU2VydmljZRJ5CgpHZXRWZXJzaW9uEjQub3J5LmtldG8ucmVsYXRpb25fdHVwbGVzLnYxYWxwaGEyLkdldFZlcnNpb25SZXF1ZXN0GjUub3J5LmtldG8ucmVsYXRpb25fdHVwbGVzLnYxYWxwaGEyLkdldFZlcnNpb25SZXNwb25zZUKlAgolY29tLm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMkIMVmVyc2lvblByb3RvUAFaS2dpdGh1Yi5jb20vb3J5L2tldG8vZ2VuL2dvL29yeS9rZXRvL3JlbGF0aW9uX3R1cGxlcy92MWFscGhhMjtyZWxhdGlvbnR1cGxlc6ICA09LUqoCIE9yeS5LZXRvLlJlbGF0aW9uVHVwbGVzLlYxYWxwaGEyygIgT3J5XEtldG9cUmVsYXRpb25UdXBsZXNcVjFhbHBoYTLiAixPcnlcS2V0b1xSZWxhdGlvblR1cGxlc1xWMWFscGhhMlxHUEJNZXRhZGF0YeoCI09yeTo6S2V0bzo6UmVsYXRpb25UdXBsZXM6OlYxYWxwaGEyYgZwcm90bzM",
|
||||
)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.GetVersionRequest.
|
||||
* Use `create(GetVersionRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const GetVersionRequestSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_version, 0)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.GetVersionResponse.
|
||||
* Use `create(GetVersionResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const GetVersionResponseSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_version, 1)
|
||||
|
||||
/**
|
||||
* The service returning the specific Ory Keto instance version.
|
||||
*
|
||||
* This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis) and [write-APIs](../concepts/25_api-overview.mdx#write-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.VersionService
|
||||
*/
|
||||
export const VersionService =
|
||||
/*@__PURE__*/
|
||||
serviceDesc(file_ory_keto_relation_tuples_v1alpha2_version, 0)
|
||||
50
gen/es/ory/keto/relation_tuples/v1alpha2/write_service_connect.d.ts
vendored
Normal file
50
gen/es/ory/keto/relation_tuples/v1alpha2/write_service_connect.d.ts
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-connect-es v1.7.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/write_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import {
|
||||
DeleteRelationTuplesRequest,
|
||||
DeleteRelationTuplesResponse,
|
||||
TransactRelationTuplesRequest,
|
||||
TransactRelationTuplesResponse,
|
||||
} from "./write_service_pb.js"
|
||||
import { MethodKind } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* The write service to create and delete Access Control Lists.
|
||||
*
|
||||
* This service is part of the [write-APIs](../concepts/25_api-overview.mdx#write-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.WriteService
|
||||
*/
|
||||
export declare const WriteService: {
|
||||
readonly typeName: "ory.keto.relation_tuples.v1alpha2.WriteService"
|
||||
readonly methods: {
|
||||
/**
|
||||
* Writes one or more relationships in a single transaction.
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.WriteService.TransactRelationTuples
|
||||
*/
|
||||
readonly transactRelationTuples: {
|
||||
readonly name: "TransactRelationTuples"
|
||||
readonly I: typeof TransactRelationTuplesRequest
|
||||
readonly O: typeof TransactRelationTuplesResponse
|
||||
readonly kind: MethodKind.Unary
|
||||
}
|
||||
/**
|
||||
* Deletes relationships based on relation query
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.WriteService.DeleteRelationTuples
|
||||
*/
|
||||
readonly deleteRelationTuples: {
|
||||
readonly name: "DeleteRelationTuples"
|
||||
readonly I: typeof DeleteRelationTuplesRequest
|
||||
readonly O: typeof DeleteRelationTuplesResponse
|
||||
readonly kind: MethodKind.Unary
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-connect-es v1.7.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/write_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import {
|
||||
DeleteRelationTuplesRequest,
|
||||
DeleteRelationTuplesResponse,
|
||||
TransactRelationTuplesRequest,
|
||||
TransactRelationTuplesResponse,
|
||||
} from "./write_service_pb.js"
|
||||
import { MethodKind } from "@bufbuild/protobuf"
|
||||
|
||||
/**
|
||||
* The write service to create and delete Access Control Lists.
|
||||
*
|
||||
* This service is part of the [write-APIs](../concepts/25_api-overview.mdx#write-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.WriteService
|
||||
*/
|
||||
export const WriteService = {
|
||||
typeName: "ory.keto.relation_tuples.v1alpha2.WriteService",
|
||||
methods: {
|
||||
/**
|
||||
* Writes one or more relationships in a single transaction.
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.WriteService.TransactRelationTuples
|
||||
*/
|
||||
transactRelationTuples: {
|
||||
name: "TransactRelationTuples",
|
||||
I: TransactRelationTuplesRequest,
|
||||
O: TransactRelationTuplesResponse,
|
||||
kind: MethodKind.Unary,
|
||||
},
|
||||
/**
|
||||
* Deletes relationships based on relation query
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.WriteService.DeleteRelationTuples
|
||||
*/
|
||||
deleteRelationTuples: {
|
||||
name: "DeleteRelationTuples",
|
||||
I: DeleteRelationTuplesRequest,
|
||||
O: DeleteRelationTuplesResponse,
|
||||
kind: MethodKind.Unary,
|
||||
},
|
||||
},
|
||||
}
|
||||
244
gen/es/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts
vendored
Normal file
244
gen/es/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts
vendored
Normal file
@@ -0,0 +1,244 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-es v2.11.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/write_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type {
|
||||
GenEnum,
|
||||
GenFile,
|
||||
GenMessage,
|
||||
GenService,
|
||||
} from "@bufbuild/protobuf/codegenv2"
|
||||
import type { Message } from "@bufbuild/protobuf"
|
||||
import type {
|
||||
RelationQuery,
|
||||
RelationTuple,
|
||||
Subject,
|
||||
} from "./relation_tuples_pb"
|
||||
|
||||
/**
|
||||
* Describes the file ory/keto/relation_tuples/v1alpha2/write_service.proto.
|
||||
*/
|
||||
export declare const file_ory_keto_relation_tuples_v1alpha2_write_service: GenFile
|
||||
|
||||
/**
|
||||
* The request of a WriteService.TransactRelationTuples RPC.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest
|
||||
*/
|
||||
export declare type TransactRelationTuplesRequest =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest"> & {
|
||||
/**
|
||||
* The write delta for the relationships operated in one single transaction.
|
||||
* Either all actions succeed or no change takes effect on error.
|
||||
*
|
||||
* @generated from field: repeated ory.keto.relation_tuples.v1alpha2.RelationTupleDelta relation_tuple_deltas = 1;
|
||||
*/
|
||||
relationTupleDeltas: RelationTupleDelta[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.
|
||||
* Use `create(TransactRelationTuplesRequestSchema)` to create a new message.
|
||||
*/
|
||||
export declare const TransactRelationTuplesRequestSchema: GenMessage<TransactRelationTuplesRequest>
|
||||
|
||||
/**
|
||||
* Write-delta for a TransactRelationTuplesRequest.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.RelationTupleDelta
|
||||
*/
|
||||
export declare type RelationTupleDelta =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.RelationTupleDelta"> & {
|
||||
/**
|
||||
* The action to do on the RelationTuple.
|
||||
*
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action action = 1;
|
||||
*/
|
||||
action: RelationTupleDelta_Action
|
||||
|
||||
/**
|
||||
* The target RelationTuple.
|
||||
*
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.RelationTuple relation_tuple = 2;
|
||||
*/
|
||||
relationTuple?: RelationTuple
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.
|
||||
* Use `create(RelationTupleDeltaSchema)` to create a new message.
|
||||
*/
|
||||
export declare const RelationTupleDeltaSchema: GenMessage<RelationTupleDelta>
|
||||
|
||||
/**
|
||||
* @generated from enum ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action
|
||||
*/
|
||||
export enum RelationTupleDelta_Action {
|
||||
/**
|
||||
* Unspecified.
|
||||
* The `TransactRelationTuples` RPC ignores this
|
||||
* RelationTupleDelta if an action was unspecified.
|
||||
*
|
||||
* @generated from enum value: ACTION_UNSPECIFIED = 0;
|
||||
*/
|
||||
UNSPECIFIED = 0,
|
||||
|
||||
/**
|
||||
* Insertion of a new RelationTuple.
|
||||
*
|
||||
* @generated from enum value: ACTION_INSERT = 1;
|
||||
*/
|
||||
INSERT = 1,
|
||||
|
||||
/**
|
||||
* Deletion of the RelationTuple.
|
||||
* It is ignored if it does not exist.
|
||||
*
|
||||
* @generated from enum value: ACTION_DELETE = 2;
|
||||
*/
|
||||
DELETE = 2,
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the enum ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action.
|
||||
*/
|
||||
export declare const RelationTupleDelta_ActionSchema: GenEnum<RelationTupleDelta_Action>
|
||||
|
||||
/**
|
||||
* The response of a WriteService.TransactRelationTuples rpc.
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse
|
||||
*/
|
||||
export declare type TransactRelationTuplesResponse =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse"> & {
|
||||
/**
|
||||
* This field is not implemented yet and has no effect.
|
||||
* <!--
|
||||
* The list of the new latest snapshot tokens of the affected RelationTuple,
|
||||
* with the same index as specified in the `relation_tuple_deltas` field of
|
||||
* the TransactRelationTuplesRequest request.
|
||||
*
|
||||
* If the RelationTupleDelta_Action was DELETE
|
||||
* the snaptoken is empty at the same index.
|
||||
* -->
|
||||
*
|
||||
* @generated from field: repeated string snaptokens = 1;
|
||||
*/
|
||||
snaptokens: string[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.
|
||||
* Use `create(TransactRelationTuplesResponseSchema)` to create a new message.
|
||||
*/
|
||||
export declare const TransactRelationTuplesResponseSchema: GenMessage<TransactRelationTuplesResponse>
|
||||
|
||||
/**
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest
|
||||
*/
|
||||
export declare type DeleteRelationTuplesRequest =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest"> & {
|
||||
/**
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query query = 1 [deprecated = true];
|
||||
* @deprecated
|
||||
*/
|
||||
query?: DeleteRelationTuplesRequest_Query
|
||||
|
||||
/**
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.RelationQuery relation_query = 2;
|
||||
*/
|
||||
relationQuery?: RelationQuery
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.
|
||||
* Use `create(DeleteRelationTuplesRequestSchema)` to create a new message.
|
||||
*/
|
||||
export declare const DeleteRelationTuplesRequestSchema: GenMessage<DeleteRelationTuplesRequest>
|
||||
|
||||
/**
|
||||
* The query for deleting relationships
|
||||
*
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query
|
||||
*/
|
||||
export declare type DeleteRelationTuplesRequest_Query =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query"> & {
|
||||
/**
|
||||
* Optional. The namespace to query.
|
||||
*
|
||||
* @generated from field: string namespace = 1;
|
||||
*/
|
||||
namespace: string
|
||||
|
||||
/**
|
||||
* Optional. The object to query for.
|
||||
*
|
||||
* @generated from field: string object = 2;
|
||||
*/
|
||||
object: string
|
||||
|
||||
/**
|
||||
* Optional. The relation to query for.
|
||||
*
|
||||
* @generated from field: string relation = 3;
|
||||
*/
|
||||
relation: string
|
||||
|
||||
/**
|
||||
* Optional. The subject to query for.
|
||||
*
|
||||
* @generated from field: ory.keto.relation_tuples.v1alpha2.Subject subject = 4;
|
||||
*/
|
||||
subject?: Subject
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.
|
||||
* Use `create(DeleteRelationTuplesRequest_QuerySchema)` to create a new message.
|
||||
*/
|
||||
export declare const DeleteRelationTuplesRequest_QuerySchema: GenMessage<DeleteRelationTuplesRequest_Query>
|
||||
|
||||
/**
|
||||
* @generated from message ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse
|
||||
*/
|
||||
export declare type DeleteRelationTuplesResponse =
|
||||
Message<"ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse"> & {}
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.
|
||||
* Use `create(DeleteRelationTuplesResponseSchema)` to create a new message.
|
||||
*/
|
||||
export declare const DeleteRelationTuplesResponseSchema: GenMessage<DeleteRelationTuplesResponse>
|
||||
|
||||
/**
|
||||
* The write service to create and delete Access Control Lists.
|
||||
*
|
||||
* This service is part of the [write-APIs](../concepts/25_api-overview.mdx#write-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.WriteService
|
||||
*/
|
||||
export declare const WriteService: GenService<{
|
||||
/**
|
||||
* Writes one or more relationships in a single transaction.
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.WriteService.TransactRelationTuples
|
||||
*/
|
||||
transactRelationTuples: {
|
||||
methodKind: "unary"
|
||||
input: typeof TransactRelationTuplesRequestSchema
|
||||
output: typeof TransactRelationTuplesResponseSchema
|
||||
}
|
||||
/**
|
||||
* Deletes relationships based on relation query
|
||||
*
|
||||
* @generated from rpc ory.keto.relation_tuples.v1alpha2.WriteService.DeleteRelationTuples
|
||||
*/
|
||||
deleteRelationTuples: {
|
||||
methodKind: "unary"
|
||||
input: typeof DeleteRelationTuplesRequestSchema
|
||||
output: typeof DeleteRelationTuplesResponseSchema
|
||||
}
|
||||
}>
|
||||
98
gen/es/ory/keto/relation_tuples/v1alpha2/write_service_pb.js
Normal file
98
gen/es/ory/keto/relation_tuples/v1alpha2/write_service_pb.js
Normal file
@@ -0,0 +1,98 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// @generated by protoc-gen-es v2.11.0
|
||||
// @generated from file ory/keto/relation_tuples/v1alpha2/write_service.proto (package ory.keto.relation_tuples.v1alpha2, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import {
|
||||
enumDesc,
|
||||
fileDesc,
|
||||
messageDesc,
|
||||
serviceDesc,
|
||||
tsEnum,
|
||||
} from "@bufbuild/protobuf/codegenv2"
|
||||
import { file_ory_keto_relation_tuples_v1alpha2_relation_tuples } from "./relation_tuples_pb"
|
||||
|
||||
/**
|
||||
* Describes the file ory/keto/relation_tuples/v1alpha2/write_service.proto.
|
||||
*/
|
||||
export const file_ory_keto_relation_tuples_v1alpha2_write_service =
|
||||
/*@__PURE__*/
|
||||
fileDesc(
|
||||
"CjVvcnkva2V0by9yZWxhdGlvbl90dXBsZXMvdjFhbHBoYTIvd3JpdGVfc2VydmljZS5wcm90bxIhb3J5LmtldG8ucmVsYXRpb25fdHVwbGVzLnYxYWxwaGEyInUKHVRyYW5zYWN0UmVsYXRpb25UdXBsZXNSZXF1ZXN0ElQKFXJlbGF0aW9uX3R1cGxlX2RlbHRhcxgBIAMoCzI1Lm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMi5SZWxhdGlvblR1cGxlRGVsdGEi9AEKElJlbGF0aW9uVHVwbGVEZWx0YRJMCgZhY3Rpb24YASABKA4yPC5vcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTIuUmVsYXRpb25UdXBsZURlbHRhLkFjdGlvbhJICg5yZWxhdGlvbl90dXBsZRgCIAEoCzIwLm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMi5SZWxhdGlvblR1cGxlIkYKBkFjdGlvbhIWChJBQ1RJT05fVU5TUEVDSUZJRUQQABIRCg1BQ1RJT05fSU5TRVJUEAESEQoNQUNUSU9OX0RFTEVURRACIjQKHlRyYW5zYWN0UmVsYXRpb25UdXBsZXNSZXNwb25zZRISCgpzbmFwdG9rZW5zGAEgAygJIrsCChtEZWxldGVSZWxhdGlvblR1cGxlc1JlcXVlc3QSVwoFcXVlcnkYASABKAsyRC5vcnkua2V0by5yZWxhdGlvbl90dXBsZXMudjFhbHBoYTIuRGVsZXRlUmVsYXRpb25UdXBsZXNSZXF1ZXN0LlF1ZXJ5QgIYARJICg5yZWxhdGlvbl9xdWVyeRgCIAEoCzIwLm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMi5SZWxhdGlvblF1ZXJ5GnkKBVF1ZXJ5EhEKCW5hbWVzcGFjZRgBIAEoCRIOCgZvYmplY3QYAiABKAkSEAoIcmVsYXRpb24YAyABKAkSOwoHc3ViamVjdBgEIAEoCzIqLm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMi5TdWJqZWN0Ih4KHERlbGV0ZVJlbGF0aW9uVHVwbGVzUmVzcG9uc2UyyAIKDFdyaXRlU2VydmljZRKdAQoWVHJhbnNhY3RSZWxhdGlvblR1cGxlcxJALm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMi5UcmFuc2FjdFJlbGF0aW9uVHVwbGVzUmVxdWVzdBpBLm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMi5UcmFuc2FjdFJlbGF0aW9uVHVwbGVzUmVzcG9uc2USlwEKFERlbGV0ZVJlbGF0aW9uVHVwbGVzEj4ub3J5LmtldG8ucmVsYXRpb25fdHVwbGVzLnYxYWxwaGEyLkRlbGV0ZVJlbGF0aW9uVHVwbGVzUmVxdWVzdBo/Lm9yeS5rZXRvLnJlbGF0aW9uX3R1cGxlcy52MWFscGhhMi5EZWxldGVSZWxhdGlvblR1cGxlc1Jlc3BvbnNlQqoCCiVjb20ub3J5LmtldG8ucmVsYXRpb25fdHVwbGVzLnYxYWxwaGEyQhFXcml0ZVNlcnZpY2VQcm90b1ABWktnaXRodWIuY29tL29yeS9rZXRvL2dlbi9nby9vcnkva2V0by9yZWxhdGlvbl90dXBsZXMvdjFhbHBoYTI7cmVsYXRpb250dXBsZXOiAgNPS1KqAiBPcnkuS2V0by5SZWxhdGlvblR1cGxlcy5WMWFscGhhMsoCIE9yeVxLZXRvXFJlbGF0aW9uVHVwbGVzXFYxYWxwaGEy4gIsT3J5XEtldG9cUmVsYXRpb25UdXBsZXNcVjFhbHBoYTJcR1BCTWV0YWRhdGHqAiNPcnk6OktldG86OlJlbGF0aW9uVHVwbGVzOjpWMWFscGhhMmIGcHJvdG8z",
|
||||
[file_ory_keto_relation_tuples_v1alpha2_relation_tuples],
|
||||
)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.
|
||||
* Use `create(TransactRelationTuplesRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const TransactRelationTuplesRequestSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_write_service, 0)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.
|
||||
* Use `create(RelationTupleDeltaSchema)` to create a new message.
|
||||
*/
|
||||
export const RelationTupleDeltaSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_write_service, 1)
|
||||
|
||||
/**
|
||||
* Describes the enum ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action.
|
||||
*/
|
||||
export const RelationTupleDelta_ActionSchema =
|
||||
/*@__PURE__*/
|
||||
enumDesc(file_ory_keto_relation_tuples_v1alpha2_write_service, 1, 0)
|
||||
|
||||
/**
|
||||
* @generated from enum ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action
|
||||
*/
|
||||
export const RelationTupleDelta_Action =
|
||||
/*@__PURE__*/
|
||||
tsEnum(RelationTupleDelta_ActionSchema)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.
|
||||
* Use `create(TransactRelationTuplesResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const TransactRelationTuplesResponseSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_write_service, 2)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.
|
||||
* Use `create(DeleteRelationTuplesRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const DeleteRelationTuplesRequestSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_write_service, 3)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.
|
||||
* Use `create(DeleteRelationTuplesRequest_QuerySchema)` to create a new message.
|
||||
*/
|
||||
export const DeleteRelationTuplesRequest_QuerySchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_write_service, 3, 0)
|
||||
|
||||
/**
|
||||
* Describes the message ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.
|
||||
* Use `create(DeleteRelationTuplesResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const DeleteRelationTuplesResponseSchema =
|
||||
/*@__PURE__*/
|
||||
messageDesc(file_ory_keto_relation_tuples_v1alpha2_write_service, 4)
|
||||
|
||||
/**
|
||||
* The write service to create and delete Access Control Lists.
|
||||
*
|
||||
* This service is part of the [write-APIs](../concepts/25_api-overview.mdx#write-apis).
|
||||
*
|
||||
* @generated from service ory.keto.relation_tuples.v1alpha2.WriteService
|
||||
*/
|
||||
export const WriteService =
|
||||
/*@__PURE__*/
|
||||
serviceDesc(file_ory_keto_relation_tuples_v1alpha2_write_service, 0)
|
||||
28
gen/es/package-lock.json
generated
Normal file
28
gen/es/package-lock.json
generated
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "@ory/keto-grpc-client",
|
||||
"version": "0.6.0-alpha.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@ory/keto-grpc-client",
|
||||
"version": "0.6.0-alpha.1",
|
||||
"dependencies": {
|
||||
"@bufbuild/protobuf": "^2.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@bufbuild/protobuf": {
|
||||
"version": "2.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.11.0.tgz",
|
||||
"integrity": "sha512-sBXGT13cpmPR5BMgHE6UEEfEaShh5Ror6rfN3yEK5si7QVrtZg8LEPQb0VVhiLRUslD2yLnXtnRzG035J/mZXQ==",
|
||||
"license": "(Apache-2.0 AND BSD-3-Clause)"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@bufbuild/protobuf": {
|
||||
"version": "2.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.11.0.tgz",
|
||||
"integrity": "sha512-sBXGT13cpmPR5BMgHE6UEEfEaShh5Ror6rfN3yEK5si7QVrtZg8LEPQb0VVhiLRUslD2yLnXtnRzG035J/mZXQ=="
|
||||
}
|
||||
}
|
||||
}
|
||||
10
gen/es/package.json
Normal file
10
gen/es/package.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "@ory/keto-grpc-client",
|
||||
"version": "0.6.0-alpha.1",
|
||||
"description": "gRPC client for Ory Keto",
|
||||
"homepage": "https://www.ory.com/keto",
|
||||
"bugs": "https://github.com/ory/keto/issues",
|
||||
"dependencies": {
|
||||
"@bufbuild/protobuf": "^2.11.0"
|
||||
}
|
||||
}
|
||||
201
gen/go/LICENSE
Normal file
201
gen/go/LICENSE
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
23
gen/go/go.mod
Normal file
23
gen/go/go.mod
Normal file
@@ -0,0 +1,23 @@
|
||||
module github.com/ory/keto/gen/go
|
||||
|
||||
go 1.25.5
|
||||
|
||||
require (
|
||||
connectrpc.com/connect v1.20.0
|
||||
github.com/stretchr/testify v1.11.1
|
||||
google.golang.org/grpc v1.82.1
|
||||
google.golang.org/protobuf v1.36.11
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/kr/pretty v0.3.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.14.1 // indirect
|
||||
golang.org/x/net v0.55.0 // indirect
|
||||
golang.org/x/sys v0.45.0 // indirect
|
||||
golang.org/x/text v0.39.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
63
gen/go/go.sum
Normal file
63
gen/go/go.sum
Normal file
@@ -0,0 +1,63 @@
|
||||
connectrpc.com/connect v1.20.0 h1:6TNDAB+WeNd2uolWNlYczB5E0KNNaVMNUEx8JEUsPmQ=
|
||||
connectrpc.com/connect v1.20.0/go.mod h1:A2ygJrukXwWy32vkCAAHNVguZrqZ+jeZ9rGRnGR4dN4=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
||||
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
|
||||
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
|
||||
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
|
||||
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
|
||||
go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I=
|
||||
go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0=
|
||||
go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM=
|
||||
go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY=
|
||||
go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg=
|
||||
go.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfCGLEo89fDkw=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A=
|
||||
go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A=
|
||||
go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0=
|
||||
golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8=
|
||||
golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww=
|
||||
golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY=
|
||||
golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/text v0.39.0 h1:UbZz4pLOvn600D6Oh6GGEI6VAmndrEBLv8/6BEXzyus=
|
||||
golang.org/x/text v0.39.0/go.mod h1:3UwRclnC2g0TU9x8PZiyfOajCd1zaUNHF9cvqcQZ+ZM=
|
||||
gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=
|
||||
gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478 h1:RmoJA1ujG+/lRGNfUnOMfhCy5EipVMyvUE+KNbPbTlw=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
|
||||
google.golang.org/grpc v1.82.1 h1:NnAxzGRA0677vCa4BUkOAnO5+FfQqVl9iUXeD0IqcGE=
|
||||
google.golang.org/grpc v1.82.1/go.mod h1:yzTZ1TB1Z3SG+LIYaI+WiE8D5+PZ3ArnrSp8zF3+/ZA=
|
||||
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
|
||||
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
@@ -0,0 +1,113 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: ory/keto/opl/v1alpha1/syntax_service.proto
|
||||
|
||||
package oplconnect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1alpha1 "github.com/ory/keto/gen/go/ory/keto/opl/v1alpha1"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
||||
// compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of connect or updating the connect
|
||||
// version compiled into your binary.
|
||||
const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// SyntaxServiceName is the fully-qualified name of the SyntaxService service.
|
||||
SyntaxServiceName = "ory.keto.opl.v1alpha1.SyntaxService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// SyntaxServiceCheckProcedure is the fully-qualified name of the SyntaxService's Check RPC.
|
||||
SyntaxServiceCheckProcedure = "/ory.keto.opl.v1alpha1.SyntaxService/Check"
|
||||
)
|
||||
|
||||
// SyntaxServiceClient is a client for the ory.keto.opl.v1alpha1.SyntaxService service.
|
||||
type SyntaxServiceClient interface {
|
||||
// Performs a syntax check request.
|
||||
Check(context.Context, *connect.Request[v1alpha1.CheckRequest]) (*connect.Response[v1alpha1.CheckResponse], error)
|
||||
}
|
||||
|
||||
// NewSyntaxServiceClient constructs a client for the ory.keto.opl.v1alpha1.SyntaxService service.
|
||||
// By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped
|
||||
// responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
|
||||
// connect.WithGRPC() or connect.WithGRPCWeb() options.
|
||||
//
|
||||
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewSyntaxServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SyntaxServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
syntaxServiceMethods := v1alpha1.File_ory_keto_opl_v1alpha1_syntax_service_proto.Services().ByName("SyntaxService").Methods()
|
||||
return &syntaxServiceClient{
|
||||
check: connect.NewClient[v1alpha1.CheckRequest, v1alpha1.CheckResponse](
|
||||
httpClient,
|
||||
baseURL+SyntaxServiceCheckProcedure,
|
||||
connect.WithSchema(syntaxServiceMethods.ByName("Check")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// syntaxServiceClient implements SyntaxServiceClient.
|
||||
type syntaxServiceClient struct {
|
||||
check *connect.Client[v1alpha1.CheckRequest, v1alpha1.CheckResponse]
|
||||
}
|
||||
|
||||
// Check calls ory.keto.opl.v1alpha1.SyntaxService.Check.
|
||||
func (c *syntaxServiceClient) Check(ctx context.Context, req *connect.Request[v1alpha1.CheckRequest]) (*connect.Response[v1alpha1.CheckResponse], error) {
|
||||
return c.check.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// SyntaxServiceHandler is an implementation of the ory.keto.opl.v1alpha1.SyntaxService service.
|
||||
type SyntaxServiceHandler interface {
|
||||
// Performs a syntax check request.
|
||||
Check(context.Context, *connect.Request[v1alpha1.CheckRequest]) (*connect.Response[v1alpha1.CheckResponse], error)
|
||||
}
|
||||
|
||||
// NewSyntaxServiceHandler builds an HTTP handler from the service implementation. It returns the
|
||||
// path on which to mount the handler and the handler itself.
|
||||
//
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewSyntaxServiceHandler(svc SyntaxServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
syntaxServiceMethods := v1alpha1.File_ory_keto_opl_v1alpha1_syntax_service_proto.Services().ByName("SyntaxService").Methods()
|
||||
syntaxServiceCheckHandler := connect.NewUnaryHandler(
|
||||
SyntaxServiceCheckProcedure,
|
||||
svc.Check,
|
||||
connect.WithSchema(syntaxServiceMethods.ByName("Check")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/ory.keto.opl.v1alpha1.SyntaxService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case SyntaxServiceCheckProcedure:
|
||||
syntaxServiceCheckHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// UnimplementedSyntaxServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedSyntaxServiceHandler struct{}
|
||||
|
||||
func (UnimplementedSyntaxServiceHandler) Check(context.Context, *connect.Request[v1alpha1.CheckRequest]) (*connect.Response[v1alpha1.CheckResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ory.keto.opl.v1alpha1.SyntaxService.Check is not implemented"))
|
||||
}
|
||||
302
gen/go/ory/keto/opl/v1alpha1/syntax_service.pb.go
Normal file
302
gen/go/ory/keto/opl/v1alpha1/syntax_service.pb.go
Normal file
@@ -0,0 +1,302 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: ory/keto/opl/v1alpha1/syntax_service.proto
|
||||
|
||||
package opl
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type CheckRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CheckRequest) Reset() {
|
||||
*x = CheckRequest{}
|
||||
mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CheckRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CheckRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CheckRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CheckRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *CheckRequest) GetContent() []byte {
|
||||
if x != nil {
|
||||
return x.Content
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CheckResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
ParseErrors []*ParseError `protobuf:"bytes,1,rep,name=parse_errors,json=parseErrors,proto3" json:"parse_errors,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CheckResponse) Reset() {
|
||||
*x = CheckResponse{}
|
||||
mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CheckResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CheckResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CheckResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CheckResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *CheckResponse) GetParseErrors() []*ParseError {
|
||||
if x != nil {
|
||||
return x.ParseErrors
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ParseError struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
|
||||
Start *SourcePosition `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"`
|
||||
End *SourcePosition `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ParseError) Reset() {
|
||||
*x = ParseError{}
|
||||
mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ParseError) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ParseError) ProtoMessage() {}
|
||||
|
||||
func (x *ParseError) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ParseError.ProtoReflect.Descriptor instead.
|
||||
func (*ParseError) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *ParseError) GetMessage() string {
|
||||
if x != nil {
|
||||
return x.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ParseError) GetStart() *SourcePosition {
|
||||
if x != nil {
|
||||
return x.Start
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ParseError) GetEnd() *SourcePosition {
|
||||
if x != nil {
|
||||
return x.End
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SourcePosition struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Line uint32 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"`
|
||||
Column uint32 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SourcePosition) Reset() {
|
||||
*x = SourcePosition{}
|
||||
mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SourcePosition) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SourcePosition) ProtoMessage() {}
|
||||
|
||||
func (x *SourcePosition) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SourcePosition.ProtoReflect.Descriptor instead.
|
||||
func (*SourcePosition) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *SourcePosition) GetLine() uint32 {
|
||||
if x != nil {
|
||||
return x.Line
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SourcePosition) GetColumn() uint32 {
|
||||
if x != nil {
|
||||
return x.Column
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_ory_keto_opl_v1alpha1_syntax_service_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"*ory/keto/opl/v1alpha1/syntax_service.proto\x12\x15ory.keto.opl.v1alpha1\"(\n" +
|
||||
"\fCheckRequest\x12\x18\n" +
|
||||
"\acontent\x18\x01 \x01(\fR\acontent\"U\n" +
|
||||
"\rCheckResponse\x12D\n" +
|
||||
"\fparse_errors\x18\x01 \x03(\v2!.ory.keto.opl.v1alpha1.ParseErrorR\vparseErrors\"\x9c\x01\n" +
|
||||
"\n" +
|
||||
"ParseError\x12\x18\n" +
|
||||
"\amessage\x18\x01 \x01(\tR\amessage\x12;\n" +
|
||||
"\x05start\x18\x02 \x01(\v2%.ory.keto.opl.v1alpha1.SourcePositionR\x05start\x127\n" +
|
||||
"\x03end\x18\x03 \x01(\v2%.ory.keto.opl.v1alpha1.SourcePositionR\x03end\"<\n" +
|
||||
"\x0eSourcePosition\x12\x12\n" +
|
||||
"\x04line\x18\x01 \x01(\rR\x04line\x12\x16\n" +
|
||||
"\x06column\x18\x02 \x01(\rR\x06column2c\n" +
|
||||
"\rSyntaxService\x12R\n" +
|
||||
"\x05Check\x12#.ory.keto.opl.v1alpha1.CheckRequest\x1a$.ory.keto.opl.v1alpha1.CheckResponseB\xdc\x01\n" +
|
||||
"\x19com.ory.keto.opl.v1alpha1B\x12SyntaxServiceProtoP\x01Z4github.com/ory/keto/gen/go/ory/keto/opl/v1alpha1;opl\xa2\x02\x03OKO\xaa\x02\x15Ory.Keto.Opl.V1alpha1\xca\x02\x15Ory\\Keto\\Opl\\V1alpha1\xe2\x02!Ory\\Keto\\Opl\\V1alpha1\\GPBMetadata\xea\x02\x18Ory::Keto::Opl::V1alpha1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDescOnce sync.Once
|
||||
file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDescGZIP() []byte {
|
||||
file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDescOnce.Do(func() {
|
||||
file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDesc), len(file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDesc)))
|
||||
})
|
||||
return file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_ory_keto_opl_v1alpha1_syntax_service_proto_goTypes = []any{
|
||||
(*CheckRequest)(nil), // 0: ory.keto.opl.v1alpha1.CheckRequest
|
||||
(*CheckResponse)(nil), // 1: ory.keto.opl.v1alpha1.CheckResponse
|
||||
(*ParseError)(nil), // 2: ory.keto.opl.v1alpha1.ParseError
|
||||
(*SourcePosition)(nil), // 3: ory.keto.opl.v1alpha1.SourcePosition
|
||||
}
|
||||
var file_ory_keto_opl_v1alpha1_syntax_service_proto_depIdxs = []int32{
|
||||
2, // 0: ory.keto.opl.v1alpha1.CheckResponse.parse_errors:type_name -> ory.keto.opl.v1alpha1.ParseError
|
||||
3, // 1: ory.keto.opl.v1alpha1.ParseError.start:type_name -> ory.keto.opl.v1alpha1.SourcePosition
|
||||
3, // 2: ory.keto.opl.v1alpha1.ParseError.end:type_name -> ory.keto.opl.v1alpha1.SourcePosition
|
||||
0, // 3: ory.keto.opl.v1alpha1.SyntaxService.Check:input_type -> ory.keto.opl.v1alpha1.CheckRequest
|
||||
1, // 4: ory.keto.opl.v1alpha1.SyntaxService.Check:output_type -> ory.keto.opl.v1alpha1.CheckResponse
|
||||
4, // [4:5] is the sub-list for method output_type
|
||||
3, // [3:4] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_ory_keto_opl_v1alpha1_syntax_service_proto_init() }
|
||||
func file_ory_keto_opl_v1alpha1_syntax_service_proto_init() {
|
||||
if File_ory_keto_opl_v1alpha1_syntax_service_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDesc), len(file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_ory_keto_opl_v1alpha1_syntax_service_proto_goTypes,
|
||||
DependencyIndexes: file_ory_keto_opl_v1alpha1_syntax_service_proto_depIdxs,
|
||||
MessageInfos: file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_ory_keto_opl_v1alpha1_syntax_service_proto = out.File
|
||||
file_ory_keto_opl_v1alpha1_syntax_service_proto_goTypes = nil
|
||||
file_ory_keto_opl_v1alpha1_syntax_service_proto_depIdxs = nil
|
||||
}
|
||||
130
gen/go/ory/keto/opl/v1alpha1/syntax_service_grpc.pb.go
Normal file
130
gen/go/ory/keto/opl/v1alpha1/syntax_service_grpc.pb.go
Normal file
@@ -0,0 +1,130 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: ory/keto/opl/v1alpha1/syntax_service.proto
|
||||
|
||||
package opl
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// 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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
SyntaxService_Check_FullMethodName = "/ory.keto.opl.v1alpha1.SyntaxService/Check"
|
||||
)
|
||||
|
||||
// SyntaxServiceClient is the client API for SyntaxService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
//
|
||||
// The service that checks the syntax of an OPL file.
|
||||
type SyntaxServiceClient interface {
|
||||
// Performs a syntax check request.
|
||||
Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
|
||||
}
|
||||
|
||||
type syntaxServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSyntaxServiceClient(cc grpc.ClientConnInterface) SyntaxServiceClient {
|
||||
return &syntaxServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *syntaxServiceClient) 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, SyntaxService_Check_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SyntaxServiceServer is the server API for SyntaxService service.
|
||||
// All implementations must embed UnimplementedSyntaxServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// The service that checks the syntax of an OPL file.
|
||||
type SyntaxServiceServer interface {
|
||||
// Performs a syntax check request.
|
||||
Check(context.Context, *CheckRequest) (*CheckResponse, error)
|
||||
mustEmbedUnimplementedSyntaxServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedSyntaxServiceServer 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 UnimplementedSyntaxServiceServer struct{}
|
||||
|
||||
func (UnimplementedSyntaxServiceServer) Check(context.Context, *CheckRequest) (*CheckResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Check not implemented")
|
||||
}
|
||||
func (UnimplementedSyntaxServiceServer) mustEmbedUnimplementedSyntaxServiceServer() {}
|
||||
func (UnimplementedSyntaxServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeSyntaxServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SyntaxServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeSyntaxServiceServer interface {
|
||||
mustEmbedUnimplementedSyntaxServiceServer()
|
||||
}
|
||||
|
||||
func RegisterSyntaxServiceServer(s grpc.ServiceRegistrar, srv SyntaxServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedSyntaxServiceServer 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(&SyntaxService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _SyntaxService_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CheckRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SyntaxServiceServer).Check(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: SyntaxService_Check_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SyntaxServiceServer).Check(ctx, req.(*CheckRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// SyntaxService_ServiceDesc is the grpc.ServiceDesc for SyntaxService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var SyntaxService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "ory.keto.opl.v1alpha1.SyntaxService",
|
||||
HandlerType: (*SyntaxServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Check",
|
||||
Handler: _SyntaxService_Check_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "ory/keto/opl/v1alpha1/syntax_service.proto",
|
||||
}
|
||||
594
gen/go/ory/keto/relation_tuples/v1alpha2/check_service.pb.go
Normal file
594
gen/go/ory/keto/relation_tuples/v1alpha2/check_service.pb.go
Normal file
@@ -0,0 +1,594 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: ory/keto/relation_tuples/v1alpha2/check_service.proto
|
||||
|
||||
package relationtuples
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// The request for a CheckService.Check RPC.
|
||||
// Checks whether a specific subject is related to an object.
|
||||
type CheckRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The namespace to evaluate the check.
|
||||
//
|
||||
// Note: If you use the expand-API and the check
|
||||
// evaluates a RelationTuple specifying a SubjectSet as
|
||||
// subject or due to a rewrite rule in a namespace config
|
||||
// this check request may involve other namespaces automatically.
|
||||
//
|
||||
// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto.
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
// The related object in this check.
|
||||
//
|
||||
// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto.
|
||||
Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
|
||||
// The relation between the Object and the Subject.
|
||||
//
|
||||
// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto.
|
||||
Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"`
|
||||
// The related subject in this check.
|
||||
//
|
||||
// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto.
|
||||
Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
|
||||
Tuple *RelationTuple `protobuf:"bytes,8,opt,name=tuple,proto3" json:"tuple,omitempty"`
|
||||
// This field is not implemented yet and has no effect.
|
||||
// <!--
|
||||
// Set this field to `true` in case your application
|
||||
// needs to authorize depending on up to date ACLs,
|
||||
// also called a "content-change check".
|
||||
//
|
||||
// If set to `true` the `snaptoken` field is ignored,
|
||||
// the check is evaluated at the latest snapshot
|
||||
// (globally consistent) and the response includes a
|
||||
// snaptoken for clients to store along with object
|
||||
// contents that can be used for subsequent checks
|
||||
// of the same content version.
|
||||
//
|
||||
// Example use case:
|
||||
// - You need to authorize a user to modify/delete some resource
|
||||
// and it is unacceptable that if the permission to do that had
|
||||
// just been revoked some seconds ago so that the change had not
|
||||
// yet been fully replicated to all availability zones.
|
||||
//
|
||||
// -->
|
||||
Latest bool `protobuf:"varint,5,opt,name=latest,proto3" json:"latest,omitempty"`
|
||||
// This field is not implemented yet and has no effect.
|
||||
// <!--
|
||||
// Optional. Like reads, a check is always evaluated at a
|
||||
// consistent snapshot no earlier than the given snaptoken.
|
||||
//
|
||||
// Leave this field blank if you want to evaluate the check
|
||||
// based on eventually consistent ACLs, benefiting from very
|
||||
// low latency, but possibly slightly stale results.
|
||||
//
|
||||
// If the specified token is too old and no longer known,
|
||||
// the server falls back as if no snaptoken had been specified.
|
||||
//
|
||||
// If not specified the server tries to evaluate the check
|
||||
// on the best snapshot version where it is very likely that
|
||||
// ACLs had already been replicated to all availability zones.
|
||||
// -->
|
||||
Snaptoken string `protobuf:"bytes,6,opt,name=snaptoken,proto3" json:"snaptoken,omitempty"`
|
||||
// The maximum depth to search for a relation.
|
||||
//
|
||||
// If the value is less than 1 or greater than the global
|
||||
// max-depth then the global max-depth will be used instead.
|
||||
MaxDepth int32 `protobuf:"varint,7,opt,name=max_depth,json=maxDepth,proto3" json:"max_depth,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CheckRequest) Reset() {
|
||||
*x = CheckRequest{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CheckRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CheckRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CheckRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CheckRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto.
|
||||
func (x *CheckRequest) GetNamespace() string {
|
||||
if x != nil {
|
||||
return x.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto.
|
||||
func (x *CheckRequest) GetObject() string {
|
||||
if x != nil {
|
||||
return x.Object
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto.
|
||||
func (x *CheckRequest) GetRelation() string {
|
||||
if x != nil {
|
||||
return x.Relation
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto.
|
||||
func (x *CheckRequest) GetSubject() *Subject {
|
||||
if x != nil {
|
||||
return x.Subject
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CheckRequest) GetTuple() *RelationTuple {
|
||||
if x != nil {
|
||||
return x.Tuple
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CheckRequest) GetLatest() bool {
|
||||
if x != nil {
|
||||
return x.Latest
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *CheckRequest) GetSnaptoken() string {
|
||||
if x != nil {
|
||||
return x.Snaptoken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CheckRequest) GetMaxDepth() int32 {
|
||||
if x != nil {
|
||||
return x.MaxDepth
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// The response for a CheckService.Check rpc.
|
||||
type CheckResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// Whether the specified subject (id)
|
||||
// is related to the requested object.
|
||||
//
|
||||
// It is false by default if no ACL matches.
|
||||
Allowed bool `protobuf:"varint,1,opt,name=allowed,proto3" json:"allowed,omitempty"`
|
||||
// This field is not implemented yet and has no effect.
|
||||
// <!--
|
||||
// The last known snapshot token ONLY specified if
|
||||
// the request had not specified a snaptoken,
|
||||
// since this performed a "content-change request"
|
||||
// and consistently fetched the last known snapshot token.
|
||||
//
|
||||
// This field is not set if the request had specified a snaptoken!
|
||||
//
|
||||
// If set, clients should cache and use this token
|
||||
// for subsequent requests to have minimal latency,
|
||||
// but allow slightly stale responses (only some milliseconds or seconds).
|
||||
// -->
|
||||
Snaptoken string `protobuf:"bytes,2,opt,name=snaptoken,proto3" json:"snaptoken,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CheckResponse) Reset() {
|
||||
*x = CheckResponse{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CheckResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CheckResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CheckResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CheckResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *CheckResponse) GetAllowed() bool {
|
||||
if x != nil {
|
||||
return x.Allowed
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *CheckResponse) GetSnaptoken() string {
|
||||
if x != nil {
|
||||
return x.Snaptoken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// The response for an individual check in the CheckService.BatchCheck rpc.
|
||||
type CheckResponseWithError struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// Whether the specified subject (id)
|
||||
// is related to the requested object.
|
||||
//
|
||||
// It is false by default if no ACL matches.
|
||||
Allowed bool `protobuf:"varint,1,opt,name=allowed,proto3" json:"allowed,omitempty"`
|
||||
// If there was an error checking the tuple,
|
||||
// this will contain the error message.
|
||||
//
|
||||
// If the check was performed successfully, this will be empty.
|
||||
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
|
||||
// This field is not implemented yet and has no effect.
|
||||
// <!--
|
||||
// The last known snapshot token ONLY specified if
|
||||
// the request had not specified a snaptoken,
|
||||
// since this performed a "content-change request"
|
||||
// and consistently fetched the last known snapshot token.
|
||||
//
|
||||
// This field is not set if the request had specified a snaptoken!
|
||||
//
|
||||
// If set, clients should cache and use this token
|
||||
// for subsequent requests to have minimal latency,
|
||||
// but allow slightly stale responses (only some milliseconds or seconds).
|
||||
// -->
|
||||
Snaptoken string `protobuf:"bytes,3,opt,name=snaptoken,proto3" json:"snaptoken,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CheckResponseWithError) Reset() {
|
||||
*x = CheckResponseWithError{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CheckResponseWithError) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CheckResponseWithError) ProtoMessage() {}
|
||||
|
||||
func (x *CheckResponseWithError) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CheckResponseWithError.ProtoReflect.Descriptor instead.
|
||||
func (*CheckResponseWithError) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *CheckResponseWithError) GetAllowed() bool {
|
||||
if x != nil {
|
||||
return x.Allowed
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *CheckResponseWithError) GetError() string {
|
||||
if x != nil {
|
||||
return x.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CheckResponseWithError) GetSnaptoken() string {
|
||||
if x != nil {
|
||||
return x.Snaptoken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// The request for a CheckService.BatchCheck RPC.
|
||||
// Checks a batch of relations.
|
||||
type BatchCheckRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Tuples []*RelationTuple `protobuf:"bytes,1,rep,name=tuples,proto3" json:"tuples,omitempty"`
|
||||
// This field is not implemented yet and has no effect.
|
||||
// <!--
|
||||
// Set this field to `true` in case your application
|
||||
// needs to authorize depending on up to date ACLs,
|
||||
// also called a "content-change check".
|
||||
//
|
||||
// If set to `true` the `snaptoken` field is ignored,
|
||||
// the check is evaluated at the latest snapshot
|
||||
// (globally consistent) and the response includes a
|
||||
// snaptoken for clients to store along with object
|
||||
// contents that can be used for subsequent checks
|
||||
// of the same content version.
|
||||
//
|
||||
// Example use case:
|
||||
// - You need to authorize a user to modify/delete some resource
|
||||
// and it is unacceptable that if the permission to do that had
|
||||
// just been revoked some seconds ago so that the change had not
|
||||
// yet been fully replicated to all availability zones.
|
||||
//
|
||||
// -->
|
||||
Latest bool `protobuf:"varint,2,opt,name=latest,proto3" json:"latest,omitempty"`
|
||||
// This field is not implemented yet and has no effect.
|
||||
// <!--
|
||||
// Optional. Like reads, a check is always evaluated at a
|
||||
// consistent snapshot no earlier than the given snaptoken.
|
||||
//
|
||||
// Leave this field blank if you want to evaluate the check
|
||||
// based on eventually consistent ACLs, benefiting from very
|
||||
// low latency, but possibly slightly stale results.
|
||||
//
|
||||
// If the specified token is too old and no longer known,
|
||||
// the server falls back as if no snaptoken had been specified.
|
||||
//
|
||||
// If not specified the server tries to evaluate the check
|
||||
// on the best snapshot version where it is very likely that
|
||||
// ACLs had already been replicated to all availability zones.
|
||||
// -->
|
||||
Snaptoken string `protobuf:"bytes,3,opt,name=snaptoken,proto3" json:"snaptoken,omitempty"`
|
||||
// The maximum depth to search for a relation.
|
||||
//
|
||||
// If the value is less than 1 or greater than the global
|
||||
// max-depth then the global max-depth will be used instead.
|
||||
MaxDepth int32 `protobuf:"varint,4,opt,name=max_depth,json=maxDepth,proto3" json:"max_depth,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *BatchCheckRequest) Reset() {
|
||||
*x = BatchCheckRequest{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *BatchCheckRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*BatchCheckRequest) ProtoMessage() {}
|
||||
|
||||
func (x *BatchCheckRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use BatchCheckRequest.ProtoReflect.Descriptor instead.
|
||||
func (*BatchCheckRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *BatchCheckRequest) GetTuples() []*RelationTuple {
|
||||
if x != nil {
|
||||
return x.Tuples
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *BatchCheckRequest) GetLatest() bool {
|
||||
if x != nil {
|
||||
return x.Latest
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *BatchCheckRequest) GetSnaptoken() string {
|
||||
if x != nil {
|
||||
return x.Snaptoken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *BatchCheckRequest) GetMaxDepth() int32 {
|
||||
if x != nil {
|
||||
return x.MaxDepth
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// The response for a CheckService.BatchCheck rpc.
|
||||
type BatchCheckResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The results of the batch check. The order of these
|
||||
// results will match the order of the input.
|
||||
Results []*CheckResponseWithError `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *BatchCheckResponse) Reset() {
|
||||
*x = BatchCheckResponse{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *BatchCheckResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*BatchCheckResponse) ProtoMessage() {}
|
||||
|
||||
func (x *BatchCheckResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use BatchCheckResponse.ProtoReflect.Descriptor instead.
|
||||
func (*BatchCheckResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *BatchCheckResponse) GetResults() []*CheckResponseWithError {
|
||||
if x != nil {
|
||||
return x.Results
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_ory_keto_relation_tuples_v1alpha2_check_service_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"5ory/keto/relation_tuples/v1alpha2/check_service.proto\x12!ory.keto.relation_tuples.v1alpha2\x1a7ory/keto/relation_tuples/v1alpha2/relation_tuples.proto\"\xd1\x02\n" +
|
||||
"\fCheckRequest\x12 \n" +
|
||||
"\tnamespace\x18\x01 \x01(\tB\x02\x18\x01R\tnamespace\x12\x1a\n" +
|
||||
"\x06object\x18\x02 \x01(\tB\x02\x18\x01R\x06object\x12\x1e\n" +
|
||||
"\brelation\x18\x03 \x01(\tB\x02\x18\x01R\brelation\x12H\n" +
|
||||
"\asubject\x18\x04 \x01(\v2*.ory.keto.relation_tuples.v1alpha2.SubjectB\x02\x18\x01R\asubject\x12F\n" +
|
||||
"\x05tuple\x18\b \x01(\v20.ory.keto.relation_tuples.v1alpha2.RelationTupleR\x05tuple\x12\x16\n" +
|
||||
"\x06latest\x18\x05 \x01(\bR\x06latest\x12\x1c\n" +
|
||||
"\tsnaptoken\x18\x06 \x01(\tR\tsnaptoken\x12\x1b\n" +
|
||||
"\tmax_depth\x18\a \x01(\x05R\bmaxDepth\"G\n" +
|
||||
"\rCheckResponse\x12\x18\n" +
|
||||
"\aallowed\x18\x01 \x01(\bR\aallowed\x12\x1c\n" +
|
||||
"\tsnaptoken\x18\x02 \x01(\tR\tsnaptoken\"f\n" +
|
||||
"\x16CheckResponseWithError\x12\x18\n" +
|
||||
"\aallowed\x18\x01 \x01(\bR\aallowed\x12\x14\n" +
|
||||
"\x05error\x18\x02 \x01(\tR\x05error\x12\x1c\n" +
|
||||
"\tsnaptoken\x18\x03 \x01(\tR\tsnaptoken\"\xb0\x01\n" +
|
||||
"\x11BatchCheckRequest\x12H\n" +
|
||||
"\x06tuples\x18\x01 \x03(\v20.ory.keto.relation_tuples.v1alpha2.RelationTupleR\x06tuples\x12\x16\n" +
|
||||
"\x06latest\x18\x02 \x01(\bR\x06latest\x12\x1c\n" +
|
||||
"\tsnaptoken\x18\x03 \x01(\tR\tsnaptoken\x12\x1b\n" +
|
||||
"\tmax_depth\x18\x04 \x01(\x05R\bmaxDepth\"i\n" +
|
||||
"\x12BatchCheckResponse\x12S\n" +
|
||||
"\aresults\x18\x01 \x03(\v29.ory.keto.relation_tuples.v1alpha2.CheckResponseWithErrorR\aresults2\xf5\x01\n" +
|
||||
"\fCheckService\x12j\n" +
|
||||
"\x05Check\x12/.ory.keto.relation_tuples.v1alpha2.CheckRequest\x1a0.ory.keto.relation_tuples.v1alpha2.CheckResponse\x12y\n" +
|
||||
"\n" +
|
||||
"BatchCheck\x124.ory.keto.relation_tuples.v1alpha2.BatchCheckRequest\x1a5.ory.keto.relation_tuples.v1alpha2.BatchCheckResponseB\xaa\x02\n" +
|
||||
"%com.ory.keto.relation_tuples.v1alpha2B\x11CheckServiceProtoP\x01ZKgithub.com/ory/keto/gen/go/ory/keto/relation_tuples/v1alpha2;relationtuples\xa2\x02\x03OKR\xaa\x02 Ory.Keto.RelationTuples.V1alpha2\xca\x02 Ory\\Keto\\RelationTuples\\V1alpha2\xe2\x02,Ory\\Keto\\RelationTuples\\V1alpha2\\GPBMetadata\xea\x02#Ory::Keto::RelationTuples::V1alpha2b\x06proto3"
|
||||
|
||||
var (
|
||||
file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescOnce sync.Once
|
||||
file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescGZIP() []byte {
|
||||
file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescOnce.Do(func() {
|
||||
file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDesc), len(file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDesc)))
|
||||
})
|
||||
return file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_ory_keto_relation_tuples_v1alpha2_check_service_proto_goTypes = []any{
|
||||
(*CheckRequest)(nil), // 0: ory.keto.relation_tuples.v1alpha2.CheckRequest
|
||||
(*CheckResponse)(nil), // 1: ory.keto.relation_tuples.v1alpha2.CheckResponse
|
||||
(*CheckResponseWithError)(nil), // 2: ory.keto.relation_tuples.v1alpha2.CheckResponseWithError
|
||||
(*BatchCheckRequest)(nil), // 3: ory.keto.relation_tuples.v1alpha2.BatchCheckRequest
|
||||
(*BatchCheckResponse)(nil), // 4: ory.keto.relation_tuples.v1alpha2.BatchCheckResponse
|
||||
(*Subject)(nil), // 5: ory.keto.relation_tuples.v1alpha2.Subject
|
||||
(*RelationTuple)(nil), // 6: ory.keto.relation_tuples.v1alpha2.RelationTuple
|
||||
}
|
||||
var file_ory_keto_relation_tuples_v1alpha2_check_service_proto_depIdxs = []int32{
|
||||
5, // 0: ory.keto.relation_tuples.v1alpha2.CheckRequest.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject
|
||||
6, // 1: ory.keto.relation_tuples.v1alpha2.CheckRequest.tuple:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTuple
|
||||
6, // 2: ory.keto.relation_tuples.v1alpha2.BatchCheckRequest.tuples:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTuple
|
||||
2, // 3: ory.keto.relation_tuples.v1alpha2.BatchCheckResponse.results:type_name -> ory.keto.relation_tuples.v1alpha2.CheckResponseWithError
|
||||
0, // 4: ory.keto.relation_tuples.v1alpha2.CheckService.Check:input_type -> ory.keto.relation_tuples.v1alpha2.CheckRequest
|
||||
3, // 5: ory.keto.relation_tuples.v1alpha2.CheckService.BatchCheck:input_type -> ory.keto.relation_tuples.v1alpha2.BatchCheckRequest
|
||||
1, // 6: ory.keto.relation_tuples.v1alpha2.CheckService.Check:output_type -> ory.keto.relation_tuples.v1alpha2.CheckResponse
|
||||
4, // 7: ory.keto.relation_tuples.v1alpha2.CheckService.BatchCheck:output_type -> ory.keto.relation_tuples.v1alpha2.BatchCheckResponse
|
||||
6, // [6:8] is the sub-list for method output_type
|
||||
4, // [4:6] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_ory_keto_relation_tuples_v1alpha2_check_service_proto_init() }
|
||||
func file_ory_keto_relation_tuples_v1alpha2_check_service_proto_init() {
|
||||
if File_ory_keto_relation_tuples_v1alpha2_check_service_proto != nil {
|
||||
return
|
||||
}
|
||||
file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDesc), len(file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 5,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_ory_keto_relation_tuples_v1alpha2_check_service_proto_goTypes,
|
||||
DependencyIndexes: file_ory_keto_relation_tuples_v1alpha2_check_service_proto_depIdxs,
|
||||
MessageInfos: file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_ory_keto_relation_tuples_v1alpha2_check_service_proto = out.File
|
||||
file_ory_keto_relation_tuples_v1alpha2_check_service_proto_goTypes = nil
|
||||
file_ory_keto_relation_tuples_v1alpha2_check_service_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: ory/keto/relation_tuples/v1alpha2/check_service.proto
|
||||
|
||||
package relationtuples
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// 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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
CheckService_Check_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.CheckService/Check"
|
||||
CheckService_BatchCheck_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.CheckService/BatchCheck"
|
||||
)
|
||||
|
||||
// CheckServiceClient is the client API for CheckService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
//
|
||||
// The service that performs authorization checks
|
||||
// based on the stored Access Control Lists.
|
||||
//
|
||||
// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
type CheckServiceClient interface {
|
||||
// Performs an authorization check.
|
||||
Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
|
||||
BatchCheck(ctx context.Context, in *BatchCheckRequest, opts ...grpc.CallOption) (*BatchCheckResponse, error)
|
||||
}
|
||||
|
||||
type checkServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewCheckServiceClient(cc grpc.ClientConnInterface) CheckServiceClient {
|
||||
return &checkServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *checkServiceClient) 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, CheckService_Check_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *checkServiceClient) BatchCheck(ctx context.Context, in *BatchCheckRequest, opts ...grpc.CallOption) (*BatchCheckResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(BatchCheckResponse)
|
||||
err := c.cc.Invoke(ctx, CheckService_BatchCheck_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// CheckServiceServer is the server API for CheckService service.
|
||||
// All implementations must embed UnimplementedCheckServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// The service that performs authorization checks
|
||||
// based on the stored Access Control Lists.
|
||||
//
|
||||
// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
type CheckServiceServer interface {
|
||||
// Performs an authorization check.
|
||||
Check(context.Context, *CheckRequest) (*CheckResponse, error)
|
||||
BatchCheck(context.Context, *BatchCheckRequest) (*BatchCheckResponse, error)
|
||||
mustEmbedUnimplementedCheckServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedCheckServiceServer 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 UnimplementedCheckServiceServer struct{}
|
||||
|
||||
func (UnimplementedCheckServiceServer) Check(context.Context, *CheckRequest) (*CheckResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Check not implemented")
|
||||
}
|
||||
func (UnimplementedCheckServiceServer) BatchCheck(context.Context, *BatchCheckRequest) (*BatchCheckResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method BatchCheck not implemented")
|
||||
}
|
||||
func (UnimplementedCheckServiceServer) mustEmbedUnimplementedCheckServiceServer() {}
|
||||
func (UnimplementedCheckServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeCheckServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to CheckServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeCheckServiceServer interface {
|
||||
mustEmbedUnimplementedCheckServiceServer()
|
||||
}
|
||||
|
||||
func RegisterCheckServiceServer(s grpc.ServiceRegistrar, srv CheckServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedCheckServiceServer 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(&CheckService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _CheckService_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CheckRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(CheckServiceServer).Check(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: CheckService_Check_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(CheckServiceServer).Check(ctx, req.(*CheckRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _CheckService_BatchCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BatchCheckRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(CheckServiceServer).BatchCheck(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: CheckService_BatchCheck_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(CheckServiceServer).BatchCheck(ctx, req.(*BatchCheckRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// CheckService_ServiceDesc is the grpc.ServiceDesc for CheckService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var CheckService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "ory.keto.relation_tuples.v1alpha2.CheckService",
|
||||
HandlerType: (*CheckServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Check",
|
||||
Handler: _CheckService_Check_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BatchCheck",
|
||||
Handler: _CheckService_BatchCheck_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "ory/keto/relation_tuples/v1alpha2/check_service.proto",
|
||||
}
|
||||
388
gen/go/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go
Normal file
388
gen/go/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go
Normal file
@@ -0,0 +1,388 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: ory/keto/relation_tuples/v1alpha2/expand_service.proto
|
||||
|
||||
package relationtuples
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type NodeType int32
|
||||
|
||||
const (
|
||||
NodeType_NODE_TYPE_UNSPECIFIED NodeType = 0
|
||||
// This node expands to a union of all children.
|
||||
NodeType_NODE_TYPE_UNION NodeType = 1
|
||||
// Not implemented yet.
|
||||
NodeType_NODE_TYPE_EXCLUSION NodeType = 2
|
||||
// Not implemented yet.
|
||||
NodeType_NODE_TYPE_INTERSECTION NodeType = 3
|
||||
// This node is a leaf and contains no children.
|
||||
// Its subject is a `SubjectID` unless `max_depth` was reached.
|
||||
NodeType_NODE_TYPE_LEAF NodeType = 4
|
||||
)
|
||||
|
||||
// Enum value maps for NodeType.
|
||||
var (
|
||||
NodeType_name = map[int32]string{
|
||||
0: "NODE_TYPE_UNSPECIFIED",
|
||||
1: "NODE_TYPE_UNION",
|
||||
2: "NODE_TYPE_EXCLUSION",
|
||||
3: "NODE_TYPE_INTERSECTION",
|
||||
4: "NODE_TYPE_LEAF",
|
||||
}
|
||||
NodeType_value = map[string]int32{
|
||||
"NODE_TYPE_UNSPECIFIED": 0,
|
||||
"NODE_TYPE_UNION": 1,
|
||||
"NODE_TYPE_EXCLUSION": 2,
|
||||
"NODE_TYPE_INTERSECTION": 3,
|
||||
"NODE_TYPE_LEAF": 4,
|
||||
}
|
||||
)
|
||||
|
||||
func (x NodeType) Enum() *NodeType {
|
||||
p := new(NodeType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x NodeType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (NodeType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (NodeType) Type() protoreflect.EnumType {
|
||||
return &file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x NodeType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use NodeType.Descriptor instead.
|
||||
func (NodeType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// The request for an ExpandService.Expand RPC.
|
||||
// Expands the given subject set.
|
||||
type ExpandRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The subject to expand.
|
||||
Subject *Subject `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
|
||||
// The maximum depth of tree to build.
|
||||
//
|
||||
// If the value is less than 1 or greater than the global
|
||||
// max-depth then the global max-depth will be used instead.
|
||||
//
|
||||
// It is important to set this parameter to a meaningful
|
||||
// value. Ponder how deep you really want to display this.
|
||||
MaxDepth int32 `protobuf:"varint,2,opt,name=max_depth,json=maxDepth,proto3" json:"max_depth,omitempty"`
|
||||
// This field is not implemented yet and has no effect.
|
||||
// <!--
|
||||
// Optional. Like reads, a expand is always evaluated at a
|
||||
// consistent snapshot no earlier than the given snaptoken.
|
||||
//
|
||||
// Leave this field blank if you want to expand
|
||||
// based on eventually consistent ACLs, benefiting from very
|
||||
// low latency, but possibly slightly stale results.
|
||||
//
|
||||
// If the specified token is too old and no longer known,
|
||||
// the server falls back as if no snaptoken had been specified.
|
||||
//
|
||||
// If not specified the server tries to build the tree
|
||||
// on the best snapshot version where it is very likely that
|
||||
// ACLs had already been replicated to all availability zones.
|
||||
// -->
|
||||
Snaptoken string `protobuf:"bytes,3,opt,name=snaptoken,proto3" json:"snaptoken,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ExpandRequest) Reset() {
|
||||
*x = ExpandRequest{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ExpandRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ExpandRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ExpandRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ExpandRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ExpandRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ExpandRequest) GetSubject() *Subject {
|
||||
if x != nil {
|
||||
return x.Subject
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ExpandRequest) GetMaxDepth() int32 {
|
||||
if x != nil {
|
||||
return x.MaxDepth
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ExpandRequest) GetSnaptoken() string {
|
||||
if x != nil {
|
||||
return x.Snaptoken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// The response for a ExpandService.Expand RPC.
|
||||
type ExpandResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The tree the requested subject set expands to.
|
||||
// The requested subject set is the subject of the root.
|
||||
//
|
||||
// This field can be nil in some circumstances.
|
||||
Tree *SubjectTree `protobuf:"bytes,1,opt,name=tree,proto3" json:"tree,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ExpandResponse) Reset() {
|
||||
*x = ExpandResponse{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ExpandResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ExpandResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ExpandResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ExpandResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ExpandResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ExpandResponse) GetTree() *SubjectTree {
|
||||
if x != nil {
|
||||
return x.Tree
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SubjectTree struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The type of the node.
|
||||
NodeType NodeType `protobuf:"varint,1,opt,name=node_type,json=nodeType,proto3,enum=ory.keto.relation_tuples.v1alpha2.NodeType" json:"node_type,omitempty"`
|
||||
// The subject this node represents.
|
||||
// Deprecated: More information is now available in the tuple field.
|
||||
//
|
||||
// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/expand_service.proto.
|
||||
Subject *Subject `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
|
||||
// The relation tuple this node represents.
|
||||
Tuple *RelationTuple `protobuf:"bytes,4,opt,name=tuple,proto3" json:"tuple,omitempty"`
|
||||
// The children of this node.
|
||||
//
|
||||
// This is never set if `node_type` == `NODE_TYPE_LEAF`.
|
||||
Children []*SubjectTree `protobuf:"bytes,3,rep,name=children,proto3" json:"children,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SubjectTree) Reset() {
|
||||
*x = SubjectTree{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SubjectTree) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SubjectTree) ProtoMessage() {}
|
||||
|
||||
func (x *SubjectTree) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SubjectTree.ProtoReflect.Descriptor instead.
|
||||
func (*SubjectTree) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *SubjectTree) GetNodeType() NodeType {
|
||||
if x != nil {
|
||||
return x.NodeType
|
||||
}
|
||||
return NodeType_NODE_TYPE_UNSPECIFIED
|
||||
}
|
||||
|
||||
// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/expand_service.proto.
|
||||
func (x *SubjectTree) GetSubject() *Subject {
|
||||
if x != nil {
|
||||
return x.Subject
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SubjectTree) GetTuple() *RelationTuple {
|
||||
if x != nil {
|
||||
return x.Tuple
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SubjectTree) GetChildren() []*SubjectTree {
|
||||
if x != nil {
|
||||
return x.Children
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_ory_keto_relation_tuples_v1alpha2_expand_service_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"6ory/keto/relation_tuples/v1alpha2/expand_service.proto\x12!ory.keto.relation_tuples.v1alpha2\x1a7ory/keto/relation_tuples/v1alpha2/relation_tuples.proto\"\x90\x01\n" +
|
||||
"\rExpandRequest\x12D\n" +
|
||||
"\asubject\x18\x01 \x01(\v2*.ory.keto.relation_tuples.v1alpha2.SubjectR\asubject\x12\x1b\n" +
|
||||
"\tmax_depth\x18\x02 \x01(\x05R\bmaxDepth\x12\x1c\n" +
|
||||
"\tsnaptoken\x18\x03 \x01(\tR\tsnaptoken\"T\n" +
|
||||
"\x0eExpandResponse\x12B\n" +
|
||||
"\x04tree\x18\x01 \x01(\v2..ory.keto.relation_tuples.v1alpha2.SubjectTreeR\x04tree\"\xb5\x02\n" +
|
||||
"\vSubjectTree\x12H\n" +
|
||||
"\tnode_type\x18\x01 \x01(\x0e2+.ory.keto.relation_tuples.v1alpha2.NodeTypeR\bnodeType\x12H\n" +
|
||||
"\asubject\x18\x02 \x01(\v2*.ory.keto.relation_tuples.v1alpha2.SubjectB\x02\x18\x01R\asubject\x12F\n" +
|
||||
"\x05tuple\x18\x04 \x01(\v20.ory.keto.relation_tuples.v1alpha2.RelationTupleR\x05tuple\x12J\n" +
|
||||
"\bchildren\x18\x03 \x03(\v2..ory.keto.relation_tuples.v1alpha2.SubjectTreeR\bchildren*\x83\x01\n" +
|
||||
"\bNodeType\x12\x19\n" +
|
||||
"\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x13\n" +
|
||||
"\x0fNODE_TYPE_UNION\x10\x01\x12\x17\n" +
|
||||
"\x13NODE_TYPE_EXCLUSION\x10\x02\x12\x1a\n" +
|
||||
"\x16NODE_TYPE_INTERSECTION\x10\x03\x12\x12\n" +
|
||||
"\x0eNODE_TYPE_LEAF\x10\x042~\n" +
|
||||
"\rExpandService\x12m\n" +
|
||||
"\x06Expand\x120.ory.keto.relation_tuples.v1alpha2.ExpandRequest\x1a1.ory.keto.relation_tuples.v1alpha2.ExpandResponseB\xab\x02\n" +
|
||||
"%com.ory.keto.relation_tuples.v1alpha2B\x12ExpandServiceProtoP\x01ZKgithub.com/ory/keto/gen/go/ory/keto/relation_tuples/v1alpha2;relationtuples\xa2\x02\x03OKR\xaa\x02 Ory.Keto.RelationTuples.V1alpha2\xca\x02 Ory\\Keto\\RelationTuples\\V1alpha2\xe2\x02,Ory\\Keto\\RelationTuples\\V1alpha2\\GPBMetadata\xea\x02#Ory::Keto::RelationTuples::V1alpha2b\x06proto3"
|
||||
|
||||
var (
|
||||
file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDescOnce sync.Once
|
||||
file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDescGZIP() []byte {
|
||||
file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDescOnce.Do(func() {
|
||||
file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDesc), len(file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDesc)))
|
||||
})
|
||||
return file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_goTypes = []any{
|
||||
(NodeType)(0), // 0: ory.keto.relation_tuples.v1alpha2.NodeType
|
||||
(*ExpandRequest)(nil), // 1: ory.keto.relation_tuples.v1alpha2.ExpandRequest
|
||||
(*ExpandResponse)(nil), // 2: ory.keto.relation_tuples.v1alpha2.ExpandResponse
|
||||
(*SubjectTree)(nil), // 3: ory.keto.relation_tuples.v1alpha2.SubjectTree
|
||||
(*Subject)(nil), // 4: ory.keto.relation_tuples.v1alpha2.Subject
|
||||
(*RelationTuple)(nil), // 5: ory.keto.relation_tuples.v1alpha2.RelationTuple
|
||||
}
|
||||
var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_depIdxs = []int32{
|
||||
4, // 0: ory.keto.relation_tuples.v1alpha2.ExpandRequest.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject
|
||||
3, // 1: ory.keto.relation_tuples.v1alpha2.ExpandResponse.tree:type_name -> ory.keto.relation_tuples.v1alpha2.SubjectTree
|
||||
0, // 2: ory.keto.relation_tuples.v1alpha2.SubjectTree.node_type:type_name -> ory.keto.relation_tuples.v1alpha2.NodeType
|
||||
4, // 3: ory.keto.relation_tuples.v1alpha2.SubjectTree.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject
|
||||
5, // 4: ory.keto.relation_tuples.v1alpha2.SubjectTree.tuple:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTuple
|
||||
3, // 5: ory.keto.relation_tuples.v1alpha2.SubjectTree.children:type_name -> ory.keto.relation_tuples.v1alpha2.SubjectTree
|
||||
1, // 6: ory.keto.relation_tuples.v1alpha2.ExpandService.Expand:input_type -> ory.keto.relation_tuples.v1alpha2.ExpandRequest
|
||||
2, // 7: ory.keto.relation_tuples.v1alpha2.ExpandService.Expand:output_type -> ory.keto.relation_tuples.v1alpha2.ExpandResponse
|
||||
7, // [7:8] is the sub-list for method output_type
|
||||
6, // [6:7] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_init() }
|
||||
func file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_init() {
|
||||
if File_ory_keto_relation_tuples_v1alpha2_expand_service_proto != nil {
|
||||
return
|
||||
}
|
||||
file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDesc), len(file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDesc)),
|
||||
NumEnums: 1,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_goTypes,
|
||||
DependencyIndexes: file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_depIdxs,
|
||||
EnumInfos: file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_enumTypes,
|
||||
MessageInfos: file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_ory_keto_relation_tuples_v1alpha2_expand_service_proto = out.File
|
||||
file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_goTypes = nil
|
||||
file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: ory/keto/relation_tuples/v1alpha2/expand_service.proto
|
||||
|
||||
package relationtuples
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// 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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
ExpandService_Expand_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand"
|
||||
)
|
||||
|
||||
// ExpandServiceClient is the client API for ExpandService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
//
|
||||
// The service that performs subject set expansion
|
||||
// based on the stored Access Control Lists.
|
||||
//
|
||||
// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
type ExpandServiceClient interface {
|
||||
// Expands the subject set into a tree of subjects.
|
||||
Expand(ctx context.Context, in *ExpandRequest, opts ...grpc.CallOption) (*ExpandResponse, error)
|
||||
}
|
||||
|
||||
type expandServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewExpandServiceClient(cc grpc.ClientConnInterface) ExpandServiceClient {
|
||||
return &expandServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *expandServiceClient) 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, ExpandService_Expand_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ExpandServiceServer is the server API for ExpandService service.
|
||||
// All implementations must embed UnimplementedExpandServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// The service that performs subject set expansion
|
||||
// based on the stored Access Control Lists.
|
||||
//
|
||||
// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
type ExpandServiceServer interface {
|
||||
// Expands the subject set into a tree of subjects.
|
||||
Expand(context.Context, *ExpandRequest) (*ExpandResponse, error)
|
||||
mustEmbedUnimplementedExpandServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedExpandServiceServer 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 UnimplementedExpandServiceServer struct{}
|
||||
|
||||
func (UnimplementedExpandServiceServer) Expand(context.Context, *ExpandRequest) (*ExpandResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Expand not implemented")
|
||||
}
|
||||
func (UnimplementedExpandServiceServer) mustEmbedUnimplementedExpandServiceServer() {}
|
||||
func (UnimplementedExpandServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeExpandServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ExpandServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeExpandServiceServer interface {
|
||||
mustEmbedUnimplementedExpandServiceServer()
|
||||
}
|
||||
|
||||
func RegisterExpandServiceServer(s grpc.ServiceRegistrar, srv ExpandServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedExpandServiceServer 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(&ExpandService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _ExpandService_Expand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExpandRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ExpandServiceServer).Expand(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ExpandService_Expand_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ExpandServiceServer).Expand(ctx, req.(*ExpandRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// ExpandService_ServiceDesc is the grpc.ServiceDesc for ExpandService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var ExpandService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "ory.keto.relation_tuples.v1alpha2.ExpandService",
|
||||
HandlerType: (*ExpandServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Expand",
|
||||
Handler: _ExpandService_Expand_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "ory/keto/relation_tuples/v1alpha2/expand_service.proto",
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: ory/keto/relation_tuples/v1alpha2/namespaces_service.proto
|
||||
|
||||
package relationtuples
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Request for ReadService.ListNamespaces RPC.
|
||||
type ListNamespacesRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListNamespacesRequest) Reset() {
|
||||
*x = ListNamespacesRequest{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListNamespacesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListNamespacesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListNamespacesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListNamespacesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListNamespacesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type ListNamespacesResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Namespaces []*Namespace `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListNamespacesResponse) Reset() {
|
||||
*x = ListNamespacesResponse{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListNamespacesResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListNamespacesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListNamespacesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListNamespacesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListNamespacesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ListNamespacesResponse) GetNamespaces() []*Namespace {
|
||||
if x != nil {
|
||||
return x.Namespaces
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Namespace struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Namespace) Reset() {
|
||||
*x = Namespace{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Namespace) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Namespace) ProtoMessage() {}
|
||||
|
||||
func (x *Namespace) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Namespace.ProtoReflect.Descriptor instead.
|
||||
func (*Namespace) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *Namespace) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
":ory/keto/relation_tuples/v1alpha2/namespaces_service.proto\x12!ory.keto.relation_tuples.v1alpha2\"\x17\n" +
|
||||
"\x15ListNamespacesRequest\"f\n" +
|
||||
"\x16ListNamespacesResponse\x12L\n" +
|
||||
"\n" +
|
||||
"namespaces\x18\x01 \x03(\v2,.ory.keto.relation_tuples.v1alpha2.NamespaceR\n" +
|
||||
"namespaces\"\x1f\n" +
|
||||
"\tNamespace\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name2\x9b\x01\n" +
|
||||
"\x11NamespacesService\x12\x85\x01\n" +
|
||||
"\x0eListNamespaces\x128.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest\x1a9.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponseB\xaf\x02\n" +
|
||||
"%com.ory.keto.relation_tuples.v1alpha2B\x16NamespacesServiceProtoP\x01ZKgithub.com/ory/keto/gen/go/ory/keto/relation_tuples/v1alpha2;relationtuples\xa2\x02\x03OKR\xaa\x02 Ory.Keto.RelationTuples.V1alpha2\xca\x02 Ory\\Keto\\RelationTuples\\V1alpha2\xe2\x02,Ory\\Keto\\RelationTuples\\V1alpha2\\GPBMetadata\xea\x02#Ory::Keto::RelationTuples::V1alpha2b\x06proto3"
|
||||
|
||||
var (
|
||||
file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_rawDescOnce sync.Once
|
||||
file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_rawDescGZIP() []byte {
|
||||
file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_rawDescOnce.Do(func() {
|
||||
file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_rawDesc), len(file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_rawDesc)))
|
||||
})
|
||||
return file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_goTypes = []any{
|
||||
(*ListNamespacesRequest)(nil), // 0: ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest
|
||||
(*ListNamespacesResponse)(nil), // 1: ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse
|
||||
(*Namespace)(nil), // 2: ory.keto.relation_tuples.v1alpha2.Namespace
|
||||
}
|
||||
var file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_depIdxs = []int32{
|
||||
2, // 0: ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.namespaces:type_name -> ory.keto.relation_tuples.v1alpha2.Namespace
|
||||
0, // 1: ory.keto.relation_tuples.v1alpha2.NamespacesService.ListNamespaces:input_type -> ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest
|
||||
1, // 2: ory.keto.relation_tuples.v1alpha2.NamespacesService.ListNamespaces:output_type -> ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse
|
||||
2, // [2:3] is the sub-list for method output_type
|
||||
1, // [1:2] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_init() }
|
||||
func file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_init() {
|
||||
if File_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_rawDesc), len(file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_goTypes,
|
||||
DependencyIndexes: file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_depIdxs,
|
||||
MessageInfos: file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto = out.File
|
||||
file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_goTypes = nil
|
||||
file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: ory/keto/relation_tuples/v1alpha2/namespaces_service.proto
|
||||
|
||||
package relationtuples
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// 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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
NamespacesService_ListNamespaces_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.NamespacesService/ListNamespaces"
|
||||
)
|
||||
|
||||
// NamespacesServiceClient is the client API for NamespacesService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
//
|
||||
// The service to query namespaces.
|
||||
//
|
||||
// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
type NamespacesServiceClient interface {
|
||||
// Lists Namespaces
|
||||
ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error)
|
||||
}
|
||||
|
||||
type namespacesServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewNamespacesServiceClient(cc grpc.ClientConnInterface) NamespacesServiceClient {
|
||||
return &namespacesServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *namespacesServiceClient) ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListNamespacesResponse)
|
||||
err := c.cc.Invoke(ctx, NamespacesService_ListNamespaces_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// NamespacesServiceServer is the server API for NamespacesService service.
|
||||
// All implementations must embed UnimplementedNamespacesServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// The service to query namespaces.
|
||||
//
|
||||
// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
type NamespacesServiceServer interface {
|
||||
// Lists Namespaces
|
||||
ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error)
|
||||
mustEmbedUnimplementedNamespacesServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedNamespacesServiceServer 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 UnimplementedNamespacesServiceServer struct{}
|
||||
|
||||
func (UnimplementedNamespacesServiceServer) ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListNamespaces not implemented")
|
||||
}
|
||||
func (UnimplementedNamespacesServiceServer) mustEmbedUnimplementedNamespacesServiceServer() {}
|
||||
func (UnimplementedNamespacesServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeNamespacesServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to NamespacesServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeNamespacesServiceServer interface {
|
||||
mustEmbedUnimplementedNamespacesServiceServer()
|
||||
}
|
||||
|
||||
func RegisterNamespacesServiceServer(s grpc.ServiceRegistrar, srv NamespacesServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedNamespacesServiceServer 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(&NamespacesService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _NamespacesService_ListNamespaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListNamespacesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NamespacesServiceServer).ListNamespaces(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: NamespacesService_ListNamespaces_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NamespacesServiceServer).ListNamespaces(ctx, req.(*ListNamespacesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// NamespacesService_ServiceDesc is the grpc.ServiceDesc for NamespacesService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var NamespacesService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "ory.keto.relation_tuples.v1alpha2.NamespacesService",
|
||||
HandlerType: (*NamespacesServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListNamespaces",
|
||||
Handler: _NamespacesService_ListNamespaces_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "ory/keto/relation_tuples/v1alpha2/namespaces_service.proto",
|
||||
}
|
||||
371
gen/go/ory/keto/relation_tuples/v1alpha2/read_service.pb.go
Normal file
371
gen/go/ory/keto/relation_tuples/v1alpha2/read_service.pb.go
Normal file
@@ -0,0 +1,371 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: ory/keto/relation_tuples/v1alpha2/read_service.proto
|
||||
|
||||
package relationtuples
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Request for ReadService.ListRelationTuples RPC.
|
||||
// See `ListRelationTuplesRequest_Query` for how to filter the query.
|
||||
type ListRelationTuplesRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// All query constraints are concatenated
|
||||
// with a logical AND operator.
|
||||
//
|
||||
// The RelationTuple list from ListRelationTuplesResponse
|
||||
// is ordered from the newest RelationTuple to the oldest.
|
||||
//
|
||||
// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/read_service.proto.
|
||||
Query *ListRelationTuplesRequest_Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
|
||||
RelationQuery *RelationQuery `protobuf:"bytes,6,opt,name=relation_query,json=relationQuery,proto3" json:"relation_query,omitempty"`
|
||||
// This field is not implemented yet and has no effect.
|
||||
// <!--
|
||||
// Optional. The list of fields to be expanded
|
||||
// in the RelationTuple list returned in `ListRelationTuplesResponse`.
|
||||
// Leaving this field unspecified means all fields are expanded.
|
||||
//
|
||||
// Available fields:
|
||||
// "object", "relation", "subject",
|
||||
// "namespace", "subject.id", "subject.namespace",
|
||||
// "subject.object", "subject.relation"
|
||||
// -->
|
||||
ExpandMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=expand_mask,json=expandMask,proto3" json:"expand_mask,omitempty"`
|
||||
// This field is not implemented yet and has no effect.
|
||||
// <!--
|
||||
// Optional. The snapshot token for this read.
|
||||
// -->
|
||||
Snaptoken string `protobuf:"bytes,3,opt,name=snaptoken,proto3" json:"snaptoken,omitempty"`
|
||||
// Optional. The maximum number of
|
||||
// RelationTuples to return in the response.
|
||||
//
|
||||
// Default: 100
|
||||
PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
|
||||
// Optional. An opaque pagination token returned from
|
||||
// a previous call to `ListRelationTuples` that
|
||||
// indicates where the page should start at.
|
||||
//
|
||||
// An empty token denotes the first page. All successive
|
||||
// pages require the token from the previous page.
|
||||
PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesRequest) Reset() {
|
||||
*x = ListRelationTuplesRequest{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListRelationTuplesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListRelationTuplesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListRelationTuplesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListRelationTuplesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/read_service.proto.
|
||||
func (x *ListRelationTuplesRequest) GetQuery() *ListRelationTuplesRequest_Query {
|
||||
if x != nil {
|
||||
return x.Query
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesRequest) GetRelationQuery() *RelationQuery {
|
||||
if x != nil {
|
||||
return x.RelationQuery
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesRequest) GetExpandMask() *fieldmaskpb.FieldMask {
|
||||
if x != nil {
|
||||
return x.ExpandMask
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesRequest) GetSnaptoken() string {
|
||||
if x != nil {
|
||||
return x.Snaptoken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesRequest) GetPageSize() int32 {
|
||||
if x != nil {
|
||||
return x.PageSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesRequest) GetPageToken() string {
|
||||
if x != nil {
|
||||
return x.PageToken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// The response of a ReadService.ListRelationTuples RPC.
|
||||
type ListRelationTuplesResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The relationships matching the list request.
|
||||
RelationTuples []*RelationTuple `protobuf:"bytes,1,rep,name=relation_tuples,json=relationTuples,proto3" json:"relation_tuples,omitempty"`
|
||||
// The token required to get the next page.
|
||||
// If this is the last page, the token will be the empty string.
|
||||
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesResponse) Reset() {
|
||||
*x = ListRelationTuplesResponse{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListRelationTuplesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListRelationTuplesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListRelationTuplesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListRelationTuplesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesResponse) GetRelationTuples() []*RelationTuple {
|
||||
if x != nil {
|
||||
return x.RelationTuples
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesResponse) GetNextPageToken() string {
|
||||
if x != nil {
|
||||
return x.NextPageToken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// The query for listing relationships.
|
||||
// Clients can specify any optional field to
|
||||
// partially filter for specific relationships.
|
||||
//
|
||||
// Example use cases (namespace is always required):
|
||||
// - object only: display a list of all permissions referring to a specific object
|
||||
// - relation only: get all groups that have members; get all directories that have content
|
||||
// - object & relation: display all subjects that have a specific permission relation
|
||||
// - subject & relation: display all groups a subject belongs to; display all objects a subject has access to
|
||||
// - object & relation & subject: check whether the relation tuple already exists
|
||||
type ListRelationTuplesRequest_Query struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// Required. The namespace to query.
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
// Optional. The object to query for.
|
||||
Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
|
||||
// Optional. The relation to query for.
|
||||
Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"`
|
||||
// Optional. The subject to query for.
|
||||
Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesRequest_Query) Reset() {
|
||||
*x = ListRelationTuplesRequest_Query{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesRequest_Query) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListRelationTuplesRequest_Query) ProtoMessage() {}
|
||||
|
||||
func (x *ListRelationTuplesRequest_Query) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListRelationTuplesRequest_Query.ProtoReflect.Descriptor instead.
|
||||
func (*ListRelationTuplesRequest_Query) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesRequest_Query) GetNamespace() string {
|
||||
if x != nil {
|
||||
return x.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesRequest_Query) GetObject() string {
|
||||
if x != nil {
|
||||
return x.Object
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesRequest_Query) GetRelation() string {
|
||||
if x != nil {
|
||||
return x.Relation
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListRelationTuplesRequest_Query) GetSubject() *Subject {
|
||||
if x != nil {
|
||||
return x.Subject
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_ory_keto_relation_tuples_v1alpha2_read_service_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"4ory/keto/relation_tuples/v1alpha2/read_service.proto\x12!ory.keto.relation_tuples.v1alpha2\x1a7ory/keto/relation_tuples/v1alpha2/relation_tuples.proto\x1a google/protobuf/field_mask.proto\"\x8b\x04\n" +
|
||||
"\x19ListRelationTuplesRequest\x12\\\n" +
|
||||
"\x05query\x18\x01 \x01(\v2B.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.QueryB\x02\x18\x01R\x05query\x12W\n" +
|
||||
"\x0erelation_query\x18\x06 \x01(\v20.ory.keto.relation_tuples.v1alpha2.RelationQueryR\rrelationQuery\x12;\n" +
|
||||
"\vexpand_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" +
|
||||
"expandMask\x12\x1c\n" +
|
||||
"\tsnaptoken\x18\x03 \x01(\tR\tsnaptoken\x12\x1b\n" +
|
||||
"\tpage_size\x18\x04 \x01(\x05R\bpageSize\x12\x1d\n" +
|
||||
"\n" +
|
||||
"page_token\x18\x05 \x01(\tR\tpageToken\x1a\x9f\x01\n" +
|
||||
"\x05Query\x12\x1c\n" +
|
||||
"\tnamespace\x18\x01 \x01(\tR\tnamespace\x12\x16\n" +
|
||||
"\x06object\x18\x02 \x01(\tR\x06object\x12\x1a\n" +
|
||||
"\brelation\x18\x03 \x01(\tR\brelation\x12D\n" +
|
||||
"\asubject\x18\x04 \x01(\v2*.ory.keto.relation_tuples.v1alpha2.SubjectR\asubject\"\x9f\x01\n" +
|
||||
"\x1aListRelationTuplesResponse\x12Y\n" +
|
||||
"\x0frelation_tuples\x18\x01 \x03(\v20.ory.keto.relation_tuples.v1alpha2.RelationTupleR\x0erelationTuples\x12&\n" +
|
||||
"\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken2\xa1\x01\n" +
|
||||
"\vReadService\x12\x91\x01\n" +
|
||||
"\x12ListRelationTuples\x12<.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest\x1a=.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponseB\xa9\x02\n" +
|
||||
"%com.ory.keto.relation_tuples.v1alpha2B\x10ReadServiceProtoP\x01ZKgithub.com/ory/keto/gen/go/ory/keto/relation_tuples/v1alpha2;relationtuples\xa2\x02\x03OKR\xaa\x02 Ory.Keto.RelationTuples.V1alpha2\xca\x02 Ory\\Keto\\RelationTuples\\V1alpha2\xe2\x02,Ory\\Keto\\RelationTuples\\V1alpha2\\GPBMetadata\xea\x02#Ory::Keto::RelationTuples::V1alpha2b\x06proto3"
|
||||
|
||||
var (
|
||||
file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDescOnce sync.Once
|
||||
file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDescGZIP() []byte {
|
||||
file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDescOnce.Do(func() {
|
||||
file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDesc), len(file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDesc)))
|
||||
})
|
||||
return file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_ory_keto_relation_tuples_v1alpha2_read_service_proto_goTypes = []any{
|
||||
(*ListRelationTuplesRequest)(nil), // 0: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest
|
||||
(*ListRelationTuplesResponse)(nil), // 1: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse
|
||||
(*ListRelationTuplesRequest_Query)(nil), // 2: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query
|
||||
(*RelationQuery)(nil), // 3: ory.keto.relation_tuples.v1alpha2.RelationQuery
|
||||
(*fieldmaskpb.FieldMask)(nil), // 4: google.protobuf.FieldMask
|
||||
(*RelationTuple)(nil), // 5: ory.keto.relation_tuples.v1alpha2.RelationTuple
|
||||
(*Subject)(nil), // 6: ory.keto.relation_tuples.v1alpha2.Subject
|
||||
}
|
||||
var file_ory_keto_relation_tuples_v1alpha2_read_service_proto_depIdxs = []int32{
|
||||
2, // 0: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.query:type_name -> ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query
|
||||
3, // 1: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.relation_query:type_name -> ory.keto.relation_tuples.v1alpha2.RelationQuery
|
||||
4, // 2: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.expand_mask:type_name -> google.protobuf.FieldMask
|
||||
5, // 3: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.relation_tuples:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTuple
|
||||
6, // 4: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject
|
||||
0, // 5: ory.keto.relation_tuples.v1alpha2.ReadService.ListRelationTuples:input_type -> ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest
|
||||
1, // 6: ory.keto.relation_tuples.v1alpha2.ReadService.ListRelationTuples:output_type -> ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse
|
||||
6, // [6:7] is the sub-list for method output_type
|
||||
5, // [5:6] is the sub-list for method input_type
|
||||
5, // [5:5] is the sub-list for extension type_name
|
||||
5, // [5:5] is the sub-list for extension extendee
|
||||
0, // [0:5] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_ory_keto_relation_tuples_v1alpha2_read_service_proto_init() }
|
||||
func file_ory_keto_relation_tuples_v1alpha2_read_service_proto_init() {
|
||||
if File_ory_keto_relation_tuples_v1alpha2_read_service_proto != nil {
|
||||
return
|
||||
}
|
||||
file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDesc), len(file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_ory_keto_relation_tuples_v1alpha2_read_service_proto_goTypes,
|
||||
DependencyIndexes: file_ory_keto_relation_tuples_v1alpha2_read_service_proto_depIdxs,
|
||||
MessageInfos: file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_ory_keto_relation_tuples_v1alpha2_read_service_proto = out.File
|
||||
file_ory_keto_relation_tuples_v1alpha2_read_service_proto_goTypes = nil
|
||||
file_ory_keto_relation_tuples_v1alpha2_read_service_proto_depIdxs = nil
|
||||
}
|
||||
134
gen/go/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go
Normal file
134
gen/go/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go
Normal file
@@ -0,0 +1,134 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: ory/keto/relation_tuples/v1alpha2/read_service.proto
|
||||
|
||||
package relationtuples
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// 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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
ReadService_ListRelationTuples_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples"
|
||||
)
|
||||
|
||||
// ReadServiceClient is the client API for ReadService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
//
|
||||
// The service to query relationships.
|
||||
//
|
||||
// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
type ReadServiceClient interface {
|
||||
// Lists ACL relationships.
|
||||
ListRelationTuples(ctx context.Context, in *ListRelationTuplesRequest, opts ...grpc.CallOption) (*ListRelationTuplesResponse, error)
|
||||
}
|
||||
|
||||
type readServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewReadServiceClient(cc grpc.ClientConnInterface) ReadServiceClient {
|
||||
return &readServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *readServiceClient) ListRelationTuples(ctx context.Context, in *ListRelationTuplesRequest, opts ...grpc.CallOption) (*ListRelationTuplesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListRelationTuplesResponse)
|
||||
err := c.cc.Invoke(ctx, ReadService_ListRelationTuples_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ReadServiceServer is the server API for ReadService service.
|
||||
// All implementations must embed UnimplementedReadServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// The service to query relationships.
|
||||
//
|
||||
// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis).
|
||||
type ReadServiceServer interface {
|
||||
// Lists ACL relationships.
|
||||
ListRelationTuples(context.Context, *ListRelationTuplesRequest) (*ListRelationTuplesResponse, error)
|
||||
mustEmbedUnimplementedReadServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedReadServiceServer 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 UnimplementedReadServiceServer struct{}
|
||||
|
||||
func (UnimplementedReadServiceServer) ListRelationTuples(context.Context, *ListRelationTuplesRequest) (*ListRelationTuplesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListRelationTuples not implemented")
|
||||
}
|
||||
func (UnimplementedReadServiceServer) mustEmbedUnimplementedReadServiceServer() {}
|
||||
func (UnimplementedReadServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeReadServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ReadServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeReadServiceServer interface {
|
||||
mustEmbedUnimplementedReadServiceServer()
|
||||
}
|
||||
|
||||
func RegisterReadServiceServer(s grpc.ServiceRegistrar, srv ReadServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedReadServiceServer 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(&ReadService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _ReadService_ListRelationTuples_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListRelationTuplesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ReadServiceServer).ListRelationTuples(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ReadService_ListRelationTuples_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ReadServiceServer).ListRelationTuples(ctx, req.(*ListRelationTuplesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// ReadService_ServiceDesc is the grpc.ServiceDesc for ReadService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var ReadService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "ory.keto.relation_tuples.v1alpha2.ReadService",
|
||||
HandlerType: (*ReadServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListRelationTuples",
|
||||
Handler: _ReadService_ListRelationTuples_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "ory/keto/relation_tuples/v1alpha2/read_service.proto",
|
||||
}
|
||||
432
gen/go/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go
Normal file
432
gen/go/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go
Normal file
@@ -0,0 +1,432 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: ory/keto/relation_tuples/v1alpha2/relation_tuples.proto
|
||||
|
||||
package relationtuples
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// RelationTuple defines a relation between an Object and a Subject.
|
||||
type RelationTuple struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The namespace this relation tuple lives in.
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
// The object related by this tuple.
|
||||
// It is an object in the namespace of the tuple.
|
||||
Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
|
||||
// The relation between an Object and a Subject.
|
||||
Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"`
|
||||
// The subject related by this tuple.
|
||||
// A Subject either represents a concrete subject id or
|
||||
// a `SubjectSet` that expands to more Subjects.
|
||||
Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RelationTuple) Reset() {
|
||||
*x = RelationTuple{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RelationTuple) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RelationTuple) ProtoMessage() {}
|
||||
|
||||
func (x *RelationTuple) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RelationTuple.ProtoReflect.Descriptor instead.
|
||||
func (*RelationTuple) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *RelationTuple) GetNamespace() string {
|
||||
if x != nil {
|
||||
return x.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RelationTuple) GetObject() string {
|
||||
if x != nil {
|
||||
return x.Object
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RelationTuple) GetRelation() string {
|
||||
if x != nil {
|
||||
return x.Relation
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RelationTuple) GetSubject() *Subject {
|
||||
if x != nil {
|
||||
return x.Subject
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// The query for listing relationships.
|
||||
// Clients can specify any optional field to
|
||||
// partially filter for specific relationships.
|
||||
//
|
||||
// Example use cases (namespace is always required):
|
||||
// - object only: display a list of all permissions referring to a specific object
|
||||
// - relation only: get all groups that have members; get all directories that have content
|
||||
// - object & relation: display all subjects that have a specific permission relation
|
||||
// - subject & relation: display all groups a subject belongs to; display all objects a subject has access to
|
||||
// - object & relation & subject: check whether the relation tuple already exists
|
||||
type RelationQuery struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The namespace this relation tuple lives in.
|
||||
Namespace *string `protobuf:"bytes,1,opt,name=namespace,proto3,oneof" json:"namespace,omitempty"`
|
||||
// The object related by this tuple.
|
||||
// It is an object in the namespace of the tuple.
|
||||
Object *string `protobuf:"bytes,2,opt,name=object,proto3,oneof" json:"object,omitempty"`
|
||||
// The relation between an Object and a Subject.
|
||||
Relation *string `protobuf:"bytes,3,opt,name=relation,proto3,oneof" json:"relation,omitempty"`
|
||||
// The subject related by this tuple.
|
||||
// A Subject either represents a concrete subject id or
|
||||
// a `SubjectSet` that expands to more Subjects.
|
||||
Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3,oneof" json:"subject,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RelationQuery) Reset() {
|
||||
*x = RelationQuery{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RelationQuery) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RelationQuery) ProtoMessage() {}
|
||||
|
||||
func (x *RelationQuery) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RelationQuery.ProtoReflect.Descriptor instead.
|
||||
func (*RelationQuery) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *RelationQuery) GetNamespace() string {
|
||||
if x != nil && x.Namespace != nil {
|
||||
return *x.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RelationQuery) GetObject() string {
|
||||
if x != nil && x.Object != nil {
|
||||
return *x.Object
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RelationQuery) GetRelation() string {
|
||||
if x != nil && x.Relation != nil {
|
||||
return *x.Relation
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RelationQuery) GetSubject() *Subject {
|
||||
if x != nil {
|
||||
return x.Subject
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Subject is either a concrete subject id or
|
||||
// a `SubjectSet` expanding to more Subjects.
|
||||
type Subject struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The reference of this abstract subject.
|
||||
//
|
||||
// Types that are valid to be assigned to Ref:
|
||||
//
|
||||
// *Subject_Id
|
||||
// *Subject_Set
|
||||
Ref isSubject_Ref `protobuf_oneof:"ref"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Subject) Reset() {
|
||||
*x = Subject{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Subject) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Subject) ProtoMessage() {}
|
||||
|
||||
func (x *Subject) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Subject.ProtoReflect.Descriptor instead.
|
||||
func (*Subject) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *Subject) GetRef() isSubject_Ref {
|
||||
if x != nil {
|
||||
return x.Ref
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Subject) GetId() string {
|
||||
if x != nil {
|
||||
if x, ok := x.Ref.(*Subject_Id); ok {
|
||||
return x.Id
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Subject) GetSet() *SubjectSet {
|
||||
if x != nil {
|
||||
if x, ok := x.Ref.(*Subject_Set); ok {
|
||||
return x.Set
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type isSubject_Ref interface {
|
||||
isSubject_Ref()
|
||||
}
|
||||
|
||||
type Subject_Id struct {
|
||||
// A concrete id of the subject.
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"`
|
||||
}
|
||||
|
||||
type Subject_Set struct {
|
||||
// A subject set that expands to more Subjects.
|
||||
// More information are available under [concepts](../concepts/15_subjects.mdx).
|
||||
Set *SubjectSet `protobuf:"bytes,2,opt,name=set,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*Subject_Id) isSubject_Ref() {}
|
||||
|
||||
func (*Subject_Set) isSubject_Ref() {}
|
||||
|
||||
// SubjectSet refers to all subjects who have
|
||||
// the same `relation` on an `object`.
|
||||
type SubjectSet struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The namespace of the object and relation
|
||||
// referenced in this subject set.
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
// The object related by this subject set.
|
||||
Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
|
||||
// The relation between the object and the subjects.
|
||||
Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SubjectSet) Reset() {
|
||||
*x = SubjectSet{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SubjectSet) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SubjectSet) ProtoMessage() {}
|
||||
|
||||
func (x *SubjectSet) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SubjectSet.ProtoReflect.Descriptor instead.
|
||||
func (*SubjectSet) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *SubjectSet) GetNamespace() string {
|
||||
if x != nil {
|
||||
return x.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SubjectSet) GetObject() string {
|
||||
if x != nil {
|
||||
return x.Object
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SubjectSet) GetRelation() string {
|
||||
if x != nil {
|
||||
return x.Relation
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"7ory/keto/relation_tuples/v1alpha2/relation_tuples.proto\x12!ory.keto.relation_tuples.v1alpha2\"\xa7\x01\n" +
|
||||
"\rRelationTuple\x12\x1c\n" +
|
||||
"\tnamespace\x18\x01 \x01(\tR\tnamespace\x12\x16\n" +
|
||||
"\x06object\x18\x02 \x01(\tR\x06object\x12\x1a\n" +
|
||||
"\brelation\x18\x03 \x01(\tR\brelation\x12D\n" +
|
||||
"\asubject\x18\x04 \x01(\v2*.ory.keto.relation_tuples.v1alpha2.SubjectR\asubject\"\xed\x01\n" +
|
||||
"\rRelationQuery\x12!\n" +
|
||||
"\tnamespace\x18\x01 \x01(\tH\x00R\tnamespace\x88\x01\x01\x12\x1b\n" +
|
||||
"\x06object\x18\x02 \x01(\tH\x01R\x06object\x88\x01\x01\x12\x1f\n" +
|
||||
"\brelation\x18\x03 \x01(\tH\x02R\brelation\x88\x01\x01\x12I\n" +
|
||||
"\asubject\x18\x04 \x01(\v2*.ory.keto.relation_tuples.v1alpha2.SubjectH\x03R\asubject\x88\x01\x01B\f\n" +
|
||||
"\n" +
|
||||
"_namespaceB\t\n" +
|
||||
"\a_objectB\v\n" +
|
||||
"\t_relationB\n" +
|
||||
"\n" +
|
||||
"\b_subject\"e\n" +
|
||||
"\aSubject\x12\x10\n" +
|
||||
"\x02id\x18\x01 \x01(\tH\x00R\x02id\x12A\n" +
|
||||
"\x03set\x18\x02 \x01(\v2-.ory.keto.relation_tuples.v1alpha2.SubjectSetH\x00R\x03setB\x05\n" +
|
||||
"\x03ref\"^\n" +
|
||||
"\n" +
|
||||
"SubjectSet\x12\x1c\n" +
|
||||
"\tnamespace\x18\x01 \x01(\tR\tnamespace\x12\x16\n" +
|
||||
"\x06object\x18\x02 \x01(\tR\x06object\x12\x1a\n" +
|
||||
"\brelation\x18\x03 \x01(\tR\brelationB\xac\x02\n" +
|
||||
"%com.ory.keto.relation_tuples.v1alpha2B\x13RelationTuplesProtoP\x01ZKgithub.com/ory/keto/gen/go/ory/keto/relation_tuples/v1alpha2;relationtuples\xa2\x02\x03OKR\xaa\x02 Ory.Keto.RelationTuples.V1alpha2\xca\x02 Ory\\Keto\\RelationTuples\\V1alpha2\xe2\x02,Ory\\Keto\\RelationTuples\\V1alpha2\\GPBMetadata\xea\x02#Ory::Keto::RelationTuples::V1alpha2b\x06proto3"
|
||||
|
||||
var (
|
||||
file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescOnce sync.Once
|
||||
file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescGZIP() []byte {
|
||||
file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescOnce.Do(func() {
|
||||
file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDesc), len(file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDesc)))
|
||||
})
|
||||
return file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_goTypes = []any{
|
||||
(*RelationTuple)(nil), // 0: ory.keto.relation_tuples.v1alpha2.RelationTuple
|
||||
(*RelationQuery)(nil), // 1: ory.keto.relation_tuples.v1alpha2.RelationQuery
|
||||
(*Subject)(nil), // 2: ory.keto.relation_tuples.v1alpha2.Subject
|
||||
(*SubjectSet)(nil), // 3: ory.keto.relation_tuples.v1alpha2.SubjectSet
|
||||
}
|
||||
var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_depIdxs = []int32{
|
||||
2, // 0: ory.keto.relation_tuples.v1alpha2.RelationTuple.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject
|
||||
2, // 1: ory.keto.relation_tuples.v1alpha2.RelationQuery.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject
|
||||
3, // 2: ory.keto.relation_tuples.v1alpha2.Subject.set:type_name -> ory.keto.relation_tuples.v1alpha2.SubjectSet
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() }
|
||||
func file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() {
|
||||
if File_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto != nil {
|
||||
return
|
||||
}
|
||||
file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[1].OneofWrappers = []any{}
|
||||
file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[2].OneofWrappers = []any{
|
||||
(*Subject_Id)(nil),
|
||||
(*Subject_Set)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDesc), len(file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_goTypes,
|
||||
DependencyIndexes: file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_depIdxs,
|
||||
MessageInfos: file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes,
|
||||
}.Build()
|
||||
File_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto = out.File
|
||||
file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_goTypes = nil
|
||||
file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: ory/keto/relation_tuples/v1alpha2/check_service.proto
|
||||
|
||||
package relationtuplesconnect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1alpha2 "github.com/ory/keto/gen/go/ory/keto/relation_tuples/v1alpha2"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
||||
// compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of connect or updating the connect
|
||||
// version compiled into your binary.
|
||||
const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// CheckServiceName is the fully-qualified name of the CheckService service.
|
||||
CheckServiceName = "ory.keto.relation_tuples.v1alpha2.CheckService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// CheckServiceCheckProcedure is the fully-qualified name of the CheckService's Check RPC.
|
||||
CheckServiceCheckProcedure = "/ory.keto.relation_tuples.v1alpha2.CheckService/Check"
|
||||
// CheckServiceBatchCheckProcedure is the fully-qualified name of the CheckService's BatchCheck RPC.
|
||||
CheckServiceBatchCheckProcedure = "/ory.keto.relation_tuples.v1alpha2.CheckService/BatchCheck"
|
||||
)
|
||||
|
||||
// CheckServiceClient is a client for the ory.keto.relation_tuples.v1alpha2.CheckService service.
|
||||
type CheckServiceClient interface {
|
||||
// Performs an authorization check.
|
||||
Check(context.Context, *connect.Request[v1alpha2.CheckRequest]) (*connect.Response[v1alpha2.CheckResponse], error)
|
||||
BatchCheck(context.Context, *connect.Request[v1alpha2.BatchCheckRequest]) (*connect.Response[v1alpha2.BatchCheckResponse], error)
|
||||
}
|
||||
|
||||
// NewCheckServiceClient constructs a client for the ory.keto.relation_tuples.v1alpha2.CheckService
|
||||
// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
|
||||
// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
|
||||
// the connect.WithGRPC() or connect.WithGRPCWeb() options.
|
||||
//
|
||||
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewCheckServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) CheckServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
checkServiceMethods := v1alpha2.File_ory_keto_relation_tuples_v1alpha2_check_service_proto.Services().ByName("CheckService").Methods()
|
||||
return &checkServiceClient{
|
||||
check: connect.NewClient[v1alpha2.CheckRequest, v1alpha2.CheckResponse](
|
||||
httpClient,
|
||||
baseURL+CheckServiceCheckProcedure,
|
||||
connect.WithSchema(checkServiceMethods.ByName("Check")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
batchCheck: connect.NewClient[v1alpha2.BatchCheckRequest, v1alpha2.BatchCheckResponse](
|
||||
httpClient,
|
||||
baseURL+CheckServiceBatchCheckProcedure,
|
||||
connect.WithSchema(checkServiceMethods.ByName("BatchCheck")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// checkServiceClient implements CheckServiceClient.
|
||||
type checkServiceClient struct {
|
||||
check *connect.Client[v1alpha2.CheckRequest, v1alpha2.CheckResponse]
|
||||
batchCheck *connect.Client[v1alpha2.BatchCheckRequest, v1alpha2.BatchCheckResponse]
|
||||
}
|
||||
|
||||
// Check calls ory.keto.relation_tuples.v1alpha2.CheckService.Check.
|
||||
func (c *checkServiceClient) Check(ctx context.Context, req *connect.Request[v1alpha2.CheckRequest]) (*connect.Response[v1alpha2.CheckResponse], error) {
|
||||
return c.check.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// BatchCheck calls ory.keto.relation_tuples.v1alpha2.CheckService.BatchCheck.
|
||||
func (c *checkServiceClient) BatchCheck(ctx context.Context, req *connect.Request[v1alpha2.BatchCheckRequest]) (*connect.Response[v1alpha2.BatchCheckResponse], error) {
|
||||
return c.batchCheck.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// CheckServiceHandler is an implementation of the ory.keto.relation_tuples.v1alpha2.CheckService
|
||||
// service.
|
||||
type CheckServiceHandler interface {
|
||||
// Performs an authorization check.
|
||||
Check(context.Context, *connect.Request[v1alpha2.CheckRequest]) (*connect.Response[v1alpha2.CheckResponse], error)
|
||||
BatchCheck(context.Context, *connect.Request[v1alpha2.BatchCheckRequest]) (*connect.Response[v1alpha2.BatchCheckResponse], error)
|
||||
}
|
||||
|
||||
// NewCheckServiceHandler builds an HTTP handler from the service implementation. It returns the
|
||||
// path on which to mount the handler and the handler itself.
|
||||
//
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewCheckServiceHandler(svc CheckServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
checkServiceMethods := v1alpha2.File_ory_keto_relation_tuples_v1alpha2_check_service_proto.Services().ByName("CheckService").Methods()
|
||||
checkServiceCheckHandler := connect.NewUnaryHandler(
|
||||
CheckServiceCheckProcedure,
|
||||
svc.Check,
|
||||
connect.WithSchema(checkServiceMethods.ByName("Check")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
checkServiceBatchCheckHandler := connect.NewUnaryHandler(
|
||||
CheckServiceBatchCheckProcedure,
|
||||
svc.BatchCheck,
|
||||
connect.WithSchema(checkServiceMethods.ByName("BatchCheck")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/ory.keto.relation_tuples.v1alpha2.CheckService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case CheckServiceCheckProcedure:
|
||||
checkServiceCheckHandler.ServeHTTP(w, r)
|
||||
case CheckServiceBatchCheckProcedure:
|
||||
checkServiceBatchCheckHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// UnimplementedCheckServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedCheckServiceHandler struct{}
|
||||
|
||||
func (UnimplementedCheckServiceHandler) Check(context.Context, *connect.Request[v1alpha2.CheckRequest]) (*connect.Response[v1alpha2.CheckResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ory.keto.relation_tuples.v1alpha2.CheckService.Check is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedCheckServiceHandler) BatchCheck(context.Context, *connect.Request[v1alpha2.BatchCheckRequest]) (*connect.Response[v1alpha2.BatchCheckResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ory.keto.relation_tuples.v1alpha2.CheckService.BatchCheck is not implemented"))
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: ory/keto/relation_tuples/v1alpha2/expand_service.proto
|
||||
|
||||
package relationtuplesconnect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1alpha2 "github.com/ory/keto/gen/go/ory/keto/relation_tuples/v1alpha2"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
||||
// compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of connect or updating the connect
|
||||
// version compiled into your binary.
|
||||
const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// ExpandServiceName is the fully-qualified name of the ExpandService service.
|
||||
ExpandServiceName = "ory.keto.relation_tuples.v1alpha2.ExpandService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// ExpandServiceExpandProcedure is the fully-qualified name of the ExpandService's Expand RPC.
|
||||
ExpandServiceExpandProcedure = "/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand"
|
||||
)
|
||||
|
||||
// ExpandServiceClient is a client for the ory.keto.relation_tuples.v1alpha2.ExpandService service.
|
||||
type ExpandServiceClient interface {
|
||||
// Expands the subject set into a tree of subjects.
|
||||
Expand(context.Context, *connect.Request[v1alpha2.ExpandRequest]) (*connect.Response[v1alpha2.ExpandResponse], error)
|
||||
}
|
||||
|
||||
// NewExpandServiceClient constructs a client for the
|
||||
// ory.keto.relation_tuples.v1alpha2.ExpandService service. By default, it uses the Connect protocol
|
||||
// with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To
|
||||
// use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb()
|
||||
// options.
|
||||
//
|
||||
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewExpandServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ExpandServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
expandServiceMethods := v1alpha2.File_ory_keto_relation_tuples_v1alpha2_expand_service_proto.Services().ByName("ExpandService").Methods()
|
||||
return &expandServiceClient{
|
||||
expand: connect.NewClient[v1alpha2.ExpandRequest, v1alpha2.ExpandResponse](
|
||||
httpClient,
|
||||
baseURL+ExpandServiceExpandProcedure,
|
||||
connect.WithSchema(expandServiceMethods.ByName("Expand")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// expandServiceClient implements ExpandServiceClient.
|
||||
type expandServiceClient struct {
|
||||
expand *connect.Client[v1alpha2.ExpandRequest, v1alpha2.ExpandResponse]
|
||||
}
|
||||
|
||||
// Expand calls ory.keto.relation_tuples.v1alpha2.ExpandService.Expand.
|
||||
func (c *expandServiceClient) Expand(ctx context.Context, req *connect.Request[v1alpha2.ExpandRequest]) (*connect.Response[v1alpha2.ExpandResponse], error) {
|
||||
return c.expand.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// ExpandServiceHandler is an implementation of the ory.keto.relation_tuples.v1alpha2.ExpandService
|
||||
// service.
|
||||
type ExpandServiceHandler interface {
|
||||
// Expands the subject set into a tree of subjects.
|
||||
Expand(context.Context, *connect.Request[v1alpha2.ExpandRequest]) (*connect.Response[v1alpha2.ExpandResponse], error)
|
||||
}
|
||||
|
||||
// NewExpandServiceHandler builds an HTTP handler from the service implementation. It returns the
|
||||
// path on which to mount the handler and the handler itself.
|
||||
//
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewExpandServiceHandler(svc ExpandServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
expandServiceMethods := v1alpha2.File_ory_keto_relation_tuples_v1alpha2_expand_service_proto.Services().ByName("ExpandService").Methods()
|
||||
expandServiceExpandHandler := connect.NewUnaryHandler(
|
||||
ExpandServiceExpandProcedure,
|
||||
svc.Expand,
|
||||
connect.WithSchema(expandServiceMethods.ByName("Expand")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/ory.keto.relation_tuples.v1alpha2.ExpandService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case ExpandServiceExpandProcedure:
|
||||
expandServiceExpandHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// UnimplementedExpandServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedExpandServiceHandler struct{}
|
||||
|
||||
func (UnimplementedExpandServiceHandler) Expand(context.Context, *connect.Request[v1alpha2.ExpandRequest]) (*connect.Response[v1alpha2.ExpandResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ory.keto.relation_tuples.v1alpha2.ExpandService.Expand is not implemented"))
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: ory/keto/relation_tuples/v1alpha2/namespaces_service.proto
|
||||
|
||||
package relationtuplesconnect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1alpha2 "github.com/ory/keto/gen/go/ory/keto/relation_tuples/v1alpha2"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
||||
// compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of connect or updating the connect
|
||||
// version compiled into your binary.
|
||||
const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// NamespacesServiceName is the fully-qualified name of the NamespacesService service.
|
||||
NamespacesServiceName = "ory.keto.relation_tuples.v1alpha2.NamespacesService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// NamespacesServiceListNamespacesProcedure is the fully-qualified name of the NamespacesService's
|
||||
// ListNamespaces RPC.
|
||||
NamespacesServiceListNamespacesProcedure = "/ory.keto.relation_tuples.v1alpha2.NamespacesService/ListNamespaces"
|
||||
)
|
||||
|
||||
// NamespacesServiceClient is a client for the ory.keto.relation_tuples.v1alpha2.NamespacesService
|
||||
// service.
|
||||
type NamespacesServiceClient interface {
|
||||
// Lists Namespaces
|
||||
ListNamespaces(context.Context, *connect.Request[v1alpha2.ListNamespacesRequest]) (*connect.Response[v1alpha2.ListNamespacesResponse], error)
|
||||
}
|
||||
|
||||
// NewNamespacesServiceClient constructs a client for the
|
||||
// ory.keto.relation_tuples.v1alpha2.NamespacesService service. By default, it uses the Connect
|
||||
// protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed
|
||||
// requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
|
||||
// connect.WithGRPCWeb() options.
|
||||
//
|
||||
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewNamespacesServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) NamespacesServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
namespacesServiceMethods := v1alpha2.File_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto.Services().ByName("NamespacesService").Methods()
|
||||
return &namespacesServiceClient{
|
||||
listNamespaces: connect.NewClient[v1alpha2.ListNamespacesRequest, v1alpha2.ListNamespacesResponse](
|
||||
httpClient,
|
||||
baseURL+NamespacesServiceListNamespacesProcedure,
|
||||
connect.WithSchema(namespacesServiceMethods.ByName("ListNamespaces")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// namespacesServiceClient implements NamespacesServiceClient.
|
||||
type namespacesServiceClient struct {
|
||||
listNamespaces *connect.Client[v1alpha2.ListNamespacesRequest, v1alpha2.ListNamespacesResponse]
|
||||
}
|
||||
|
||||
// ListNamespaces calls ory.keto.relation_tuples.v1alpha2.NamespacesService.ListNamespaces.
|
||||
func (c *namespacesServiceClient) ListNamespaces(ctx context.Context, req *connect.Request[v1alpha2.ListNamespacesRequest]) (*connect.Response[v1alpha2.ListNamespacesResponse], error) {
|
||||
return c.listNamespaces.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// NamespacesServiceHandler is an implementation of the
|
||||
// ory.keto.relation_tuples.v1alpha2.NamespacesService service.
|
||||
type NamespacesServiceHandler interface {
|
||||
// Lists Namespaces
|
||||
ListNamespaces(context.Context, *connect.Request[v1alpha2.ListNamespacesRequest]) (*connect.Response[v1alpha2.ListNamespacesResponse], error)
|
||||
}
|
||||
|
||||
// NewNamespacesServiceHandler builds an HTTP handler from the service implementation. It returns
|
||||
// the path on which to mount the handler and the handler itself.
|
||||
//
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewNamespacesServiceHandler(svc NamespacesServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
namespacesServiceMethods := v1alpha2.File_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto.Services().ByName("NamespacesService").Methods()
|
||||
namespacesServiceListNamespacesHandler := connect.NewUnaryHandler(
|
||||
NamespacesServiceListNamespacesProcedure,
|
||||
svc.ListNamespaces,
|
||||
connect.WithSchema(namespacesServiceMethods.ByName("ListNamespaces")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/ory.keto.relation_tuples.v1alpha2.NamespacesService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case NamespacesServiceListNamespacesProcedure:
|
||||
namespacesServiceListNamespacesHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// UnimplementedNamespacesServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedNamespacesServiceHandler struct{}
|
||||
|
||||
func (UnimplementedNamespacesServiceHandler) ListNamespaces(context.Context, *connect.Request[v1alpha2.ListNamespacesRequest]) (*connect.Response[v1alpha2.ListNamespacesResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ory.keto.relation_tuples.v1alpha2.NamespacesService.ListNamespaces is not implemented"))
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: ory/keto/relation_tuples/v1alpha2/read_service.proto
|
||||
|
||||
package relationtuplesconnect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1alpha2 "github.com/ory/keto/gen/go/ory/keto/relation_tuples/v1alpha2"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
||||
// compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of connect or updating the connect
|
||||
// version compiled into your binary.
|
||||
const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// ReadServiceName is the fully-qualified name of the ReadService service.
|
||||
ReadServiceName = "ory.keto.relation_tuples.v1alpha2.ReadService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// ReadServiceListRelationTuplesProcedure is the fully-qualified name of the ReadService's
|
||||
// ListRelationTuples RPC.
|
||||
ReadServiceListRelationTuplesProcedure = "/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples"
|
||||
)
|
||||
|
||||
// ReadServiceClient is a client for the ory.keto.relation_tuples.v1alpha2.ReadService service.
|
||||
type ReadServiceClient interface {
|
||||
// Lists ACL relationships.
|
||||
ListRelationTuples(context.Context, *connect.Request[v1alpha2.ListRelationTuplesRequest]) (*connect.Response[v1alpha2.ListRelationTuplesResponse], error)
|
||||
}
|
||||
|
||||
// NewReadServiceClient constructs a client for the ory.keto.relation_tuples.v1alpha2.ReadService
|
||||
// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
|
||||
// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
|
||||
// the connect.WithGRPC() or connect.WithGRPCWeb() options.
|
||||
//
|
||||
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewReadServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ReadServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
readServiceMethods := v1alpha2.File_ory_keto_relation_tuples_v1alpha2_read_service_proto.Services().ByName("ReadService").Methods()
|
||||
return &readServiceClient{
|
||||
listRelationTuples: connect.NewClient[v1alpha2.ListRelationTuplesRequest, v1alpha2.ListRelationTuplesResponse](
|
||||
httpClient,
|
||||
baseURL+ReadServiceListRelationTuplesProcedure,
|
||||
connect.WithSchema(readServiceMethods.ByName("ListRelationTuples")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// readServiceClient implements ReadServiceClient.
|
||||
type readServiceClient struct {
|
||||
listRelationTuples *connect.Client[v1alpha2.ListRelationTuplesRequest, v1alpha2.ListRelationTuplesResponse]
|
||||
}
|
||||
|
||||
// ListRelationTuples calls ory.keto.relation_tuples.v1alpha2.ReadService.ListRelationTuples.
|
||||
func (c *readServiceClient) ListRelationTuples(ctx context.Context, req *connect.Request[v1alpha2.ListRelationTuplesRequest]) (*connect.Response[v1alpha2.ListRelationTuplesResponse], error) {
|
||||
return c.listRelationTuples.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// ReadServiceHandler is an implementation of the ory.keto.relation_tuples.v1alpha2.ReadService
|
||||
// service.
|
||||
type ReadServiceHandler interface {
|
||||
// Lists ACL relationships.
|
||||
ListRelationTuples(context.Context, *connect.Request[v1alpha2.ListRelationTuplesRequest]) (*connect.Response[v1alpha2.ListRelationTuplesResponse], error)
|
||||
}
|
||||
|
||||
// NewReadServiceHandler builds an HTTP handler from the service implementation. It returns the path
|
||||
// on which to mount the handler and the handler itself.
|
||||
//
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewReadServiceHandler(svc ReadServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
readServiceMethods := v1alpha2.File_ory_keto_relation_tuples_v1alpha2_read_service_proto.Services().ByName("ReadService").Methods()
|
||||
readServiceListRelationTuplesHandler := connect.NewUnaryHandler(
|
||||
ReadServiceListRelationTuplesProcedure,
|
||||
svc.ListRelationTuples,
|
||||
connect.WithSchema(readServiceMethods.ByName("ListRelationTuples")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/ory.keto.relation_tuples.v1alpha2.ReadService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case ReadServiceListRelationTuplesProcedure:
|
||||
readServiceListRelationTuplesHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// UnimplementedReadServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedReadServiceHandler struct{}
|
||||
|
||||
func (UnimplementedReadServiceHandler) ListRelationTuples(context.Context, *connect.Request[v1alpha2.ListRelationTuplesRequest]) (*connect.Response[v1alpha2.ListRelationTuplesResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ory.keto.relation_tuples.v1alpha2.ReadService.ListRelationTuples is not implemented"))
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: ory/keto/relation_tuples/v1alpha2/version.proto
|
||||
|
||||
package relationtuplesconnect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1alpha2 "github.com/ory/keto/gen/go/ory/keto/relation_tuples/v1alpha2"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
||||
// compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of connect or updating the connect
|
||||
// version compiled into your binary.
|
||||
const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// VersionServiceName is the fully-qualified name of the VersionService service.
|
||||
VersionServiceName = "ory.keto.relation_tuples.v1alpha2.VersionService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// VersionServiceGetVersionProcedure is the fully-qualified name of the VersionService's GetVersion
|
||||
// RPC.
|
||||
VersionServiceGetVersionProcedure = "/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion"
|
||||
)
|
||||
|
||||
// VersionServiceClient is a client for the ory.keto.relation_tuples.v1alpha2.VersionService
|
||||
// service.
|
||||
type VersionServiceClient interface {
|
||||
// Returns the version of the Ory Keto instance.
|
||||
GetVersion(context.Context, *connect.Request[v1alpha2.GetVersionRequest]) (*connect.Response[v1alpha2.GetVersionResponse], error)
|
||||
}
|
||||
|
||||
// NewVersionServiceClient constructs a client for the
|
||||
// ory.keto.relation_tuples.v1alpha2.VersionService service. By default, it uses the Connect
|
||||
// protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed
|
||||
// requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
|
||||
// connect.WithGRPCWeb() options.
|
||||
//
|
||||
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewVersionServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) VersionServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
versionServiceMethods := v1alpha2.File_ory_keto_relation_tuples_v1alpha2_version_proto.Services().ByName("VersionService").Methods()
|
||||
return &versionServiceClient{
|
||||
getVersion: connect.NewClient[v1alpha2.GetVersionRequest, v1alpha2.GetVersionResponse](
|
||||
httpClient,
|
||||
baseURL+VersionServiceGetVersionProcedure,
|
||||
connect.WithSchema(versionServiceMethods.ByName("GetVersion")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// versionServiceClient implements VersionServiceClient.
|
||||
type versionServiceClient struct {
|
||||
getVersion *connect.Client[v1alpha2.GetVersionRequest, v1alpha2.GetVersionResponse]
|
||||
}
|
||||
|
||||
// GetVersion calls ory.keto.relation_tuples.v1alpha2.VersionService.GetVersion.
|
||||
func (c *versionServiceClient) GetVersion(ctx context.Context, req *connect.Request[v1alpha2.GetVersionRequest]) (*connect.Response[v1alpha2.GetVersionResponse], error) {
|
||||
return c.getVersion.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// VersionServiceHandler is an implementation of the
|
||||
// ory.keto.relation_tuples.v1alpha2.VersionService service.
|
||||
type VersionServiceHandler interface {
|
||||
// Returns the version of the Ory Keto instance.
|
||||
GetVersion(context.Context, *connect.Request[v1alpha2.GetVersionRequest]) (*connect.Response[v1alpha2.GetVersionResponse], error)
|
||||
}
|
||||
|
||||
// NewVersionServiceHandler builds an HTTP handler from the service implementation. It returns the
|
||||
// path on which to mount the handler and the handler itself.
|
||||
//
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewVersionServiceHandler(svc VersionServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
versionServiceMethods := v1alpha2.File_ory_keto_relation_tuples_v1alpha2_version_proto.Services().ByName("VersionService").Methods()
|
||||
versionServiceGetVersionHandler := connect.NewUnaryHandler(
|
||||
VersionServiceGetVersionProcedure,
|
||||
svc.GetVersion,
|
||||
connect.WithSchema(versionServiceMethods.ByName("GetVersion")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/ory.keto.relation_tuples.v1alpha2.VersionService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case VersionServiceGetVersionProcedure:
|
||||
versionServiceGetVersionHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// UnimplementedVersionServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedVersionServiceHandler struct{}
|
||||
|
||||
func (UnimplementedVersionServiceHandler) GetVersion(context.Context, *connect.Request[v1alpha2.GetVersionRequest]) (*connect.Response[v1alpha2.GetVersionResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ory.keto.relation_tuples.v1alpha2.VersionService.GetVersion is not implemented"))
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: ory/keto/relation_tuples/v1alpha2/write_service.proto
|
||||
|
||||
package relationtuplesconnect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1alpha2 "github.com/ory/keto/gen/go/ory/keto/relation_tuples/v1alpha2"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
||||
// compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of connect or updating the connect
|
||||
// version compiled into your binary.
|
||||
const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// WriteServiceName is the fully-qualified name of the WriteService service.
|
||||
WriteServiceName = "ory.keto.relation_tuples.v1alpha2.WriteService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// WriteServiceTransactRelationTuplesProcedure is the fully-qualified name of the WriteService's
|
||||
// TransactRelationTuples RPC.
|
||||
WriteServiceTransactRelationTuplesProcedure = "/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples"
|
||||
// WriteServiceDeleteRelationTuplesProcedure is the fully-qualified name of the WriteService's
|
||||
// DeleteRelationTuples RPC.
|
||||
WriteServiceDeleteRelationTuplesProcedure = "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples"
|
||||
)
|
||||
|
||||
// WriteServiceClient is a client for the ory.keto.relation_tuples.v1alpha2.WriteService service.
|
||||
type WriteServiceClient interface {
|
||||
// Writes one or more relationships in a single transaction.
|
||||
TransactRelationTuples(context.Context, *connect.Request[v1alpha2.TransactRelationTuplesRequest]) (*connect.Response[v1alpha2.TransactRelationTuplesResponse], error)
|
||||
// Deletes relationships based on relation query
|
||||
DeleteRelationTuples(context.Context, *connect.Request[v1alpha2.DeleteRelationTuplesRequest]) (*connect.Response[v1alpha2.DeleteRelationTuplesResponse], error)
|
||||
}
|
||||
|
||||
// NewWriteServiceClient constructs a client for the ory.keto.relation_tuples.v1alpha2.WriteService
|
||||
// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
|
||||
// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
|
||||
// the connect.WithGRPC() or connect.WithGRPCWeb() options.
|
||||
//
|
||||
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewWriteServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) WriteServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
writeServiceMethods := v1alpha2.File_ory_keto_relation_tuples_v1alpha2_write_service_proto.Services().ByName("WriteService").Methods()
|
||||
return &writeServiceClient{
|
||||
transactRelationTuples: connect.NewClient[v1alpha2.TransactRelationTuplesRequest, v1alpha2.TransactRelationTuplesResponse](
|
||||
httpClient,
|
||||
baseURL+WriteServiceTransactRelationTuplesProcedure,
|
||||
connect.WithSchema(writeServiceMethods.ByName("TransactRelationTuples")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
deleteRelationTuples: connect.NewClient[v1alpha2.DeleteRelationTuplesRequest, v1alpha2.DeleteRelationTuplesResponse](
|
||||
httpClient,
|
||||
baseURL+WriteServiceDeleteRelationTuplesProcedure,
|
||||
connect.WithSchema(writeServiceMethods.ByName("DeleteRelationTuples")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// writeServiceClient implements WriteServiceClient.
|
||||
type writeServiceClient struct {
|
||||
transactRelationTuples *connect.Client[v1alpha2.TransactRelationTuplesRequest, v1alpha2.TransactRelationTuplesResponse]
|
||||
deleteRelationTuples *connect.Client[v1alpha2.DeleteRelationTuplesRequest, v1alpha2.DeleteRelationTuplesResponse]
|
||||
}
|
||||
|
||||
// TransactRelationTuples calls
|
||||
// ory.keto.relation_tuples.v1alpha2.WriteService.TransactRelationTuples.
|
||||
func (c *writeServiceClient) TransactRelationTuples(ctx context.Context, req *connect.Request[v1alpha2.TransactRelationTuplesRequest]) (*connect.Response[v1alpha2.TransactRelationTuplesResponse], error) {
|
||||
return c.transactRelationTuples.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// DeleteRelationTuples calls ory.keto.relation_tuples.v1alpha2.WriteService.DeleteRelationTuples.
|
||||
func (c *writeServiceClient) DeleteRelationTuples(ctx context.Context, req *connect.Request[v1alpha2.DeleteRelationTuplesRequest]) (*connect.Response[v1alpha2.DeleteRelationTuplesResponse], error) {
|
||||
return c.deleteRelationTuples.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// WriteServiceHandler is an implementation of the ory.keto.relation_tuples.v1alpha2.WriteService
|
||||
// service.
|
||||
type WriteServiceHandler interface {
|
||||
// Writes one or more relationships in a single transaction.
|
||||
TransactRelationTuples(context.Context, *connect.Request[v1alpha2.TransactRelationTuplesRequest]) (*connect.Response[v1alpha2.TransactRelationTuplesResponse], error)
|
||||
// Deletes relationships based on relation query
|
||||
DeleteRelationTuples(context.Context, *connect.Request[v1alpha2.DeleteRelationTuplesRequest]) (*connect.Response[v1alpha2.DeleteRelationTuplesResponse], error)
|
||||
}
|
||||
|
||||
// NewWriteServiceHandler builds an HTTP handler from the service implementation. It returns the
|
||||
// path on which to mount the handler and the handler itself.
|
||||
//
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewWriteServiceHandler(svc WriteServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
writeServiceMethods := v1alpha2.File_ory_keto_relation_tuples_v1alpha2_write_service_proto.Services().ByName("WriteService").Methods()
|
||||
writeServiceTransactRelationTuplesHandler := connect.NewUnaryHandler(
|
||||
WriteServiceTransactRelationTuplesProcedure,
|
||||
svc.TransactRelationTuples,
|
||||
connect.WithSchema(writeServiceMethods.ByName("TransactRelationTuples")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
writeServiceDeleteRelationTuplesHandler := connect.NewUnaryHandler(
|
||||
WriteServiceDeleteRelationTuplesProcedure,
|
||||
svc.DeleteRelationTuples,
|
||||
connect.WithSchema(writeServiceMethods.ByName("DeleteRelationTuples")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/ory.keto.relation_tuples.v1alpha2.WriteService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case WriteServiceTransactRelationTuplesProcedure:
|
||||
writeServiceTransactRelationTuplesHandler.ServeHTTP(w, r)
|
||||
case WriteServiceDeleteRelationTuplesProcedure:
|
||||
writeServiceDeleteRelationTuplesHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// UnimplementedWriteServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedWriteServiceHandler struct{}
|
||||
|
||||
func (UnimplementedWriteServiceHandler) TransactRelationTuples(context.Context, *connect.Request[v1alpha2.TransactRelationTuplesRequest]) (*connect.Response[v1alpha2.TransactRelationTuplesResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ory.keto.relation_tuples.v1alpha2.WriteService.TransactRelationTuples is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedWriteServiceHandler) DeleteRelationTuples(context.Context, *connect.Request[v1alpha2.DeleteRelationTuplesRequest]) (*connect.Response[v1alpha2.DeleteRelationTuplesResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ory.keto.relation_tuples.v1alpha2.WriteService.DeleteRelationTuples is not implemented"))
|
||||
}
|
||||
36
gen/go/ory/keto/relation_tuples/v1alpha2/utils.go
Normal file
36
gen/go/ory/keto/relation_tuples/v1alpha2/utils.go
Normal file
@@ -0,0 +1,36 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package relationtuples
|
||||
|
||||
// RelationTupleToDeltas is a helper that converts a slice of RelationTuple to a slice of RelationTupleDelta
|
||||
// with the specified RelationTupleDelta_Action. This allows you to conveniently assemble a request for the
|
||||
// WriteServiceClient.TransactRelationTuples operation.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// c.TransactRelationTuples(context.Background(), &rts.TransactRelationTuplesRequest{
|
||||
// RelationTupleDeltas: append(rts.RelationTupleToDeltas(insertTuples, rts.RelationTupleDelta_ACTION_INSERT), rts.RelationTupleToDeltas(deleteTuples, rts.RelationTupleDelta_ACTION_DELETE)...),
|
||||
// })
|
||||
func RelationTupleToDeltas(rs []*RelationTuple, action RelationTupleDelta_Action) []*RelationTupleDelta {
|
||||
deltas := make([]*RelationTupleDelta, len(rs))
|
||||
for i := range rs {
|
||||
deltas[i] = &RelationTupleDelta{
|
||||
RelationTuple: rs[i],
|
||||
Action: action,
|
||||
}
|
||||
}
|
||||
return deltas
|
||||
}
|
||||
|
||||
// NewSubjectSet returns a Subject with a SubjectSet ref.
|
||||
func NewSubjectSet(namespace, object, relation string) *Subject {
|
||||
return &Subject{Ref: &Subject_Set{Set: &SubjectSet{
|
||||
Namespace: namespace,
|
||||
Object: object,
|
||||
Relation: relation,
|
||||
}}}
|
||||
}
|
||||
|
||||
// NewSubjectID returns a Subject with a subject ID ref.
|
||||
func NewSubjectID(id string) *Subject { return &Subject{Ref: &Subject_Id{Id: id}} }
|
||||
67
gen/go/ory/keto/relation_tuples/v1alpha2/utils_test.go
Normal file
67
gen/go/ory/keto/relation_tuples/v1alpha2/utils_test.go
Normal file
@@ -0,0 +1,67 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package relationtuples
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestRelationTupleToDeltas(t *testing.T) {
|
||||
for _, tc := range []struct {
|
||||
desc string
|
||||
rts []*RelationTuple
|
||||
action RelationTupleDelta_Action
|
||||
expected []*RelationTupleDelta
|
||||
}{
|
||||
{
|
||||
desc: "empty list",
|
||||
rts: nil,
|
||||
action: RelationTupleDelta_ACTION_INSERT,
|
||||
expected: []*RelationTupleDelta{},
|
||||
},
|
||||
{
|
||||
desc: "some tuples",
|
||||
rts: []*RelationTuple{
|
||||
{
|
||||
Namespace: "n",
|
||||
Object: "o1",
|
||||
Relation: "r",
|
||||
Subject: NewSubjectID("s"),
|
||||
}, {
|
||||
Namespace: "n",
|
||||
Object: "o2",
|
||||
Relation: "r",
|
||||
Subject: NewSubjectSet("sn", "so", "sr"),
|
||||
},
|
||||
},
|
||||
action: RelationTupleDelta_ACTION_DELETE,
|
||||
expected: []*RelationTupleDelta{
|
||||
{
|
||||
RelationTuple: &RelationTuple{
|
||||
Namespace: "n",
|
||||
Object: "o1",
|
||||
Relation: "r",
|
||||
Subject: NewSubjectID("s"),
|
||||
},
|
||||
Action: RelationTupleDelta_ACTION_DELETE,
|
||||
},
|
||||
{
|
||||
RelationTuple: &RelationTuple{
|
||||
Namespace: "n",
|
||||
Object: "o2",
|
||||
Relation: "r",
|
||||
Subject: NewSubjectSet("sn", "so", "sr"),
|
||||
},
|
||||
Action: RelationTupleDelta_ACTION_DELETE,
|
||||
},
|
||||
},
|
||||
},
|
||||
} {
|
||||
t.Run("case="+tc.desc, func(t *testing.T) {
|
||||
assert.Equal(t, tc.expected, RelationTupleToDeltas(tc.rts, tc.action))
|
||||
})
|
||||
}
|
||||
}
|
||||
172
gen/go/ory/keto/relation_tuples/v1alpha2/version.pb.go
Normal file
172
gen/go/ory/keto/relation_tuples/v1alpha2/version.pb.go
Normal file
@@ -0,0 +1,172 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: ory/keto/relation_tuples/v1alpha2/version.proto
|
||||
|
||||
package relationtuples
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Request for the VersionService.GetVersion RPC.
|
||||
type GetVersionRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetVersionRequest) Reset() {
|
||||
*x = GetVersionRequest{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetVersionRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetVersionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetVersionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetVersionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetVersionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// Response of the VersionService.GetVersion RPC.
|
||||
type GetVersionResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The version string of the Ory Keto instance.
|
||||
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetVersionResponse) Reset() {
|
||||
*x = GetVersionResponse{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetVersionResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetVersionResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetVersionResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetVersionResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetVersionResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetVersionResponse) GetVersion() string {
|
||||
if x != nil {
|
||||
return x.Version
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_ory_keto_relation_tuples_v1alpha2_version_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"/ory/keto/relation_tuples/v1alpha2/version.proto\x12!ory.keto.relation_tuples.v1alpha2\"\x13\n" +
|
||||
"\x11GetVersionRequest\".\n" +
|
||||
"\x12GetVersionResponse\x12\x18\n" +
|
||||
"\aversion\x18\x01 \x01(\tR\aversion2\x8b\x01\n" +
|
||||
"\x0eVersionService\x12y\n" +
|
||||
"\n" +
|
||||
"GetVersion\x124.ory.keto.relation_tuples.v1alpha2.GetVersionRequest\x1a5.ory.keto.relation_tuples.v1alpha2.GetVersionResponseB\xa5\x02\n" +
|
||||
"%com.ory.keto.relation_tuples.v1alpha2B\fVersionProtoP\x01ZKgithub.com/ory/keto/gen/go/ory/keto/relation_tuples/v1alpha2;relationtuples\xa2\x02\x03OKR\xaa\x02 Ory.Keto.RelationTuples.V1alpha2\xca\x02 Ory\\Keto\\RelationTuples\\V1alpha2\xe2\x02,Ory\\Keto\\RelationTuples\\V1alpha2\\GPBMetadata\xea\x02#Ory::Keto::RelationTuples::V1alpha2b\x06proto3"
|
||||
|
||||
var (
|
||||
file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDescOnce sync.Once
|
||||
file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDescGZIP() []byte {
|
||||
file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDescOnce.Do(func() {
|
||||
file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDesc), len(file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDesc)))
|
||||
})
|
||||
return file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_ory_keto_relation_tuples_v1alpha2_version_proto_goTypes = []any{
|
||||
(*GetVersionRequest)(nil), // 0: ory.keto.relation_tuples.v1alpha2.GetVersionRequest
|
||||
(*GetVersionResponse)(nil), // 1: ory.keto.relation_tuples.v1alpha2.GetVersionResponse
|
||||
}
|
||||
var file_ory_keto_relation_tuples_v1alpha2_version_proto_depIdxs = []int32{
|
||||
0, // 0: ory.keto.relation_tuples.v1alpha2.VersionService.GetVersion:input_type -> ory.keto.relation_tuples.v1alpha2.GetVersionRequest
|
||||
1, // 1: ory.keto.relation_tuples.v1alpha2.VersionService.GetVersion:output_type -> ory.keto.relation_tuples.v1alpha2.GetVersionResponse
|
||||
1, // [1:2] is the sub-list for method output_type
|
||||
0, // [0:1] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_ory_keto_relation_tuples_v1alpha2_version_proto_init() }
|
||||
func file_ory_keto_relation_tuples_v1alpha2_version_proto_init() {
|
||||
if File_ory_keto_relation_tuples_v1alpha2_version_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDesc), len(file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_ory_keto_relation_tuples_v1alpha2_version_proto_goTypes,
|
||||
DependencyIndexes: file_ory_keto_relation_tuples_v1alpha2_version_proto_depIdxs,
|
||||
MessageInfos: file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes,
|
||||
}.Build()
|
||||
File_ory_keto_relation_tuples_v1alpha2_version_proto = out.File
|
||||
file_ory_keto_relation_tuples_v1alpha2_version_proto_goTypes = nil
|
||||
file_ory_keto_relation_tuples_v1alpha2_version_proto_depIdxs = nil
|
||||
}
|
||||
134
gen/go/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go
Normal file
134
gen/go/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go
Normal file
@@ -0,0 +1,134 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: ory/keto/relation_tuples/v1alpha2/version.proto
|
||||
|
||||
package relationtuples
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// 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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
VersionService_GetVersion_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion"
|
||||
)
|
||||
|
||||
// VersionServiceClient is the client API for VersionService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
//
|
||||
// The service returning the specific Ory Keto instance version.
|
||||
//
|
||||
// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis) and [write-APIs](../concepts/25_api-overview.mdx#write-apis).
|
||||
type VersionServiceClient interface {
|
||||
// Returns the version of the Ory Keto instance.
|
||||
GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error)
|
||||
}
|
||||
|
||||
type versionServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewVersionServiceClient(cc grpc.ClientConnInterface) VersionServiceClient {
|
||||
return &versionServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *versionServiceClient) GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetVersionResponse)
|
||||
err := c.cc.Invoke(ctx, VersionService_GetVersion_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// VersionServiceServer is the server API for VersionService service.
|
||||
// All implementations must embed UnimplementedVersionServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// The service returning the specific Ory Keto instance version.
|
||||
//
|
||||
// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis) and [write-APIs](../concepts/25_api-overview.mdx#write-apis).
|
||||
type VersionServiceServer interface {
|
||||
// Returns the version of the Ory Keto instance.
|
||||
GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error)
|
||||
mustEmbedUnimplementedVersionServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedVersionServiceServer 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 UnimplementedVersionServiceServer struct{}
|
||||
|
||||
func (UnimplementedVersionServiceServer) GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetVersion not implemented")
|
||||
}
|
||||
func (UnimplementedVersionServiceServer) mustEmbedUnimplementedVersionServiceServer() {}
|
||||
func (UnimplementedVersionServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeVersionServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to VersionServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeVersionServiceServer interface {
|
||||
mustEmbedUnimplementedVersionServiceServer()
|
||||
}
|
||||
|
||||
func RegisterVersionServiceServer(s grpc.ServiceRegistrar, srv VersionServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedVersionServiceServer 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(&VersionService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _VersionService_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetVersionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VersionServiceServer).GetVersion(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: VersionService_GetVersion_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VersionServiceServer).GetVersion(ctx, req.(*GetVersionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// VersionService_ServiceDesc is the grpc.ServiceDesc for VersionService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var VersionService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "ory.keto.relation_tuples.v1alpha2.VersionService",
|
||||
HandlerType: (*VersionServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetVersion",
|
||||
Handler: _VersionService_GetVersion_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "ory/keto/relation_tuples/v1alpha2/version.proto",
|
||||
}
|
||||
501
gen/go/ory/keto/relation_tuples/v1alpha2/write_service.pb.go
Normal file
501
gen/go/ory/keto/relation_tuples/v1alpha2/write_service.pb.go
Normal file
@@ -0,0 +1,501 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc (unknown)
|
||||
// source: ory/keto/relation_tuples/v1alpha2/write_service.proto
|
||||
|
||||
package relationtuples
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type RelationTupleDelta_Action int32
|
||||
|
||||
const (
|
||||
// Unspecified.
|
||||
// The `TransactRelationTuples` RPC ignores this
|
||||
// RelationTupleDelta if an action was unspecified.
|
||||
RelationTupleDelta_ACTION_UNSPECIFIED RelationTupleDelta_Action = 0
|
||||
// Insertion of a new RelationTuple.
|
||||
RelationTupleDelta_ACTION_INSERT RelationTupleDelta_Action = 1
|
||||
// Deletion of the RelationTuple.
|
||||
// It is ignored if it does not exist.
|
||||
RelationTupleDelta_ACTION_DELETE RelationTupleDelta_Action = 2
|
||||
)
|
||||
|
||||
// Enum value maps for RelationTupleDelta_Action.
|
||||
var (
|
||||
RelationTupleDelta_Action_name = map[int32]string{
|
||||
0: "ACTION_UNSPECIFIED",
|
||||
1: "ACTION_INSERT",
|
||||
2: "ACTION_DELETE",
|
||||
}
|
||||
RelationTupleDelta_Action_value = map[string]int32{
|
||||
"ACTION_UNSPECIFIED": 0,
|
||||
"ACTION_INSERT": 1,
|
||||
"ACTION_DELETE": 2,
|
||||
}
|
||||
)
|
||||
|
||||
func (x RelationTupleDelta_Action) Enum() *RelationTupleDelta_Action {
|
||||
p := new(RelationTupleDelta_Action)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x RelationTupleDelta_Action) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (RelationTupleDelta_Action) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (RelationTupleDelta_Action) Type() protoreflect.EnumType {
|
||||
return &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x RelationTupleDelta_Action) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RelationTupleDelta_Action.Descriptor instead.
|
||||
func (RelationTupleDelta_Action) EnumDescriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{1, 0}
|
||||
}
|
||||
|
||||
// The request of a WriteService.TransactRelationTuples RPC.
|
||||
type TransactRelationTuplesRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The write delta for the relationships operated in one single transaction.
|
||||
// Either all actions succeed or no change takes effect on error.
|
||||
RelationTupleDeltas []*RelationTupleDelta `protobuf:"bytes,1,rep,name=relation_tuple_deltas,json=relationTupleDeltas,proto3" json:"relation_tuple_deltas,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *TransactRelationTuplesRequest) Reset() {
|
||||
*x = TransactRelationTuplesRequest{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TransactRelationTuplesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TransactRelationTuplesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *TransactRelationTuplesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TransactRelationTuplesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*TransactRelationTuplesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *TransactRelationTuplesRequest) GetRelationTupleDeltas() []*RelationTupleDelta {
|
||||
if x != nil {
|
||||
return x.RelationTupleDeltas
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Write-delta for a TransactRelationTuplesRequest.
|
||||
type RelationTupleDelta struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The action to do on the RelationTuple.
|
||||
Action RelationTupleDelta_Action `protobuf:"varint,1,opt,name=action,proto3,enum=ory.keto.relation_tuples.v1alpha2.RelationTupleDelta_Action" json:"action,omitempty"`
|
||||
// The target RelationTuple.
|
||||
RelationTuple *RelationTuple `protobuf:"bytes,2,opt,name=relation_tuple,json=relationTuple,proto3" json:"relation_tuple,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RelationTupleDelta) Reset() {
|
||||
*x = RelationTupleDelta{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RelationTupleDelta) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RelationTupleDelta) ProtoMessage() {}
|
||||
|
||||
func (x *RelationTupleDelta) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RelationTupleDelta.ProtoReflect.Descriptor instead.
|
||||
func (*RelationTupleDelta) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *RelationTupleDelta) GetAction() RelationTupleDelta_Action {
|
||||
if x != nil {
|
||||
return x.Action
|
||||
}
|
||||
return RelationTupleDelta_ACTION_UNSPECIFIED
|
||||
}
|
||||
|
||||
func (x *RelationTupleDelta) GetRelationTuple() *RelationTuple {
|
||||
if x != nil {
|
||||
return x.RelationTuple
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// The response of a WriteService.TransactRelationTuples rpc.
|
||||
type TransactRelationTuplesResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// This field is not implemented yet and has no effect.
|
||||
// <!--
|
||||
// The list of the new latest snapshot tokens of the affected RelationTuple,
|
||||
// with the same index as specified in the `relation_tuple_deltas` field of
|
||||
// the TransactRelationTuplesRequest request.
|
||||
//
|
||||
// If the RelationTupleDelta_Action was DELETE
|
||||
// the snaptoken is empty at the same index.
|
||||
// -->
|
||||
Snaptokens []string `protobuf:"bytes,1,rep,name=snaptokens,proto3" json:"snaptokens,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *TransactRelationTuplesResponse) Reset() {
|
||||
*x = TransactRelationTuplesResponse{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TransactRelationTuplesResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TransactRelationTuplesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *TransactRelationTuplesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TransactRelationTuplesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*TransactRelationTuplesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *TransactRelationTuplesResponse) GetSnaptokens() []string {
|
||||
if x != nil {
|
||||
return x.Snaptokens
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteRelationTuplesRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto.
|
||||
Query *DeleteRelationTuplesRequest_Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
|
||||
RelationQuery *RelationQuery `protobuf:"bytes,2,opt,name=relation_query,json=relationQuery,proto3" json:"relation_query,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteRelationTuplesRequest) Reset() {
|
||||
*x = DeleteRelationTuplesRequest{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteRelationTuplesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteRelationTuplesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteRelationTuplesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteRelationTuplesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteRelationTuplesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto.
|
||||
func (x *DeleteRelationTuplesRequest) GetQuery() *DeleteRelationTuplesRequest_Query {
|
||||
if x != nil {
|
||||
return x.Query
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DeleteRelationTuplesRequest) GetRelationQuery() *RelationQuery {
|
||||
if x != nil {
|
||||
return x.RelationQuery
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteRelationTuplesResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteRelationTuplesResponse) Reset() {
|
||||
*x = DeleteRelationTuplesResponse{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteRelationTuplesResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteRelationTuplesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteRelationTuplesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteRelationTuplesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteRelationTuplesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
// The query for deleting relationships
|
||||
type DeleteRelationTuplesRequest_Query struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// Optional. The namespace to query.
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
// Optional. The object to query for.
|
||||
Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
|
||||
// Optional. The relation to query for.
|
||||
Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"`
|
||||
// Optional. The subject to query for.
|
||||
Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteRelationTuplesRequest_Query) Reset() {
|
||||
*x = DeleteRelationTuplesRequest_Query{}
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteRelationTuplesRequest_Query) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteRelationTuplesRequest_Query) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteRelationTuplesRequest_Query) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteRelationTuplesRequest_Query.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteRelationTuplesRequest_Query) Descriptor() ([]byte, []int) {
|
||||
return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{3, 0}
|
||||
}
|
||||
|
||||
func (x *DeleteRelationTuplesRequest_Query) GetNamespace() string {
|
||||
if x != nil {
|
||||
return x.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DeleteRelationTuplesRequest_Query) GetObject() string {
|
||||
if x != nil {
|
||||
return x.Object
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DeleteRelationTuplesRequest_Query) GetRelation() string {
|
||||
if x != nil {
|
||||
return x.Relation
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DeleteRelationTuplesRequest_Query) GetSubject() *Subject {
|
||||
if x != nil {
|
||||
return x.Subject
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_ory_keto_relation_tuples_v1alpha2_write_service_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"5ory/keto/relation_tuples/v1alpha2/write_service.proto\x12!ory.keto.relation_tuples.v1alpha2\x1a7ory/keto/relation_tuples/v1alpha2/relation_tuples.proto\"\x8a\x01\n" +
|
||||
"\x1dTransactRelationTuplesRequest\x12i\n" +
|
||||
"\x15relation_tuple_deltas\x18\x01 \x03(\v25.ory.keto.relation_tuples.v1alpha2.RelationTupleDeltaR\x13relationTupleDeltas\"\x8b\x02\n" +
|
||||
"\x12RelationTupleDelta\x12T\n" +
|
||||
"\x06action\x18\x01 \x01(\x0e2<.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.ActionR\x06action\x12W\n" +
|
||||
"\x0erelation_tuple\x18\x02 \x01(\v20.ory.keto.relation_tuples.v1alpha2.RelationTupleR\rrelationTuple\"F\n" +
|
||||
"\x06Action\x12\x16\n" +
|
||||
"\x12ACTION_UNSPECIFIED\x10\x00\x12\x11\n" +
|
||||
"\rACTION_INSERT\x10\x01\x12\x11\n" +
|
||||
"\rACTION_DELETE\x10\x02\"@\n" +
|
||||
"\x1eTransactRelationTuplesResponse\x12\x1e\n" +
|
||||
"\n" +
|
||||
"snaptokens\x18\x01 \x03(\tR\n" +
|
||||
"snaptokens\"\xf8\x02\n" +
|
||||
"\x1bDeleteRelationTuplesRequest\x12^\n" +
|
||||
"\x05query\x18\x01 \x01(\v2D.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.QueryB\x02\x18\x01R\x05query\x12W\n" +
|
||||
"\x0erelation_query\x18\x02 \x01(\v20.ory.keto.relation_tuples.v1alpha2.RelationQueryR\rrelationQuery\x1a\x9f\x01\n" +
|
||||
"\x05Query\x12\x1c\n" +
|
||||
"\tnamespace\x18\x01 \x01(\tR\tnamespace\x12\x16\n" +
|
||||
"\x06object\x18\x02 \x01(\tR\x06object\x12\x1a\n" +
|
||||
"\brelation\x18\x03 \x01(\tR\brelation\x12D\n" +
|
||||
"\asubject\x18\x04 \x01(\v2*.ory.keto.relation_tuples.v1alpha2.SubjectR\asubject\"\x1e\n" +
|
||||
"\x1cDeleteRelationTuplesResponse2\xc8\x02\n" +
|
||||
"\fWriteService\x12\x9d\x01\n" +
|
||||
"\x16TransactRelationTuples\x12@.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest\x1aA.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse\x12\x97\x01\n" +
|
||||
"\x14DeleteRelationTuples\x12>.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest\x1a?.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponseB\xaa\x02\n" +
|
||||
"%com.ory.keto.relation_tuples.v1alpha2B\x11WriteServiceProtoP\x01ZKgithub.com/ory/keto/gen/go/ory/keto/relation_tuples/v1alpha2;relationtuples\xa2\x02\x03OKR\xaa\x02 Ory.Keto.RelationTuples.V1alpha2\xca\x02 Ory\\Keto\\RelationTuples\\V1alpha2\xe2\x02,Ory\\Keto\\RelationTuples\\V1alpha2\\GPBMetadata\xea\x02#Ory::Keto::RelationTuples::V1alpha2b\x06proto3"
|
||||
|
||||
var (
|
||||
file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescOnce sync.Once
|
||||
file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP() []byte {
|
||||
file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescOnce.Do(func() {
|
||||
file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDesc), len(file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDesc)))
|
||||
})
|
||||
return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_goTypes = []any{
|
||||
(RelationTupleDelta_Action)(0), // 0: ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action
|
||||
(*TransactRelationTuplesRequest)(nil), // 1: ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest
|
||||
(*RelationTupleDelta)(nil), // 2: ory.keto.relation_tuples.v1alpha2.RelationTupleDelta
|
||||
(*TransactRelationTuplesResponse)(nil), // 3: ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse
|
||||
(*DeleteRelationTuplesRequest)(nil), // 4: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest
|
||||
(*DeleteRelationTuplesResponse)(nil), // 5: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse
|
||||
(*DeleteRelationTuplesRequest_Query)(nil), // 6: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query
|
||||
(*RelationTuple)(nil), // 7: ory.keto.relation_tuples.v1alpha2.RelationTuple
|
||||
(*RelationQuery)(nil), // 8: ory.keto.relation_tuples.v1alpha2.RelationQuery
|
||||
(*Subject)(nil), // 9: ory.keto.relation_tuples.v1alpha2.Subject
|
||||
}
|
||||
var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_depIdxs = []int32{
|
||||
2, // 0: ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.relation_tuple_deltas:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTupleDelta
|
||||
0, // 1: ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.action:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action
|
||||
7, // 2: ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.relation_tuple:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTuple
|
||||
6, // 3: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.query:type_name -> ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query
|
||||
8, // 4: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.relation_query:type_name -> ory.keto.relation_tuples.v1alpha2.RelationQuery
|
||||
9, // 5: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject
|
||||
1, // 6: ory.keto.relation_tuples.v1alpha2.WriteService.TransactRelationTuples:input_type -> ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest
|
||||
4, // 7: ory.keto.relation_tuples.v1alpha2.WriteService.DeleteRelationTuples:input_type -> ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest
|
||||
3, // 8: ory.keto.relation_tuples.v1alpha2.WriteService.TransactRelationTuples:output_type -> ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse
|
||||
5, // 9: ory.keto.relation_tuples.v1alpha2.WriteService.DeleteRelationTuples:output_type -> ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse
|
||||
8, // [8:10] is the sub-list for method output_type
|
||||
6, // [6:8] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() }
|
||||
func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() {
|
||||
if File_ory_keto_relation_tuples_v1alpha2_write_service_proto != nil {
|
||||
return
|
||||
}
|
||||
file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDesc), len(file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDesc)),
|
||||
NumEnums: 1,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_ory_keto_relation_tuples_v1alpha2_write_service_proto_goTypes,
|
||||
DependencyIndexes: file_ory_keto_relation_tuples_v1alpha2_write_service_proto_depIdxs,
|
||||
EnumInfos: file_ory_keto_relation_tuples_v1alpha2_write_service_proto_enumTypes,
|
||||
MessageInfos: file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_ory_keto_relation_tuples_v1alpha2_write_service_proto = out.File
|
||||
file_ory_keto_relation_tuples_v1alpha2_write_service_proto_goTypes = nil
|
||||
file_ory_keto_relation_tuples_v1alpha2_write_service_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc (unknown)
|
||||
// source: ory/keto/relation_tuples/v1alpha2/write_service.proto
|
||||
|
||||
package relationtuples
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// 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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
WriteService_TransactRelationTuples_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples"
|
||||
WriteService_DeleteRelationTuples_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples"
|
||||
)
|
||||
|
||||
// WriteServiceClient is the client API for WriteService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
//
|
||||
// The write service to create and delete Access Control Lists.
|
||||
//
|
||||
// This service is part of the [write-APIs](../concepts/25_api-overview.mdx#write-apis).
|
||||
type WriteServiceClient interface {
|
||||
// Writes one or more relationships in a single transaction.
|
||||
TransactRelationTuples(ctx context.Context, in *TransactRelationTuplesRequest, opts ...grpc.CallOption) (*TransactRelationTuplesResponse, error)
|
||||
// Deletes relationships based on relation query
|
||||
DeleteRelationTuples(ctx context.Context, in *DeleteRelationTuplesRequest, opts ...grpc.CallOption) (*DeleteRelationTuplesResponse, error)
|
||||
}
|
||||
|
||||
type writeServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewWriteServiceClient(cc grpc.ClientConnInterface) WriteServiceClient {
|
||||
return &writeServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *writeServiceClient) TransactRelationTuples(ctx context.Context, in *TransactRelationTuplesRequest, opts ...grpc.CallOption) (*TransactRelationTuplesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(TransactRelationTuplesResponse)
|
||||
err := c.cc.Invoke(ctx, WriteService_TransactRelationTuples_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *writeServiceClient) DeleteRelationTuples(ctx context.Context, in *DeleteRelationTuplesRequest, opts ...grpc.CallOption) (*DeleteRelationTuplesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DeleteRelationTuplesResponse)
|
||||
err := c.cc.Invoke(ctx, WriteService_DeleteRelationTuples_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// WriteServiceServer is the server API for WriteService service.
|
||||
// All implementations must embed UnimplementedWriteServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// The write service to create and delete Access Control Lists.
|
||||
//
|
||||
// This service is part of the [write-APIs](../concepts/25_api-overview.mdx#write-apis).
|
||||
type WriteServiceServer interface {
|
||||
// Writes one or more relationships in a single transaction.
|
||||
TransactRelationTuples(context.Context, *TransactRelationTuplesRequest) (*TransactRelationTuplesResponse, error)
|
||||
// Deletes relationships based on relation query
|
||||
DeleteRelationTuples(context.Context, *DeleteRelationTuplesRequest) (*DeleteRelationTuplesResponse, error)
|
||||
mustEmbedUnimplementedWriteServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedWriteServiceServer 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 UnimplementedWriteServiceServer struct{}
|
||||
|
||||
func (UnimplementedWriteServiceServer) TransactRelationTuples(context.Context, *TransactRelationTuplesRequest) (*TransactRelationTuplesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method TransactRelationTuples not implemented")
|
||||
}
|
||||
func (UnimplementedWriteServiceServer) DeleteRelationTuples(context.Context, *DeleteRelationTuplesRequest) (*DeleteRelationTuplesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DeleteRelationTuples not implemented")
|
||||
}
|
||||
func (UnimplementedWriteServiceServer) mustEmbedUnimplementedWriteServiceServer() {}
|
||||
func (UnimplementedWriteServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeWriteServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to WriteServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeWriteServiceServer interface {
|
||||
mustEmbedUnimplementedWriteServiceServer()
|
||||
}
|
||||
|
||||
func RegisterWriteServiceServer(s grpc.ServiceRegistrar, srv WriteServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedWriteServiceServer 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(&WriteService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _WriteService_TransactRelationTuples_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(TransactRelationTuplesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WriteServiceServer).TransactRelationTuples(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WriteService_TransactRelationTuples_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WriteServiceServer).TransactRelationTuples(ctx, req.(*TransactRelationTuplesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WriteService_DeleteRelationTuples_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteRelationTuplesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WriteServiceServer).DeleteRelationTuples(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WriteService_DeleteRelationTuples_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WriteServiceServer).DeleteRelationTuples(ctx, req.(*DeleteRelationTuplesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// WriteService_ServiceDesc is the grpc.ServiceDesc for WriteService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var WriteService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "ory.keto.relation_tuples.v1alpha2.WriteService",
|
||||
HandlerType: (*WriteServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "TransactRelationTuples",
|
||||
Handler: _WriteService_TransactRelationTuples_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteRelationTuples",
|
||||
Handler: _WriteService_DeleteRelationTuples_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "ory/keto/relation_tuples/v1alpha2/write_service.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user