From 7f983d689785151d7c02b43b31fbf792fdd7a742 Mon Sep 17 00:00:00 2001 From: zepatrik Date: Sat, 26 Mar 2022 11:35:52 +0200 Subject: [PATCH 1/3] refactor: API paths This change refactors the API paths to be consistent with the rest of the Ory ecosystem. This step is required for the unified Ory SDK. Additionally, as we plan to add high level APIs, e.g. for RBAC, the check and expand API paths changed to allow adding those. BREAKING CHANGE: `/check` is now `/acl/check` BREAKING CHANGE: `/expand` is now `/acl/expand` BREAKING CHANGE: `/relation-tuples` is now `/admin/relation-tuples` for write APIs --- README.md | 6 +- internal/check/handler.go | 6 +- internal/driver/daemon.go | 2 +- internal/e2e/full_suit_test.go | 2 +- internal/e2e/rest_client_test.go | 10 +- internal/expand/handler.go | 4 +- internal/httpclient-next/README.md | 12 +- internal/httpclient-next/api/openapi.yaml | 253 ++++++------ internal/httpclient-next/api_read.go | 6 +- internal/httpclient-next/api_write.go | 6 +- internal/httpclient-next/docs/ReadApi.md | 6 +- internal/httpclient-next/docs/WriteApi.md | 6 +- .../client/read/get_check_responses.go | 8 +- .../client/read/get_expand_responses.go | 8 +- .../client/read/post_check_responses.go | 8 +- .../httpclient/client/read/read_client.go | 6 +- .../write/create_relation_tuple_responses.go | 6 +- .../write/delete_relation_tuples_responses.go | 6 +- .../write/patch_relation_tuples_responses.go | 8 +- .../httpclient/client/write/write_client.go | 6 +- internal/relationtuple/handler.go | 11 +- internal/relationtuple/read_server_test.go | 14 +- internal/relationtuple/transact_server.go | 8 +- .../relationtuple/transact_server_test.go | 18 +- spec/api.json | 380 +++++++++--------- spec/swagger.json | 234 +++++------ 26 files changed, 523 insertions(+), 517 deletions(-) diff --git a/README.md b/README.md index f2c803ecc..d44be1868 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,9 @@ for your colleagues, and much more! ### :mega: Community gets Ory Cloud for Free! :mega: -Ory community members get the Ory Cloud Start Up plan **free for six months**, with -all quality-of-life features available, such as custom domains and giving your -team members access. +Ory community members get the Ory Cloud Start Up plan **free for six months**, +with all quality-of-life features available, such as custom domains and giving +your team members access. [Sign up with your GitHub account](https://console.ory.sh/registration?preferred_plan=start-up&utm_source=github&utm_medium=banner&utm_campaign=keto-readme-first900) and use the coupon code **`FIRST900`** on the _"Start-Up Plan"_ checkout page to claim your free project now! Make sure to be signed up to the diff --git a/internal/check/handler.go b/internal/check/handler.go index f37376f83..65da1106e 100644 --- a/internal/check/handler.go +++ b/internal/check/handler.go @@ -36,7 +36,7 @@ func NewHandler(d handlerDependencies) *Handler { return &Handler{d: d} } -const RouteBase = "/check" +const RouteBase = "/acl/check" func (h *Handler) RegisterReadRoutes(r *x.ReadRouter) { r.GET(RouteBase, h.getCheck) @@ -70,7 +70,7 @@ type getCheckRequest struct { MaxDepth int `json:"max-depth"` } -// swagger:route GET /check read getCheck +// swagger:route GET /acl/check read getCheck // // Check a relation tuple // @@ -119,7 +119,7 @@ func (h *Handler) getCheck(w http.ResponseWriter, r *http.Request, _ httprouter. h.d.Writer().WriteCode(w, r, http.StatusForbidden, &RESTResponse{Allowed: false}) } -// swagger:route POST /check read postCheck +// swagger:route POST /acl/check read postCheck // // Check a relation tuple // diff --git a/internal/driver/daemon.go b/internal/driver/daemon.go index ab72cd87b..3e60c8639 100644 --- a/internal/driver/daemon.go +++ b/internal/driver/daemon.go @@ -63,7 +63,7 @@ func (r *RegistryDefault) enableSqa(cmd *cobra.Command) { healthx.ReadyCheckPath, healthx.VersionPath, - relationtuple.RouteBase, + relationtuple.ReadRouteBase, check.RouteBase, expand.RouteBase, }, diff --git a/internal/e2e/full_suit_test.go b/internal/e2e/full_suit_test.go index 5e86231bc..4b424f069 100644 --- a/internal/e2e/full_suit_test.go +++ b/internal/e2e/full_suit_test.go @@ -124,7 +124,7 @@ func TestServeConfig(t *testing.T) { time.Sleep(10 * time.Millisecond) } - req, err := http.NewRequest(http.MethodOptions, "http://"+reg.Config(ctx).ReadAPIListenOn()+relationtuple.RouteBase, nil) + req, err := http.NewRequest(http.MethodOptions, "http://"+reg.Config(ctx).ReadAPIListenOn()+relationtuple.ReadRouteBase, nil) require.NoError(t, err) req.Header.Set("Origin", "https://ory.sh") resp, err := http.DefaultClient.Do(req) diff --git a/internal/e2e/rest_client_test.go b/internal/e2e/rest_client_test.go index 9d2e2717b..122b70ebe 100644 --- a/internal/e2e/rest_client_test.go +++ b/internal/e2e/rest_client_test.go @@ -58,19 +58,19 @@ func (rc *restClient) createTuple(t require.TestingT, r *relationtuple.InternalR tEnc, err := json.Marshal(r) require.NoError(t, err) - body, code := rc.makeRequest(t, http.MethodPut, relationtuple.RouteBase, string(tEnc), true) + body, code := rc.makeRequest(t, http.MethodPut, relationtuple.WriteRouteBase, string(tEnc), true) assert.Equal(t, http.StatusCreated, code, body) } func (rc *restClient) deleteTuple(t require.TestingT, r *relationtuple.InternalRelationTuple) { q, err := r.ToURLQuery() require.NoError(t, err) - body, code := rc.makeRequest(t, http.MethodDelete, relationtuple.RouteBase+"?"+q.Encode(), "", true) + body, code := rc.makeRequest(t, http.MethodDelete, relationtuple.WriteRouteBase+"?"+q.Encode(), "", true) require.Equal(t, http.StatusNoContent, code, body) } func (rc restClient) deleteAllTuples(t require.TestingT, q *relationtuple.RelationQuery) { - body, code := rc.makeRequest(t, http.MethodDelete, relationtuple.RouteBase+"?"+q.ToURLQuery().Encode(), "", true) + body, code := rc.makeRequest(t, http.MethodDelete, relationtuple.WriteRouteBase+"?"+q.ToURLQuery().Encode(), "", true) require.Equal(t, http.StatusNoContent, code, body) } @@ -85,7 +85,7 @@ func (rc *restClient) queryTuple(t require.TestingT, q *relationtuple.RelationQu urlQuery.Set("page_token", pagination.Token) } - body, code := rc.makeRequest(t, http.MethodGet, fmt.Sprintf("%s?%s", relationtuple.RouteBase, urlQuery.Encode()), "", false) + body, code := rc.makeRequest(t, http.MethodGet, fmt.Sprintf("%s?%s", relationtuple.ReadRouteBase, urlQuery.Encode()), "", false) require.Equal(t, http.StatusOK, code, body) var dec relationtuple.GetResponse @@ -105,7 +105,7 @@ func (rc *restClient) queryTupleErr(t require.TestingT, expected herodot.Default urlQuery.Set("page_token", pagination.Token) } - body, code := rc.makeRequest(t, http.MethodGet, fmt.Sprintf("%s?%s", relationtuple.RouteBase, urlQuery.Encode()), "", false) + body, code := rc.makeRequest(t, http.MethodGet, fmt.Sprintf("%s?%s", relationtuple.ReadRouteBase, urlQuery.Encode()), "", false) assert.Equal(t, expected.CodeField, code) assert.Equal(t, int64(expected.StatusCode()), gjson.Get(body, "error.code").Int()) diff --git a/internal/expand/handler.go b/internal/expand/handler.go index 0ee6e2baf..112fca3a3 100644 --- a/internal/expand/handler.go +++ b/internal/expand/handler.go @@ -30,7 +30,7 @@ type ( var _ acl.ExpandServiceServer = (*handler)(nil) -const RouteBase = "/expand" +const RouteBase = "/acl/expand" func NewHandler(d handlerDependencies) *handler { return &handler{d: d} @@ -55,7 +55,7 @@ type getExpandRequest struct { MaxDepth int `json:"max-depth"` } -// swagger:route GET /expand read getExpand +// swagger:route GET /acl/expand read getExpand // // Expand a Relation Tuple // diff --git a/internal/httpclient-next/README.md b/internal/httpclient-next/README.md index 56815df84..2274a3a59 100644 --- a/internal/httpclient-next/README.md +++ b/internal/httpclient-next/README.md @@ -82,13 +82,13 @@ Class | Method | HTTP request | Description *MetadataApi* | [**GetVersion**](docs/MetadataApi.md#getversion) | **Get** /version | Return Running Software Version. *MetadataApi* | [**IsAlive**](docs/MetadataApi.md#isalive) | **Get** /health/alive | Check HTTP Server Status *MetadataApi* | [**IsReady**](docs/MetadataApi.md#isready) | **Get** /health/ready | Check HTTP Server and Database Status -*ReadApi* | [**GetCheck**](docs/ReadApi.md#getcheck) | **Get** /check | Check a relation tuple -*ReadApi* | [**GetExpand**](docs/ReadApi.md#getexpand) | **Get** /expand | Expand a Relation Tuple +*ReadApi* | [**GetCheck**](docs/ReadApi.md#getcheck) | **Get** /acl/check | Check a relation tuple +*ReadApi* | [**GetExpand**](docs/ReadApi.md#getexpand) | **Get** /acl/expand | Expand a Relation Tuple *ReadApi* | [**GetRelationTuples**](docs/ReadApi.md#getrelationtuples) | **Get** /relation-tuples | Query relation tuples -*ReadApi* | [**PostCheck**](docs/ReadApi.md#postcheck) | **Post** /check | Check a relation tuple -*WriteApi* | [**CreateRelationTuple**](docs/WriteApi.md#createrelationtuple) | **Put** /relation-tuples | Create a Relation Tuple -*WriteApi* | [**DeleteRelationTuples**](docs/WriteApi.md#deleterelationtuples) | **Delete** /relation-tuples | Delete Relation Tuples -*WriteApi* | [**PatchRelationTuples**](docs/WriteApi.md#patchrelationtuples) | **Patch** /relation-tuples | Patch Multiple Relation Tuples +*ReadApi* | [**PostCheck**](docs/ReadApi.md#postcheck) | **Post** /acl/check | Check a relation tuple +*WriteApi* | [**CreateRelationTuple**](docs/WriteApi.md#createrelationtuple) | **Put** /admin/relation-tuples | Create a Relation Tuple +*WriteApi* | [**DeleteRelationTuples**](docs/WriteApi.md#deleterelationtuples) | **Delete** /admin/relation-tuples | Delete Relation Tuples +*WriteApi* | [**PatchRelationTuples**](docs/WriteApi.md#patchrelationtuples) | **Patch** /admin/relation-tuples | Patch Multiple Relation Tuples ## Documentation For Models diff --git a/internal/httpclient-next/api/openapi.yaml b/internal/httpclient-next/api/openapi.yaml index b7de3ef9f..0888938cc 100644 --- a/internal/httpclient-next/api/openapi.yaml +++ b/internal/httpclient-next/api/openapi.yaml @@ -10,7 +10,7 @@ info: servers: - url: / paths: - /check: + /acl/check: get: description: To learn how relation tuples and the check works, head over to [the documentation](../concepts/relation-tuples.mdx). @@ -155,7 +155,7 @@ paths: summary: Check a relation tuple tags: - read - /expand: + /acl/expand: get: description: Use this endpoint to expand a relation tuple. operationId: getExpand @@ -220,63 +220,7 @@ paths: summary: Expand a Relation Tuple tags: - read - /health/alive: - get: - description: |- - This endpoint returns a HTTP 200 status code when Ory Keto is accepting incoming - HTTP requests. This status does currently not include checks whether the database connection is working. - - If the service supports TLS Edge Termination, this endpoint does not require the - `X-Forwarded-Proto` header to be set. - - Be aware that if you are running multiple nodes of this service, the health status will never - refer to the cluster state, only to a single instance. - operationId: isAlive - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_200' - description: Ory Keto is ready to accept connections. - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Check HTTP Server Status - tags: - - metadata - /health/ready: - get: - description: |- - This endpoint returns a HTTP 200 status code when Ory Keto is up running and the environment dependencies (e.g. - the database) are responsive as well. - - If the service supports TLS Edge Termination, this endpoint does not require the - `X-Forwarded-Proto` header to be set. - - Be aware that if you are running multiple nodes of Ory Keto, the health status will never - refer to the cluster state, only to a single instance. - operationId: isReady - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_200' - description: Ory Keto is ready to accept requests. - "503": - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_503' - description: Ory Kratos is not yet ready to accept requests. - summary: Check HTTP Server and Database Status - tags: - - metadata - /relation-tuples: + /admin/relation-tuples: delete: description: Use this endpoint to delete relation tuples operationId: deleteRelationTuples @@ -356,6 +300,130 @@ paths: summary: Delete Relation Tuples tags: - write + patch: + description: Use this endpoint to patch one or more relation tuples. + operationId: patchRelationTuples + requestBody: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/PatchDelta' + type: array + x-originalParamName: Payload + responses: + "204": + description: Empty responses are sent when, for example, resources are deleted. + The HTTP status code for empty responses is typically 201. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Patch Multiple Relation Tuples + tags: + - write + put: + description: Use this endpoint to create a relation tuple. + operationId: createRelationTuple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RelationQuery' + x-originalParamName: Payload + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/RelationQuery' + description: RelationQuery + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Create a Relation Tuple + tags: + - write + /health/alive: + get: + description: |- + This endpoint returns a HTTP 200 status code when Ory Keto is accepting incoming + HTTP requests. This status does currently not include checks whether the database connection is working. + + If the service supports TLS Edge Termination, this endpoint does not require the + `X-Forwarded-Proto` header to be set. + + Be aware that if you are running multiple nodes of this service, the health status will never + refer to the cluster state, only to a single instance. + operationId: isAlive + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200' + description: Ory Keto is ready to accept connections. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Check HTTP Server Status + tags: + - metadata + /health/ready: + get: + description: |- + This endpoint returns a HTTP 200 status code when Ory Keto is up running and the environment dependencies (e.g. + the database) are responsive as well. + + If the service supports TLS Edge Termination, this endpoint does not require the + `X-Forwarded-Proto` header to be set. + + Be aware that if you are running multiple nodes of Ory Keto, the health status will never + refer to the cluster state, only to a single instance. + operationId: isReady + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200' + description: Ory Keto is ready to accept requests. + "503": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_503' + description: Ory Kratos is not yet ready to accept requests. + summary: Check HTTP Server and Database Status + tags: + - metadata + /relation-tuples: get: description: Get all relation tuples that match the query. Only the namespace field is required. @@ -454,73 +522,6 @@ paths: summary: Query relation tuples tags: - read - patch: - description: Use this endpoint to patch one or more relation tuples. - operationId: patchRelationTuples - requestBody: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/PatchDelta' - type: array - x-originalParamName: Payload - responses: - "204": - description: Empty responses are sent when, for example, resources are deleted. - The HTTP status code for empty responses is typically 201. - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Patch Multiple Relation Tuples - tags: - - write - put: - description: Use this endpoint to create a relation tuple. - operationId: createRelationTuple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RelationQuery' - x-originalParamName: Payload - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/RelationQuery' - description: RelationQuery - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Create a Relation Tuple - tags: - - write /version: get: description: |- diff --git a/internal/httpclient-next/api_read.go b/internal/httpclient-next/api_read.go index 866a38f9a..c404c2a75 100644 --- a/internal/httpclient-next/api_read.go +++ b/internal/httpclient-next/api_read.go @@ -168,7 +168,7 @@ func (a *ReadApiService) GetCheckExecute(r ReadApiApiGetCheckRequest) (*GetCheck return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/check" + localVarPath := localBasePath + "/acl/check" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -343,7 +343,7 @@ func (a *ReadApiService) GetExpandExecute(r ReadApiApiGetExpandRequest) (*Expand return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/expand" + localVarPath := localBasePath + "/acl/expand" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -692,7 +692,7 @@ func (a *ReadApiService) PostCheckExecute(r ReadApiApiPostCheckRequest) (*GetChe return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/check" + localVarPath := localBasePath + "/acl/check" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/internal/httpclient-next/api_write.go b/internal/httpclient-next/api_write.go index efadde7d9..3e6183f50 100644 --- a/internal/httpclient-next/api_write.go +++ b/internal/httpclient-next/api_write.go @@ -117,7 +117,7 @@ func (a *WriteApiService) CreateRelationTupleExecute(r WriteApiApiCreateRelation return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/relation-tuples" + localVarPath := localBasePath + "/admin/relation-tuples" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -273,7 +273,7 @@ func (a *WriteApiService) DeleteRelationTuplesExecute(r WriteApiApiDeleteRelatio return nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/relation-tuples" + localVarPath := localBasePath + "/admin/relation-tuples" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -409,7 +409,7 @@ func (a *WriteApiService) PatchRelationTuplesExecute(r WriteApiApiPatchRelationT return nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/relation-tuples" + localVarPath := localBasePath + "/admin/relation-tuples" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/internal/httpclient-next/docs/ReadApi.md b/internal/httpclient-next/docs/ReadApi.md index 765a26f0d..45e0ee57f 100644 --- a/internal/httpclient-next/docs/ReadApi.md +++ b/internal/httpclient-next/docs/ReadApi.md @@ -4,10 +4,10 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetCheck**](ReadApi.md#GetCheck) | **Get** /check | Check a relation tuple -[**GetExpand**](ReadApi.md#GetExpand) | **Get** /expand | Expand a Relation Tuple +[**GetCheck**](ReadApi.md#GetCheck) | **Get** /acl/check | Check a relation tuple +[**GetExpand**](ReadApi.md#GetExpand) | **Get** /acl/expand | Expand a Relation Tuple [**GetRelationTuples**](ReadApi.md#GetRelationTuples) | **Get** /relation-tuples | Query relation tuples -[**PostCheck**](ReadApi.md#PostCheck) | **Post** /check | Check a relation tuple +[**PostCheck**](ReadApi.md#PostCheck) | **Post** /acl/check | Check a relation tuple diff --git a/internal/httpclient-next/docs/WriteApi.md b/internal/httpclient-next/docs/WriteApi.md index 226a94346..1115b05a8 100644 --- a/internal/httpclient-next/docs/WriteApi.md +++ b/internal/httpclient-next/docs/WriteApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateRelationTuple**](WriteApi.md#CreateRelationTuple) | **Put** /relation-tuples | Create a Relation Tuple -[**DeleteRelationTuples**](WriteApi.md#DeleteRelationTuples) | **Delete** /relation-tuples | Delete Relation Tuples -[**PatchRelationTuples**](WriteApi.md#PatchRelationTuples) | **Patch** /relation-tuples | Patch Multiple Relation Tuples +[**CreateRelationTuple**](WriteApi.md#CreateRelationTuple) | **Put** /admin/relation-tuples | Create a Relation Tuple +[**DeleteRelationTuples**](WriteApi.md#DeleteRelationTuples) | **Delete** /admin/relation-tuples | Delete Relation Tuples +[**PatchRelationTuples**](WriteApi.md#PatchRelationTuples) | **Patch** /admin/relation-tuples | Patch Multiple Relation Tuples diff --git a/internal/httpclient/client/read/get_check_responses.go b/internal/httpclient/client/read/get_check_responses.go index ef3973c78..aace82caf 100644 --- a/internal/httpclient/client/read/get_check_responses.go +++ b/internal/httpclient/client/read/get_check_responses.go @@ -66,7 +66,7 @@ type GetCheckOK struct { } func (o *GetCheckOK) Error() string { - return fmt.Sprintf("[GET /check][%d] getCheckOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /acl/check][%d] getCheckOK %+v", 200, o.Payload) } func (o *GetCheckOK) GetPayload() *models.GetCheckResponse { return o.Payload @@ -98,7 +98,7 @@ type GetCheckBadRequest struct { } func (o *GetCheckBadRequest) Error() string { - return fmt.Sprintf("[GET /check][%d] getCheckBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[GET /acl/check][%d] getCheckBadRequest %+v", 400, o.Payload) } func (o *GetCheckBadRequest) GetPayload() *models.GenericError { return o.Payload @@ -130,7 +130,7 @@ type GetCheckForbidden struct { } func (o *GetCheckForbidden) Error() string { - return fmt.Sprintf("[GET /check][%d] getCheckForbidden %+v", 403, o.Payload) + return fmt.Sprintf("[GET /acl/check][%d] getCheckForbidden %+v", 403, o.Payload) } func (o *GetCheckForbidden) GetPayload() *models.GetCheckResponse { return o.Payload @@ -162,7 +162,7 @@ type GetCheckInternalServerError struct { } func (o *GetCheckInternalServerError) Error() string { - return fmt.Sprintf("[GET /check][%d] getCheckInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[GET /acl/check][%d] getCheckInternalServerError %+v", 500, o.Payload) } func (o *GetCheckInternalServerError) GetPayload() *models.GenericError { return o.Payload diff --git a/internal/httpclient/client/read/get_expand_responses.go b/internal/httpclient/client/read/get_expand_responses.go index e855a248b..8d760abbc 100644 --- a/internal/httpclient/client/read/get_expand_responses.go +++ b/internal/httpclient/client/read/get_expand_responses.go @@ -66,7 +66,7 @@ type GetExpandOK struct { } func (o *GetExpandOK) Error() string { - return fmt.Sprintf("[GET /expand][%d] getExpandOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /acl/expand][%d] getExpandOK %+v", 200, o.Payload) } func (o *GetExpandOK) GetPayload() *models.ExpandTree { return o.Payload @@ -98,7 +98,7 @@ type GetExpandBadRequest struct { } func (o *GetExpandBadRequest) Error() string { - return fmt.Sprintf("[GET /expand][%d] getExpandBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[GET /acl/expand][%d] getExpandBadRequest %+v", 400, o.Payload) } func (o *GetExpandBadRequest) GetPayload() *models.GenericError { return o.Payload @@ -130,7 +130,7 @@ type GetExpandNotFound struct { } func (o *GetExpandNotFound) Error() string { - return fmt.Sprintf("[GET /expand][%d] getExpandNotFound %+v", 404, o.Payload) + return fmt.Sprintf("[GET /acl/expand][%d] getExpandNotFound %+v", 404, o.Payload) } func (o *GetExpandNotFound) GetPayload() *models.GenericError { return o.Payload @@ -162,7 +162,7 @@ type GetExpandInternalServerError struct { } func (o *GetExpandInternalServerError) Error() string { - return fmt.Sprintf("[GET /expand][%d] getExpandInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[GET /acl/expand][%d] getExpandInternalServerError %+v", 500, o.Payload) } func (o *GetExpandInternalServerError) GetPayload() *models.GenericError { return o.Payload diff --git a/internal/httpclient/client/read/post_check_responses.go b/internal/httpclient/client/read/post_check_responses.go index d53346e91..a1929fab8 100644 --- a/internal/httpclient/client/read/post_check_responses.go +++ b/internal/httpclient/client/read/post_check_responses.go @@ -66,7 +66,7 @@ type PostCheckOK struct { } func (o *PostCheckOK) Error() string { - return fmt.Sprintf("[POST /check][%d] postCheckOK %+v", 200, o.Payload) + return fmt.Sprintf("[POST /acl/check][%d] postCheckOK %+v", 200, o.Payload) } func (o *PostCheckOK) GetPayload() *models.GetCheckResponse { return o.Payload @@ -98,7 +98,7 @@ type PostCheckBadRequest struct { } func (o *PostCheckBadRequest) Error() string { - return fmt.Sprintf("[POST /check][%d] postCheckBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[POST /acl/check][%d] postCheckBadRequest %+v", 400, o.Payload) } func (o *PostCheckBadRequest) GetPayload() *models.GenericError { return o.Payload @@ -130,7 +130,7 @@ type PostCheckForbidden struct { } func (o *PostCheckForbidden) Error() string { - return fmt.Sprintf("[POST /check][%d] postCheckForbidden %+v", 403, o.Payload) + return fmt.Sprintf("[POST /acl/check][%d] postCheckForbidden %+v", 403, o.Payload) } func (o *PostCheckForbidden) GetPayload() *models.GetCheckResponse { return o.Payload @@ -162,7 +162,7 @@ type PostCheckInternalServerError struct { } func (o *PostCheckInternalServerError) Error() string { - return fmt.Sprintf("[POST /check][%d] postCheckInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[POST /acl/check][%d] postCheckInternalServerError %+v", 500, o.Payload) } func (o *PostCheckInternalServerError) GetPayload() *models.GenericError { return o.Payload diff --git a/internal/httpclient/client/read/read_client.go b/internal/httpclient/client/read/read_client.go index 0d5516086..825ad6733 100644 --- a/internal/httpclient/client/read/read_client.go +++ b/internal/httpclient/client/read/read_client.go @@ -54,7 +54,7 @@ func (a *Client) GetCheck(params *GetCheckParams, opts ...ClientOption) (*GetChe op := &runtime.ClientOperation{ ID: "getCheck", Method: "GET", - PathPattern: "/check", + PathPattern: "/acl/check", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/x-www-form-urlencoded"}, Schemes: []string{"http", "https"}, @@ -94,7 +94,7 @@ func (a *Client) GetExpand(params *GetExpandParams, opts ...ClientOption) (*GetE op := &runtime.ClientOperation{ ID: "getExpand", Method: "GET", - PathPattern: "/expand", + PathPattern: "/acl/expand", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/x-www-form-urlencoded"}, Schemes: []string{"http", "https"}, @@ -174,7 +174,7 @@ func (a *Client) PostCheck(params *PostCheckParams, opts ...ClientOption) (*Post op := &runtime.ClientOperation{ ID: "postCheck", Method: "POST", - PathPattern: "/check", + PathPattern: "/acl/check", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, diff --git a/internal/httpclient/client/write/create_relation_tuple_responses.go b/internal/httpclient/client/write/create_relation_tuple_responses.go index ec5593f17..6068c2a9b 100644 --- a/internal/httpclient/client/write/create_relation_tuple_responses.go +++ b/internal/httpclient/client/write/create_relation_tuple_responses.go @@ -60,7 +60,7 @@ type CreateRelationTupleCreated struct { } func (o *CreateRelationTupleCreated) Error() string { - return fmt.Sprintf("[PUT /relation-tuples][%d] createRelationTupleCreated %+v", 201, o.Payload) + return fmt.Sprintf("[PUT /admin/relation-tuples][%d] createRelationTupleCreated %+v", 201, o.Payload) } func (o *CreateRelationTupleCreated) GetPayload() *models.RelationQuery { return o.Payload @@ -92,7 +92,7 @@ type CreateRelationTupleBadRequest struct { } func (o *CreateRelationTupleBadRequest) Error() string { - return fmt.Sprintf("[PUT /relation-tuples][%d] createRelationTupleBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[PUT /admin/relation-tuples][%d] createRelationTupleBadRequest %+v", 400, o.Payload) } func (o *CreateRelationTupleBadRequest) GetPayload() *models.GenericError { return o.Payload @@ -124,7 +124,7 @@ type CreateRelationTupleInternalServerError struct { } func (o *CreateRelationTupleInternalServerError) Error() string { - return fmt.Sprintf("[PUT /relation-tuples][%d] createRelationTupleInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[PUT /admin/relation-tuples][%d] createRelationTupleInternalServerError %+v", 500, o.Payload) } func (o *CreateRelationTupleInternalServerError) GetPayload() *models.GenericError { return o.Payload diff --git a/internal/httpclient/client/write/delete_relation_tuples_responses.go b/internal/httpclient/client/write/delete_relation_tuples_responses.go index 9e30f997e..b271c74bb 100644 --- a/internal/httpclient/client/write/delete_relation_tuples_responses.go +++ b/internal/httpclient/client/write/delete_relation_tuples_responses.go @@ -59,7 +59,7 @@ type DeleteRelationTuplesNoContent struct { } func (o *DeleteRelationTuplesNoContent) Error() string { - return fmt.Sprintf("[DELETE /relation-tuples][%d] deleteRelationTuplesNoContent ", 204) + return fmt.Sprintf("[DELETE /admin/relation-tuples][%d] deleteRelationTuplesNoContent ", 204) } func (o *DeleteRelationTuplesNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -81,7 +81,7 @@ type DeleteRelationTuplesBadRequest struct { } func (o *DeleteRelationTuplesBadRequest) Error() string { - return fmt.Sprintf("[DELETE /relation-tuples][%d] deleteRelationTuplesBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[DELETE /admin/relation-tuples][%d] deleteRelationTuplesBadRequest %+v", 400, o.Payload) } func (o *DeleteRelationTuplesBadRequest) GetPayload() *models.GenericError { return o.Payload @@ -113,7 +113,7 @@ type DeleteRelationTuplesInternalServerError struct { } func (o *DeleteRelationTuplesInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /relation-tuples][%d] deleteRelationTuplesInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[DELETE /admin/relation-tuples][%d] deleteRelationTuplesInternalServerError %+v", 500, o.Payload) } func (o *DeleteRelationTuplesInternalServerError) GetPayload() *models.GenericError { return o.Payload diff --git a/internal/httpclient/client/write/patch_relation_tuples_responses.go b/internal/httpclient/client/write/patch_relation_tuples_responses.go index b14e10bd3..5bea532a3 100644 --- a/internal/httpclient/client/write/patch_relation_tuples_responses.go +++ b/internal/httpclient/client/write/patch_relation_tuples_responses.go @@ -65,7 +65,7 @@ type PatchRelationTuplesNoContent struct { } func (o *PatchRelationTuplesNoContent) Error() string { - return fmt.Sprintf("[PATCH /relation-tuples][%d] patchRelationTuplesNoContent ", 204) + return fmt.Sprintf("[PATCH /admin/relation-tuples][%d] patchRelationTuplesNoContent ", 204) } func (o *PatchRelationTuplesNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -87,7 +87,7 @@ type PatchRelationTuplesBadRequest struct { } func (o *PatchRelationTuplesBadRequest) Error() string { - return fmt.Sprintf("[PATCH /relation-tuples][%d] patchRelationTuplesBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[PATCH /admin/relation-tuples][%d] patchRelationTuplesBadRequest %+v", 400, o.Payload) } func (o *PatchRelationTuplesBadRequest) GetPayload() *models.GenericError { return o.Payload @@ -119,7 +119,7 @@ type PatchRelationTuplesNotFound struct { } func (o *PatchRelationTuplesNotFound) Error() string { - return fmt.Sprintf("[PATCH /relation-tuples][%d] patchRelationTuplesNotFound %+v", 404, o.Payload) + return fmt.Sprintf("[PATCH /admin/relation-tuples][%d] patchRelationTuplesNotFound %+v", 404, o.Payload) } func (o *PatchRelationTuplesNotFound) GetPayload() *models.GenericError { return o.Payload @@ -151,7 +151,7 @@ type PatchRelationTuplesInternalServerError struct { } func (o *PatchRelationTuplesInternalServerError) Error() string { - return fmt.Sprintf("[PATCH /relation-tuples][%d] patchRelationTuplesInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[PATCH /admin/relation-tuples][%d] patchRelationTuplesInternalServerError %+v", 500, o.Payload) } func (o *PatchRelationTuplesInternalServerError) GetPayload() *models.GenericError { return o.Payload diff --git a/internal/httpclient/client/write/write_client.go b/internal/httpclient/client/write/write_client.go index 2b09da22c..b1fa046bb 100644 --- a/internal/httpclient/client/write/write_client.go +++ b/internal/httpclient/client/write/write_client.go @@ -52,7 +52,7 @@ func (a *Client) CreateRelationTuple(params *CreateRelationTupleParams, opts ... op := &runtime.ClientOperation{ ID: "createRelationTuple", Method: "PUT", - PathPattern: "/relation-tuples", + PathPattern: "/admin/relation-tuples", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -92,7 +92,7 @@ func (a *Client) DeleteRelationTuples(params *DeleteRelationTuplesParams, opts . op := &runtime.ClientOperation{ ID: "deleteRelationTuples", Method: "DELETE", - PathPattern: "/relation-tuples", + PathPattern: "/admin/relation-tuples", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/x-www-form-urlencoded"}, Schemes: []string{"http", "https"}, @@ -132,7 +132,7 @@ func (a *Client) PatchRelationTuples(params *PatchRelationTuplesParams, opts ... op := &runtime.ClientOperation{ ID: "patchRelationTuples", Method: "PATCH", - PathPattern: "/relation-tuples", + PathPattern: "/admin/relation-tuples", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, diff --git a/internal/relationtuple/handler.go b/internal/relationtuple/handler.go index 5f6a05e46..989a7b009 100644 --- a/internal/relationtuple/handler.go +++ b/internal/relationtuple/handler.go @@ -29,7 +29,8 @@ type GetResponse struct { } const ( - RouteBase = "/relation-tuples" + ReadRouteBase = "/relation-tuples" + WriteRouteBase = "/admin/relation-tuples" ) func NewHandler(d handlerDeps) *handler { @@ -39,13 +40,13 @@ func NewHandler(d handlerDeps) *handler { } func (h *handler) RegisterReadRoutes(r *x.ReadRouter) { - r.GET(RouteBase, h.getRelations) + r.GET(ReadRouteBase, h.getRelations) } func (h *handler) RegisterWriteRoutes(r *x.WriteRouter) { - r.PUT(RouteBase, h.createRelation) - r.DELETE(RouteBase, h.deleteRelations) - r.PATCH(RouteBase, h.patchRelations) + r.PUT(WriteRouteBase, h.createRelation) + r.DELETE(WriteRouteBase, h.deleteRelations) + r.PATCH(WriteRouteBase, h.patchRelations) } func (h *handler) RegisterReadGRPC(s *grpc.Server) { diff --git a/internal/relationtuple/read_server_test.go b/internal/relationtuple/read_server_test.go index b0bc32d73..e772ea019 100644 --- a/internal/relationtuple/read_server_test.go +++ b/internal/relationtuple/read_server_test.go @@ -35,7 +35,7 @@ func TestReadHandlers(t *testing.T) { t.Run("method=get", func(t *testing.T) { t.Run("case=empty response is not nil", func(t *testing.T) { - resp, err := ts.Client().Get(ts.URL + relationtuple.RouteBase + "?" + url.Values{ + resp, err := ts.Client().Get(ts.URL + relationtuple.ReadRouteBase + "?" + url.Values{ "namespace": {nspace.Name}, }.Encode()) require.NoError(t, err) @@ -77,7 +77,7 @@ func TestReadHandlers(t *testing.T) { require.NoError(t, reg.RelationTupleManager().WriteRelationTuples(context.Background(), rts...)) - resp, err := ts.Client().Get(ts.URL + relationtuple.RouteBase + "?" + url.Values{ + resp, err := ts.Client().Get(ts.URL + relationtuple.ReadRouteBase + "?" + url.Values{ "namespace": {nspace.Name}, }.Encode()) require.NoError(t, err) @@ -105,7 +105,7 @@ func TestReadHandlers(t *testing.T) { require.NoError(t, reg.RelationTupleManager().WriteRelationTuples(context.Background(), rts...)) - resp, err := ts.Client().Get(ts.URL + relationtuple.RouteBase + "?" + url.Values{ + resp, err := ts.Client().Get(ts.URL + relationtuple.ReadRouteBase + "?" + url.Values{ "object": {obj}, }.Encode()) require.NoError(t, err) @@ -119,7 +119,7 @@ func TestReadHandlers(t *testing.T) { }) t.Run("case=returns bad request on malformed subject", func(t *testing.T) { - resp, err := ts.Client().Get(ts.URL + relationtuple.RouteBase + "?" + url.Values{ + resp, err := ts.Client().Get(ts.URL + relationtuple.ReadRouteBase + "?" + url.Values{ "subject": {"not#a valid subject"}, }.Encode()) require.NoError(t, err) @@ -149,7 +149,7 @@ func TestReadHandlers(t *testing.T) { var firstResp relationtuple.GetResponse t.Run("case=first page", func(t *testing.T) { - resp, err := ts.Client().Get(ts.URL + relationtuple.RouteBase + "?" + url.Values{ + resp, err := ts.Client().Get(ts.URL + relationtuple.ReadRouteBase + "?" + url.Values{ "namespace": {nspace.Name}, "object": {obj}, "page_size": {"1"}, @@ -164,7 +164,7 @@ func TestReadHandlers(t *testing.T) { }) t.Run("case=second page", func(t *testing.T) { - resp, err := ts.Client().Get(ts.URL + relationtuple.RouteBase + "?" + url.Values{ + resp, err := ts.Client().Get(ts.URL + relationtuple.ReadRouteBase + "?" + url.Values{ "namespace": {nspace.Name}, "object": {obj}, "page_size": {"1"}, @@ -184,7 +184,7 @@ func TestReadHandlers(t *testing.T) { }) t.Run("case=returs bad request on invalid page size", func(t *testing.T) { - resp, err := ts.Client().Get(ts.URL + relationtuple.RouteBase + "?" + url.Values{ + resp, err := ts.Client().Get(ts.URL + relationtuple.ReadRouteBase + "?" + url.Values{ "page_size": {"foo"}, }.Encode()) require.NoError(t, err) diff --git a/internal/relationtuple/transact_server.go b/internal/relationtuple/transact_server.go index 902200c30..729f6f57a 100644 --- a/internal/relationtuple/transact_server.go +++ b/internal/relationtuple/transact_server.go @@ -123,7 +123,7 @@ type queryRelationTuple struct { SRelation string `json:"subject_set.relation"` } -// swagger:route PUT /relation-tuples write createRelationTuple +// swagger:route PUT /admin/relation-tuples write createRelationTuple // // Create a Relation Tuple // @@ -163,10 +163,10 @@ func (h *handler) createRelation(w http.ResponseWriter, r *http.Request, _ httpr return } - h.d.Writer().WriteCreated(w, r, RouteBase+"?"+q.Encode(), &rel) + h.d.Writer().WriteCreated(w, r, ReadRouteBase+"?"+q.Encode(), &rel) } -// swagger:route DELETE /relation-tuples write deleteRelationTuples +// swagger:route DELETE /admin/relation-tuples write deleteRelationTuples // // Delete Relation Tuples // @@ -216,7 +216,7 @@ func internalTuplesWithAction(deltas []*PatchDelta, action patchAction) (filtere return } -// swagger:route PATCH /relation-tuples write patchRelationTuples +// swagger:route PATCH /admin/relation-tuples write patchRelationTuples // // Patch Multiple Relation Tuples // diff --git a/internal/relationtuple/transact_server_test.go b/internal/relationtuple/transact_server_test.go index 19e420187..921e509c6 100644 --- a/internal/relationtuple/transact_server_test.go +++ b/internal/relationtuple/transact_server_test.go @@ -50,7 +50,7 @@ func TestWriteHandlers(t *testing.T) { t.Run("method=create", func(t *testing.T) { doCreate := func(raw []byte) *http.Response { - req, err := http.NewRequest(http.MethodPut, ts.URL+relationtuple.RouteBase, bytes.NewBuffer(raw)) + req, err := http.NewRequest(http.MethodPut, ts.URL+relationtuple.WriteRouteBase, bytes.NewBuffer(raw)) require.NoError(t, err) resp, err := ts.Client().Do(req) require.NoError(t, err) @@ -158,7 +158,7 @@ func TestWriteHandlers(t *testing.T) { q, err := rt.ToURLQuery() require.NoError(t, err) - req, err := http.NewRequest(http.MethodDelete, ts.URL+relationtuple.RouteBase+"?"+q.Encode(), nil) + req, err := http.NewRequest(http.MethodDelete, ts.URL+relationtuple.WriteRouteBase+"?"+q.Encode(), nil) require.NoError(t, err) resp, err := ts.Client().Do(req) require.NoError(t, err) @@ -195,7 +195,7 @@ func TestWriteHandlers(t *testing.T) { "object": {"deleted obj"}, "relation": {"deleted rel"}, } - req, err := http.NewRequest(http.MethodDelete, ts.URL+relationtuple.RouteBase+"?"+q.Encode(), nil) + req, err := http.NewRequest(http.MethodDelete, ts.URL+relationtuple.WriteRouteBase+"?"+q.Encode(), nil) require.NoError(t, err) resp, err := ts.Client().Do(req) require.NoError(t, err) @@ -238,7 +238,7 @@ func TestWriteHandlers(t *testing.T) { body, err := json.Marshal(deltas) require.NoError(t, err) - req, err := http.NewRequest(http.MethodPatch, ts.URL+relationtuple.RouteBase, bytes.NewBuffer(body)) + req, err := http.NewRequest(http.MethodPatch, ts.URL+relationtuple.WriteRouteBase, bytes.NewBuffer(body)) require.NoError(t, err) resp, err := ts.Client().Do(req) require.NoError(t, err) @@ -278,7 +278,7 @@ func TestWriteHandlers(t *testing.T) { body, err := json.Marshal(deltas) require.NoError(t, err) - req, err := http.NewRequest(http.MethodPatch, ts.URL+relationtuple.RouteBase, bytes.NewBuffer(body)) + req, err := http.NewRequest(http.MethodPatch, ts.URL+relationtuple.WriteRouteBase, bytes.NewBuffer(body)) require.NoError(t, err) resp, err := ts.Client().Do(req) require.NoError(t, err) @@ -307,7 +307,7 @@ func TestWriteHandlers(t *testing.T) { body, err := json.Marshal(deltas) require.NoError(t, err) - req, err := http.NewRequest(http.MethodPatch, ts.URL+relationtuple.RouteBase, bytes.NewBuffer(body)) + req, err := http.NewRequest(http.MethodPatch, ts.URL+relationtuple.WriteRouteBase, bytes.NewBuffer(body)) require.NoError(t, err) resp, err := ts.Client().Do(req) require.NoError(t, err) @@ -337,7 +337,7 @@ func TestWriteHandlers(t *testing.T) { body, err := json.Marshal(deltas) require.NoError(t, err) - req, err := http.NewRequest(http.MethodPatch, ts.URL+relationtuple.RouteBase, bytes.NewBuffer(body)) + req, err := http.NewRequest(http.MethodPatch, ts.URL+relationtuple.WriteRouteBase, bytes.NewBuffer(body)) require.NoError(t, err) resp, err := ts.Client().Do(req) require.NoError(t, err) @@ -361,7 +361,7 @@ func TestWriteHandlers(t *testing.T) { "subject":"role:company-admin" } ]` - req, err := http.NewRequest(http.MethodPatch, ts.URL+relationtuple.RouteBase, bytes.NewBufferString(rawJSON)) + req, err := http.NewRequest(http.MethodPatch, ts.URL+relationtuple.WriteRouteBase, bytes.NewBufferString(rawJSON)) require.NoError(t, err) resp, err := ts.Client().Do(req) require.NoError(t, err) @@ -386,7 +386,7 @@ func TestWriteHandlers(t *testing.T) { } } ]` - req, err := http.NewRequest(http.MethodPatch, ts.URL+relationtuple.RouteBase, bytes.NewBufferString(rawJSON)) + req, err := http.NewRequest(http.MethodPatch, ts.URL+relationtuple.WriteRouteBase, bytes.NewBufferString(rawJSON)) require.NoError(t, err) resp, err := ts.Client().Do(req) require.NoError(t, err) diff --git a/spec/api.json b/spec/api.json index d5ff69492..d5ccfd718 100755 --- a/spec/api.json +++ b/spec/api.json @@ -215,7 +215,7 @@ }, "openapi": "3.0.3", "paths": { - "/check": { + "/acl/check": { "get": { "description": "To learn how relation tuples and the check works, head over to [the documentation](../concepts/relation-tuples.mdx).", "operationId": "getCheck", @@ -399,7 +399,7 @@ "tags": ["read"] } }, - "/expand": { + "/acl/expand": { "get": { "description": "Use this endpoint to expand a relation tuple.", "operationId": "getExpand", @@ -486,91 +486,7 @@ "tags": ["read"] } }, - "/health/alive": { - "get": { - "description": "This endpoint returns a HTTP 200 status code when Ory Keto is accepting incoming\nHTTP requests. This status does currently not include checks whether the database connection is working.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.", - "operationId": "isAlive", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "description": "Always \"ok\".", - "type": "string" - } - }, - "required": ["status"], - "type": "object" - } - } - }, - "description": "Ory Keto is ready to accept connections." - }, - "500": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/genericError" - } - } - }, - "description": "genericError" - } - }, - "summary": "Check HTTP Server Status", - "tags": ["metadata"] - } - }, - "/health/ready": { - "get": { - "description": "This endpoint returns a HTTP 200 status code when Ory Keto is up running and the environment dependencies (e.g.\nthe database) are responsive as well.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of Ory Keto, the health status will never\nrefer to the cluster state, only to a single instance.", - "operationId": "isReady", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "description": "Always \"ok\".", - "type": "string" - } - }, - "required": ["status"], - "type": "object" - } - } - }, - "description": "Ory Keto is ready to accept requests." - }, - "503": { - "content": { - "application/json": { - "schema": { - "properties": { - "errors": { - "additionalProperties": { - "type": "string" - }, - "description": "Errors contains a list of errors that caused the not ready status.", - "type": "object" - } - }, - "required": ["errors"], - "type": "object" - } - } - }, - "description": "Ory Kratos is not yet ready to accept requests." - } - }, - "summary": "Check HTTP Server and Database Status", - "tags": ["metadata"] - } - }, - "/relation-tuples": { + "/admin/relation-tuples": { "delete": { "description": "Use this endpoint to delete relation tuples", "operationId": "deleteRelationTuples", @@ -660,6 +576,194 @@ "summary": "Delete Relation Tuples", "tags": ["write"] }, + "patch": { + "description": "Use this endpoint to patch one or more relation tuples.", + "operationId": "patchRelationTuples", + "requestBody": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PatchDelta" + }, + "type": "array" + } + } + }, + "x-originalParamName": "Payload" + }, + "responses": { + "204": { + "$ref": "#/components/responses/emptyResponse" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genericError" + } + } + }, + "description": "genericError" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genericError" + } + } + }, + "description": "genericError" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genericError" + } + } + }, + "description": "genericError" + } + }, + "summary": "Patch Multiple Relation Tuples", + "tags": ["write"] + }, + "put": { + "description": "Use this endpoint to create a relation tuple.", + "operationId": "createRelationTuple", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RelationQuery" + } + } + }, + "x-originalParamName": "Payload" + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RelationQuery" + } + } + }, + "description": "RelationQuery" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genericError" + } + } + }, + "description": "genericError" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genericError" + } + } + }, + "description": "genericError" + } + }, + "summary": "Create a Relation Tuple", + "tags": ["write"] + } + }, + "/health/alive": { + "get": { + "description": "This endpoint returns a HTTP 200 status code when Ory Keto is accepting incoming\nHTTP requests. This status does currently not include checks whether the database connection is working.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.", + "operationId": "isAlive", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "description": "Always \"ok\".", + "type": "string" + } + }, + "required": ["status"], + "type": "object" + } + } + }, + "description": "Ory Keto is ready to accept connections." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genericError" + } + } + }, + "description": "genericError" + } + }, + "summary": "Check HTTP Server Status", + "tags": ["metadata"] + } + }, + "/health/ready": { + "get": { + "description": "This endpoint returns a HTTP 200 status code when Ory Keto is up running and the environment dependencies (e.g.\nthe database) are responsive as well.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of Ory Keto, the health status will never\nrefer to the cluster state, only to a single instance.", + "operationId": "isReady", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "description": "Always \"ok\".", + "type": "string" + } + }, + "required": ["status"], + "type": "object" + } + } + }, + "description": "Ory Keto is ready to accept requests." + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "errors": { + "additionalProperties": { + "type": "string" + }, + "description": "Errors contains a list of errors that caused the not ready status.", + "type": "object" + } + }, + "required": ["errors"], + "type": "object" + } + } + }, + "description": "Ory Kratos is not yet ready to accept requests." + } + }, + "summary": "Check HTTP Server and Database Status", + "tags": ["metadata"] + } + }, + "/relation-tuples": { "get": { "description": "Get all relation tuples that match the query. Only the namespace field is required.", "operationId": "getRelationTuples", @@ -770,108 +874,6 @@ }, "summary": "Query relation tuples", "tags": ["read"] - }, - "patch": { - "description": "Use this endpoint to patch one or more relation tuples.", - "operationId": "patchRelationTuples", - "requestBody": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/PatchDelta" - }, - "type": "array" - } - } - }, - "x-originalParamName": "Payload" - }, - "responses": { - "204": { - "$ref": "#/components/responses/emptyResponse" - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/genericError" - } - } - }, - "description": "genericError" - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/genericError" - } - } - }, - "description": "genericError" - }, - "500": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/genericError" - } - } - }, - "description": "genericError" - } - }, - "summary": "Patch Multiple Relation Tuples", - "tags": ["write"] - }, - "put": { - "description": "Use this endpoint to create a relation tuple.", - "operationId": "createRelationTuple", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RelationQuery" - } - } - }, - "x-originalParamName": "Payload" - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RelationQuery" - } - } - }, - "description": "RelationQuery" - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/genericError" - } - } - }, - "description": "genericError" - }, - "500": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/genericError" - } - } - }, - "description": "genericError" - } - }, - "summary": "Create a Relation Tuple", - "tags": ["write"] } }, "/version": { diff --git a/spec/swagger.json b/spec/swagger.json index a856ce333..4810ae72a 100755 --- a/spec/swagger.json +++ b/spec/swagger.json @@ -19,7 +19,7 @@ }, "basePath": "/", "paths": { - "/check": { + "/acl/check": { "get": { "description": "To learn how relation tuples and the check works, head over to [the documentation](../concepts/relation-tuples.mdx).", "consumes": ["application/x-www-form-urlencoded"], @@ -156,7 +156,7 @@ } } }, - "/expand": { + "/acl/expand": { "get": { "description": "Use this endpoint to expand a relation tuple.", "consumes": ["application/x-www-form-urlencoded"], @@ -222,73 +222,54 @@ } } }, - "/health/alive": { - "get": { - "description": "This endpoint returns a 200 status code when the HTTP server is up running.\nThis status does currently not include checks whether the database connection is working.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.", + "/admin/relation-tuples": { + "put": { + "description": "Use this endpoint to create a relation tuple.", + "consumes": ["application/json"], "produces": ["application/json"], - "tags": ["health"], - "summary": "Check alive status", - "operationId": "isInstanceAlive", + "schemes": ["http", "https"], + "tags": ["write"], + "summary": "Create a Relation Tuple", + "operationId": "createRelationTuple", + "parameters": [ + { + "name": "Payload", + "in": "body", + "schema": { + "$ref": "#/definitions/RelationQuery" + } + } + ], "responses": { - "200": { - "description": "healthStatus", + "201": { + "description": "RelationQuery", "schema": { - "$ref": "#/definitions/healthStatus" + "$ref": "#/definitions/RelationQuery" } }, - "500": { + "400": { "description": "genericError", "schema": { "$ref": "#/definitions/genericError" } - } - } - } - }, - "/health/ready": { - "get": { - "description": "This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g.\nthe database) are responsive as well.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.", - "produces": ["application/json"], - "tags": ["health"], - "summary": "Check readiness status", - "operationId": "isInstanceReady", - "responses": { - "200": { - "description": "healthStatus", - "schema": { - "$ref": "#/definitions/healthStatus" - } }, - "503": { - "description": "healthNotReadyStatus", + "500": { + "description": "genericError", "schema": { - "$ref": "#/definitions/healthNotReadyStatus" + "$ref": "#/definitions/genericError" } } } - } - }, - "/relation-tuples": { - "get": { - "description": "Get all relation tuples that match the query. Only the namespace field is required.", + }, + "delete": { + "description": "Use this endpoint to delete relation tuples", "consumes": ["application/x-www-form-urlencoded"], "produces": ["application/json"], "schemes": ["http", "https"], - "tags": ["read"], - "summary": "Query relation tuples", - "operationId": "getRelationTuples", + "tags": ["write"], + "summary": "Delete Relation Tuples", + "operationId": "deleteRelationTuples", "parameters": [ - { - "type": "string", - "name": "page_token", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "name": "page_size", - "in": "query" - }, { "type": "string", "description": "Namespace of the Relation Tuple", @@ -333,13 +314,10 @@ } ], "responses": { - "200": { - "description": "getRelationTuplesResponse", - "schema": { - "$ref": "#/definitions/getRelationTuplesResponse" - } + "204": { + "$ref": "#/responses/emptyResponse" }, - "404": { + "400": { "description": "genericError", "schema": { "$ref": "#/definitions/genericError" @@ -353,31 +331,37 @@ } } }, - "put": { - "description": "Use this endpoint to create a relation tuple.", + "patch": { + "description": "Use this endpoint to patch one or more relation tuples.", "consumes": ["application/json"], "produces": ["application/json"], "schemes": ["http", "https"], "tags": ["write"], - "summary": "Create a Relation Tuple", - "operationId": "createRelationTuple", + "summary": "Patch Multiple Relation Tuples", + "operationId": "patchRelationTuples", "parameters": [ { "name": "Payload", "in": "body", "schema": { - "$ref": "#/definitions/RelationQuery" + "type": "array", + "items": { + "$ref": "#/definitions/PatchDelta" + } } } ], "responses": { - "201": { - "description": "RelationQuery", + "204": { + "$ref": "#/responses/emptyResponse" + }, + "400": { + "description": "genericError", "schema": { - "$ref": "#/definitions/RelationQuery" + "$ref": "#/definitions/genericError" } }, - "400": { + "404": { "description": "genericError", "schema": { "$ref": "#/definitions/genericError" @@ -390,16 +374,75 @@ } } } - }, - "delete": { - "description": "Use this endpoint to delete relation tuples", + } + }, + "/health/alive": { + "get": { + "description": "This endpoint returns a 200 status code when the HTTP server is up running.\nThis status does currently not include checks whether the database connection is working.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.", + "produces": ["application/json"], + "tags": ["health"], + "summary": "Check alive status", + "operationId": "isInstanceAlive", + "responses": { + "200": { + "description": "healthStatus", + "schema": { + "$ref": "#/definitions/healthStatus" + } + }, + "500": { + "description": "genericError", + "schema": { + "$ref": "#/definitions/genericError" + } + } + } + } + }, + "/health/ready": { + "get": { + "description": "This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g.\nthe database) are responsive as well.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.", + "produces": ["application/json"], + "tags": ["health"], + "summary": "Check readiness status", + "operationId": "isInstanceReady", + "responses": { + "200": { + "description": "healthStatus", + "schema": { + "$ref": "#/definitions/healthStatus" + } + }, + "503": { + "description": "healthNotReadyStatus", + "schema": { + "$ref": "#/definitions/healthNotReadyStatus" + } + } + } + } + }, + "/relation-tuples": { + "get": { + "description": "Get all relation tuples that match the query. Only the namespace field is required.", "consumes": ["application/x-www-form-urlencoded"], "produces": ["application/json"], "schemes": ["http", "https"], - "tags": ["write"], - "summary": "Delete Relation Tuples", - "operationId": "deleteRelationTuples", + "tags": ["read"], + "summary": "Query relation tuples", + "operationId": "getRelationTuples", "parameters": [ + { + "type": "string", + "name": "page_token", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "name": "page_size", + "in": "query" + }, { "type": "string", "description": "Namespace of the Relation Tuple", @@ -444,51 +487,10 @@ } ], "responses": { - "204": { - "$ref": "#/responses/emptyResponse" - }, - "400": { - "description": "genericError", - "schema": { - "$ref": "#/definitions/genericError" - } - }, - "500": { - "description": "genericError", - "schema": { - "$ref": "#/definitions/genericError" - } - } - } - }, - "patch": { - "description": "Use this endpoint to patch one or more relation tuples.", - "consumes": ["application/json"], - "produces": ["application/json"], - "schemes": ["http", "https"], - "tags": ["write"], - "summary": "Patch Multiple Relation Tuples", - "operationId": "patchRelationTuples", - "parameters": [ - { - "name": "Payload", - "in": "body", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/PatchDelta" - } - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/emptyResponse" - }, - "400": { - "description": "genericError", + "200": { + "description": "getRelationTuplesResponse", "schema": { - "$ref": "#/definitions/genericError" + "$ref": "#/definitions/getRelationTuplesResponse" } }, "404": { From 3bb4e97ac61d29cee3855eb20a4aed5342294104 Mon Sep 17 00:00:00 2001 From: zepatrik Date: Mon, 28 Mar 2022 10:55:04 +0300 Subject: [PATCH 2/3] docs: update cURL samples --- .../expand-api-display-access/00-create-tuples/curl.sh | 2 +- .../expand-api-display-access/01-expand-beach/curl.sh | 2 +- .../expand-api-display-access/99-cleanup/curl.sh | 4 ++-- .../list-api-display-objects/00-create-tuples/curl.sh | 2 +- .../list-api-display-objects/99-cleanup/curl.sh | 2 +- .../simple-access-check-guide/00-write-direct-access/curl.sh | 2 +- .../simple-access-check-guide/01-check-direct-access/curl.sh | 2 +- .../simple-access-check-guide/99-cleanup/curl.sh | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/curl.sh b/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/curl.sh index cc58cbcdc..a19d5d289 100755 --- a/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/curl.sh +++ b/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/curl.sh @@ -19,6 +19,6 @@ files:/photos/mountains.jpg#access@(directories:/photos#access)' | \ jq "[ .[] | { relation_tuple: . , action: \"insert\" } ]" -c | \ curl -X PATCH --silent --fail \ --data @- \ - http://127.0.0.1:4467/relation-tuples + http://127.0.0.1:4467/admin/relation-tuples echo "Successfully created tuples" diff --git a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/curl.sh b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/curl.sh index 709813adb..aeb35e5bc 100755 --- a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/curl.sh +++ b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/curl.sh @@ -6,5 +6,5 @@ curl -G --silent \ --data-urlencode "relation=access" \ --data-urlencode "object=/photos/beach.jpg" \ --data-urlencode "max-depth=3" \ - http://127.0.0.1:4466/expand | \ + http://127.0.0.1:4466/acl/expand | \ jq diff --git a/contrib/docs-code-samples/expand-api-display-access/99-cleanup/curl.sh b/contrib/docs-code-samples/expand-api-display-access/99-cleanup/curl.sh index 39518dc44..442d22e34 100755 --- a/contrib/docs-code-samples/expand-api-display-access/99-cleanup/curl.sh +++ b/contrib/docs-code-samples/expand-api-display-access/99-cleanup/curl.sh @@ -10,7 +10,7 @@ curl -G --silent \ jq "[ .relation_tuples[] | { relation_tuple: . , action: \"delete\" } ]" -c | \ curl -X PATCH --silent --fail \ --data @- \ - http://127.0.0.1:4467/relation-tuples + http://127.0.0.1:4467/admin/relation-tuples curl -G --silent \ --data-urlencode "namespace=directories" \ @@ -18,4 +18,4 @@ curl -G --silent \ jq "[ .relation_tuples[] | { relation_tuple: . , action: \"delete\" } ]" -c | \ curl -X PATCH --silent --fail \ --data @- \ - http://127.0.0.1:4467/relation-tuples + http://127.0.0.1:4467/admin/relation-tuples diff --git a/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/curl.sh b/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/curl.sh index 88b7f7d0a..67f56f23c 100755 --- a/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/curl.sh +++ b/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/curl.sh @@ -16,6 +16,6 @@ chats:coffee-break#member@Patrik' | \ jq "[ .[] | { relation_tuple: . , action: \"insert\" } ]" -c | \ curl -X PATCH --silent --fail \ --data @- \ - http://127.0.0.1:4467/relation-tuples + http://127.0.0.1:4467/admin/relation-tuples echo "Successfully created tuples" diff --git a/contrib/docs-code-samples/list-api-display-objects/99-cleanup/curl.sh b/contrib/docs-code-samples/list-api-display-objects/99-cleanup/curl.sh index 717963ec2..21cb4733b 100755 --- a/contrib/docs-code-samples/list-api-display-objects/99-cleanup/curl.sh +++ b/contrib/docs-code-samples/list-api-display-objects/99-cleanup/curl.sh @@ -10,4 +10,4 @@ curl -G --silent \ jq "[ .relation_tuples[] | { relation_tuple: . , action: \"delete\" } ]" -c | \ curl -X PATCH --silent --fail \ --data @- \ - http://127.0.0.1:4467/relation-tuples + http://127.0.0.1:4467/admin/relation-tuples diff --git a/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/curl.sh b/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/curl.sh index 8e5f8af1f..ab17dd867 100755 --- a/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/curl.sh +++ b/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/curl.sh @@ -11,6 +11,6 @@ relationtuple=' curl --fail --silent -X PUT \ --data "$relationtuple" \ - http://127.0.0.1:4467/relation-tuples > /dev/null \ + http://127.0.0.1:4467/admin/relation-tuples > /dev/null \ && echo "Successfully created tuple" \ || echo "Encountered error" diff --git a/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/curl.sh b/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/curl.sh index 45f283d9c..e864f5c15 100755 --- a/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/curl.sh +++ b/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/curl.sh @@ -6,5 +6,5 @@ curl -G --silent \ --data-urlencode "relation=decypher" \ --data-urlencode "namespace=messages" \ --data-urlencode "object=02y_15_4w350m3" \ - http://127.0.0.1:4466/check \ + http://127.0.0.1:4466/acl/check \ | jq -r 'if .allowed == true then "Allowed" else "Denied" end' diff --git a/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/curl.sh b/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/curl.sh index 719f5bee9..73a7a573d 100755 --- a/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/curl.sh +++ b/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/curl.sh @@ -6,4 +6,4 @@ curl -X DELETE -G --silent \ --data-urlencode "relation=decypher" \ --data-urlencode "namespace=messages" \ --data-urlencode "object=02y_15_4w350m3" \ - http://127.0.0.1:4467/relation-tuples + http://127.0.0.1:4467/admin/relation-tuples From 2b34886663c3e252bd0dae4a4112b22132f3743f Mon Sep 17 00:00:00 2001 From: zepatrik Date: Tue, 29 Mar 2022 16:46:48 +0300 Subject: [PATCH 3/3] refactor: gRPC package name and REST paths --- buf.yaml | 2 +- cmd/check/root.go | 12 +- cmd/expand/root.go | 17 +- cmd/relationtuple/create.go | 4 +- cmd/relationtuple/delete.go | 15 +- cmd/relationtuple/delete_all.go | 9 +- cmd/relationtuple/get.go | 10 +- .../00-create-tuples/index.js | 20 +- .../00-create-tuples/main.go | 28 +- .../01-expand-beach/curl.sh | 2 +- .../01-expand-beach/index.js | 6 +- .../01-expand-beach/main.go | 10 +- .../99-cleanup/index.js | 2 +- .../99-cleanup/main.go | 20 +- .../00-create-tuples/index.js | 8 +- .../00-create-tuples/main.go | 24 +- .../01-list-PM/index.js | 4 +- .../01-list-PM/main.go | 12 +- .../02-list-coffee-break/main.go | 12 +- .../99-cleanup/index.js | 2 +- .../99-cleanup/main.go | 22 +- contrib/docs-code-samples/package-lock.json | 2 +- .../00-write-direct-access/index.js | 8 +- .../00-write-direct-access/main.go | 16 +- .../01-check-direct-access/curl.sh | 2 +- .../01-check-direct-access/index.js | 4 +- .../01-check-direct-access/main.go | 10 +- .../99-cleanup/index.js | 8 +- .../99-cleanup/main.go | 16 +- internal/check/handler.go | 18 +- internal/driver/daemon.go | 10 +- internal/driver/registry_default.go | 9 +- internal/e2e/grpc_client_test.go | 43 +- internal/expand/handler.go | 14 +- internal/expand/tree.go | 38 +- internal/httpclient-next/README.md | 6 +- internal/httpclient-next/api/openapi.yaml | 422 +++++------ internal/httpclient-next/api_read.go | 6 +- internal/httpclient-next/docs/ReadApi.md | 6 +- .../client/read/get_check_responses.go | 8 +- .../client/read/get_expand_responses.go | 8 +- .../client/read/post_check_responses.go | 8 +- .../httpclient/client/read/read_client.go | 6 +- .../httpclient/models/get_check_response.go | 2 +- internal/relationtuple/definitions.go | 40 +- internal/relationtuple/definitions_test.go | 42 +- internal/relationtuple/handler.go | 6 +- internal/relationtuple/read_server.go | 12 +- internal/relationtuple/transact_server.go | 18 +- proto/index.d.ts | 4 +- proto/index.js | 2 +- proto/ory/keto/README.md | 2 +- proto/ory/keto/acl/v1alpha1/acl.pb.go | 391 ---------- .../acl/v1alpha1/check_service_grpc_pb.d.ts | 42 -- .../acl/v1alpha1/check_service_grpc_pb.js | 50 -- .../keto/acl/v1alpha1/expand_service.pb.go | 453 ----------- .../acl/v1alpha1/expand_service_grpc_pb.d.ts | 42 -- .../acl/v1alpha1/expand_service_grpc_pb.js | 50 -- .../keto/acl/v1alpha1/expand_service_pb.js | 707 ------------------ .../ory/keto/acl/v1alpha1/read_service.pb.go | 444 ----------- .../acl/v1alpha1/read_service_grpc_pb.d.ts | 43 -- .../keto/acl/v1alpha1/read_service_grpc_pb.js | 50 -- proto/ory/keto/acl/v1alpha1/version.pb.go | 218 ------ .../keto/acl/v1alpha1/version_grpc_pb.d.ts | 41 - .../ory/keto/acl/v1alpha1/version_grpc_pb.js | 48 -- .../ory/keto/acl/v1alpha1/write_service.pb.go | 630 ---------------- .../acl/v1alpha1/write_service_grpc_pb.d.ts | 59 -- .../acl/v1alpha1/write_service_grpc_pb.js | 83 -- .../v1alpha2}/check_service.pb.go | 159 ++-- .../v1alpha2}/check_service.proto | 12 +- .../v1alpha2}/check_service_grpc.pb.go | 10 +- .../v1alpha2/check_service_grpc_pb.d.ts | 42 ++ .../v1alpha2/check_service_grpc_pb.js | 50 ++ .../v1alpha2}/check_service_pb.d.ts | 12 +- .../v1alpha2}/check_service_pb.js | 160 ++-- .../v1alpha2/expand_service.pb.go | 464 ++++++++++++ .../v1alpha2}/expand_service.proto | 12 +- .../v1alpha2}/expand_service_grpc.pb.go | 10 +- .../v1alpha2/expand_service_grpc_pb.d.ts | 42 ++ .../v1alpha2/expand_service_grpc_pb.js | 50 ++ .../v1alpha2}/expand_service_pb.d.ts | 18 +- .../v1alpha2/expand_service_pb.js | 707 ++++++++++++++++++ .../v1alpha2}/index.d.ts | 6 +- .../v1alpha2}/index.js | 4 +- .../v1alpha2/read_service.pb.go | 454 +++++++++++ .../v1alpha2}/read_service.proto | 12 +- .../v1alpha2}/read_service_grpc.pb.go | 10 +- .../v1alpha2/read_service_grpc_pb.d.ts | 43 ++ .../v1alpha2/read_service_grpc_pb.js | 50 ++ .../v1alpha2}/read_service_pb.d.ts | 20 +- .../v1alpha2}/read_service_pb.js | 270 +++---- .../v1alpha2/relation_tuples.pb.go | 398 ++++++++++ .../v1alpha2/relation_tuples.proto} | 13 +- .../v1alpha2/relation_tuples_grpc_pb.js} | 0 .../v1alpha2/relation_tuples_pb.d.ts} | 4 +- .../v1alpha2/relation_tuples_pb.js} | 242 +++--- .../v1alpha2}/utils.go | 6 +- .../v1alpha2}/utils_test.go | 10 +- .../relation_tuples/v1alpha2/version.pb.go | 224 ++++++ .../v1alpha2}/version.proto | 10 +- .../v1alpha2}/version_grpc.pb.go | 10 +- .../v1alpha2/version_grpc_pb.d.ts | 41 + .../v1alpha2/version_grpc_pb.js | 48 ++ .../v1alpha2}/version_pb.d.ts | 4 +- .../v1alpha2}/version_pb.js | 86 +-- .../v1alpha2/write_service.pb.go | 644 ++++++++++++++++ .../v1alpha2}/write_service.proto | 18 +- .../v1alpha2}/write_service_grpc.pb.go | 14 +- .../v1alpha2/write_service_grpc_pb.d.ts | 59 ++ .../v1alpha2/write_service_grpc_pb.js | 83 ++ .../v1alpha2}/write_service_pb.d.ts | 22 +- .../v1alpha2}/write_service_pb.js | 416 +++++------ spec/api.json | 504 ++++++------- spec/swagger.json | 408 +++++----- 114 files changed, 5160 insertions(+), 5109 deletions(-) delete mode 100644 proto/ory/keto/acl/v1alpha1/acl.pb.go delete mode 100644 proto/ory/keto/acl/v1alpha1/check_service_grpc_pb.d.ts delete mode 100644 proto/ory/keto/acl/v1alpha1/check_service_grpc_pb.js delete mode 100644 proto/ory/keto/acl/v1alpha1/expand_service.pb.go delete mode 100644 proto/ory/keto/acl/v1alpha1/expand_service_grpc_pb.d.ts delete mode 100644 proto/ory/keto/acl/v1alpha1/expand_service_grpc_pb.js delete mode 100644 proto/ory/keto/acl/v1alpha1/expand_service_pb.js delete mode 100644 proto/ory/keto/acl/v1alpha1/read_service.pb.go delete mode 100644 proto/ory/keto/acl/v1alpha1/read_service_grpc_pb.d.ts delete mode 100644 proto/ory/keto/acl/v1alpha1/read_service_grpc_pb.js delete mode 100644 proto/ory/keto/acl/v1alpha1/version.pb.go delete mode 100644 proto/ory/keto/acl/v1alpha1/version_grpc_pb.d.ts delete mode 100644 proto/ory/keto/acl/v1alpha1/version_grpc_pb.js delete mode 100644 proto/ory/keto/acl/v1alpha1/write_service.pb.go delete mode 100644 proto/ory/keto/acl/v1alpha1/write_service_grpc_pb.d.ts delete mode 100644 proto/ory/keto/acl/v1alpha1/write_service_grpc_pb.js rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/check_service.pb.go (53%) rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/check_service.proto (90%) rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/check_service_grpc.pb.go (91%) create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/check_service_pb.d.ts (82%) rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/check_service_pb.js (59%) create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/expand_service.proto (86%) rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/expand_service_grpc.pb.go (91%) create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.d.ts create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.js rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/expand_service_pb.d.ts (80%) create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/index.d.ts (79%) rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/index.js (89%) create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/read_service.proto (89%) rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/read_service_grpc.pb.go (91%) create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.d.ts create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/read_service_pb.d.ts (79%) rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/read_service_pb.js (51%) create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go rename proto/ory/keto/{acl/v1alpha1/acl.proto => relation_tuples/v1alpha2/relation_tuples.proto} (78%) rename proto/ory/keto/{acl/v1alpha1/acl_grpc_pb.js => relation_tuples/v1alpha2/relation_tuples_grpc_pb.js} (100%) rename proto/ory/keto/{acl/v1alpha1/acl_pb.d.ts => relation_tuples/v1alpha2/relation_tuples_pb.d.ts} (96%) rename proto/ory/keto/{acl/v1alpha1/acl_pb.js => relation_tuples/v1alpha2/relation_tuples_pb.js} (56%) rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/utils.go (79%) rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/utils_test.go (85%) create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/version.pb.go rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/version.proto (68%) rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/version_grpc.pb.go (91%) create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.d.ts create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.js rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/version_pb.d.ts (94%) rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/version_pb.js (60%) create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/write_service.proto (83%) rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/write_service_grpc.pb.go (90%) create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/write_service_pb.d.ts (88%) rename proto/ory/keto/{acl/v1alpha1 => relation_tuples/v1alpha2}/write_service_pb.js (50%) diff --git a/buf.yaml b/buf.yaml index b7797f93f..b99e6be6a 100644 --- a/buf.yaml +++ b/buf.yaml @@ -9,7 +9,7 @@ lint: - google ignore_only: ENUM_VALUE_PREFIX: - - ory/keto/acl/v1alpha1/write_service.proto + - ory/keto/relation_tuples/v1alpha2/write_service.proto breaking: use: - PACKAGE diff --git a/cmd/check/root.go b/cmd/check/root.go index ab61cc033..ad61aa0f5 100644 --- a/cmd/check/root.go +++ b/cmd/check/root.go @@ -3,9 +3,9 @@ package check import ( "fmt" - "github.com/ory/keto/internal/check" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" + "github.com/ory/keto/internal/check" "github.com/ory/x/cmdx" "github.com/spf13/cobra" @@ -42,11 +42,9 @@ func newCheckCmd() *cobra.Command { return err } - cl := acl.NewCheckServiceClient(conn) - resp, err := cl.Check(cmd.Context(), &acl.CheckRequest{ - Subject: &acl.Subject{ - Ref: &acl.Subject_Id{Id: args[0]}, - }, + cl := rts.NewCheckServiceClient(conn) + resp, err := cl.Check(cmd.Context(), &rts.CheckRequest{ + Subject: rts.NewSubjectID(args[0]), Relation: args[1], Namespace: args[2], Object: args[3], diff --git a/cmd/expand/root.go b/cmd/expand/root.go index e014647da..1c9acd21f 100644 --- a/cmd/expand/root.go +++ b/cmd/expand/root.go @@ -3,6 +3,8 @@ package expand import ( "fmt" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" + "github.com/ory/x/flagx" "github.com/ory/x/cmdx" @@ -10,7 +12,6 @@ import ( "github.com/ory/keto/cmd/client" "github.com/ory/keto/internal/expand" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" ) const FlagMaxDepth = "max-depth" @@ -33,17 +34,9 @@ func NewExpandCmd() *cobra.Command { return err } - cl := acl.NewExpandServiceClient(conn) - resp, err := cl.Expand(cmd.Context(), &acl.ExpandRequest{ - Subject: &acl.Subject{ - Ref: &acl.Subject_Set{ - Set: &acl.SubjectSet{ - Relation: args[0], - Namespace: args[1], - Object: args[2], - }, - }, - }, + cl := rts.NewExpandServiceClient(conn) + resp, err := cl.Expand(cmd.Context(), &rts.ExpandRequest{ + Subject: rts.NewSubjectSet(args[1], args[2], args[0]), MaxDepth: maxDepth, }) if err != nil { diff --git a/cmd/relationtuple/create.go b/cmd/relationtuple/create.go index abff1d9f6..aab10960f 100644 --- a/cmd/relationtuple/create.go +++ b/cmd/relationtuple/create.go @@ -8,7 +8,7 @@ import ( "os" "path/filepath" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" "github.com/ory/keto/internal/relationtuple" @@ -25,7 +25,7 @@ func newCreateCmd() *cobra.Command { "A directory will be traversed and all relation tuples will be created.\n" + "Pass the special filename `-` to read from STD_IN.", Args: cobra.MinimumNArgs(1), - RunE: transactRelationTuples(acl.RelationTupleDelta_INSERT), + RunE: transactRelationTuples(rts.RelationTupleDelta_ACTION_INSERT), } cmd.Flags().AddFlagSet(packageFlags) diff --git a/cmd/relationtuple/delete.go b/cmd/relationtuple/delete.go index b5cf6f481..35fed0fd4 100644 --- a/cmd/relationtuple/delete.go +++ b/cmd/relationtuple/delete.go @@ -3,12 +3,13 @@ package relationtuple import ( "fmt" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" + "github.com/ory/x/cmdx" "github.com/spf13/cobra" "github.com/ory/keto/cmd/client" "github.com/ory/keto/internal/relationtuple" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" ) func newDeleteCmd() *cobra.Command { @@ -19,14 +20,14 @@ func newDeleteCmd() *cobra.Command { "A directory will be traversed and all relation tuples will be deleted.\n" + "Pass the special filename `-` to read from STD_IN.", Args: cobra.MinimumNArgs(1), - RunE: transactRelationTuples(acl.RelationTupleDelta_DELETE), + RunE: transactRelationTuples(rts.RelationTupleDelta_ACTION_DELETE), } cmd.Flags().AddFlagSet(packageFlags) return cmd } -func transactRelationTuples(action acl.RelationTupleDelta_Action) func(*cobra.Command, []string) error { +func transactRelationTuples(action rts.RelationTupleDelta_Action) func(*cobra.Command, []string) error { return func(cmd *cobra.Command, args []string) error { conn, err := client.GetWriteConn(cmd) if err != nil { @@ -34,7 +35,7 @@ func transactRelationTuples(action acl.RelationTupleDelta_Action) func(*cobra.Co } var tuples []*relationtuple.InternalRelationTuple - var deltas []*acl.RelationTupleDelta + var deltas []*rts.RelationTupleDelta for _, fn := range args { tuple, err := readTuplesFromArg(cmd, fn) if err != nil { @@ -42,16 +43,16 @@ func transactRelationTuples(action acl.RelationTupleDelta_Action) func(*cobra.Co } for _, t := range tuple { tuples = append(tuples, t) - deltas = append(deltas, &acl.RelationTupleDelta{ + deltas = append(deltas, &rts.RelationTupleDelta{ Action: action, RelationTuple: t.ToProto(), }) } } - cl := acl.NewWriteServiceClient(conn) + cl := rts.NewWriteServiceClient(conn) - _, err = cl.TransactRelationTuples(cmd.Context(), &acl.TransactRelationTuplesRequest{ + _, err = cl.TransactRelationTuples(cmd.Context(), &rts.TransactRelationTuplesRequest{ RelationTupleDeltas: deltas, }) if err != nil { diff --git a/cmd/relationtuple/delete_all.go b/cmd/relationtuple/delete_all.go index d6099adcb..368973531 100644 --- a/cmd/relationtuple/delete_all.go +++ b/cmd/relationtuple/delete_all.go @@ -3,6 +3,8 @@ package relationtuple import ( "fmt" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" + "github.com/ory/x/pointerx" "github.com/ory/x/cmdx" @@ -10,7 +12,6 @@ import ( "github.com/spf13/cobra" "github.com/ory/keto/cmd/client" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" ) const ( @@ -53,9 +54,9 @@ func deleteRelationTuplesFromQuery(cmd *cobra.Command, args []string) error { return err } defer conn.Close() - cl := acl.NewWriteServiceClient(conn) - _, err = cl.DeleteRelationTuples(cmd.Context(), &acl.DeleteRelationTuplesRequest{ - Query: (*acl.DeleteRelationTuplesRequest_Query)(query), + cl := rts.NewWriteServiceClient(conn) + _, err = cl.DeleteRelationTuples(cmd.Context(), &rts.DeleteRelationTuplesRequest{ + Query: (*rts.DeleteRelationTuplesRequest_Query)(query), }) if err != nil { _, _ = fmt.Fprintf(cmd.ErrOrStderr(), "Could not make request: %s\n", err) diff --git a/cmd/relationtuple/get.go b/cmd/relationtuple/get.go index f2f0d3940..e783c691c 100644 --- a/cmd/relationtuple/get.go +++ b/cmd/relationtuple/get.go @@ -4,7 +4,7 @@ import ( "fmt" "strconv" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" "github.com/ory/x/flagx" @@ -43,8 +43,8 @@ func registerRelationTupleFlags(flags *pflag.FlagSet) { } } -func readQueryFromFlags(cmd *cobra.Command) (*acl.ListRelationTuplesRequest_Query, error) { - query := &acl.ListRelationTuplesRequest_Query{ +func readQueryFromFlags(cmd *cobra.Command) (*rts.ListRelationTuplesRequest_Query, error) { + query := &rts.ListRelationTuplesRequest_Query{ Namespace: flagx.MustGetString(cmd, FlagNamespace), Object: flagx.MustGetString(cmd, FlagObject), Relation: flagx.MustGetString(cmd, FlagRelation), @@ -102,13 +102,13 @@ func getTuples(pageSize *int32, pageToken *string) func(cmd *cobra.Command, _ [] } defer conn.Close() - cl := acl.NewReadServiceClient(conn) + cl := rts.NewReadServiceClient(conn) query, err := readQueryFromFlags(cmd) if err != nil { return err } - resp, err := cl.ListRelationTuples(cmd.Context(), &acl.ListRelationTuplesRequest{ + resp, err := cl.ListRelationTuples(cmd.Context(), &rts.ListRelationTuplesRequest{ Query: query, PageSize: *pageSize, PageToken: *pageToken, diff --git a/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/index.js b/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/index.js index fc7002ee8..fdb7189da 100644 --- a/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/index.js +++ b/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/index.js @@ -1,5 +1,5 @@ import grpc from '@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js' -import { acl, write, writeService } from '@ory/keto-grpc-client' +import { relationTuples, write, writeService } from '@ory/keto-grpc-client' const writeClient = new writeService.WriteServiceClient( '127.0.0.1:4467', @@ -10,19 +10,19 @@ const writeRequest = new write.TransactRelationTuplesRequest() const insert = (tuple) => { const tupleDelta = new write.RelationTupleDelta() - tupleDelta.setAction(write.RelationTupleDelta.Action.INSERT) + tupleDelta.setAction(write.RelationTupleDelta.Action.ACTION_INSERT) tupleDelta.setRelationTuple(tuple) writeRequest.addRelationTupleDeltas(tupleDelta) } const addSimpleTuple = (namespace, object, relation, user) => { - const relationTuple = new acl.RelationTuple() + const relationTuple = new relationTuples.RelationTuple() relationTuple.setNamespace(namespace) relationTuple.setObject(object) relationTuple.setRelation(relation) - const sub = new acl.Subject() + const sub = new relationTuples.Subject() sub.setId(user) relationTuple.setSubject(sub) @@ -43,17 +43,17 @@ addSimpleTuple('directories', '/photos', 'access', 'laura') ['files', '/photos/mountains.jpg'], ['directories', '/photos'] ].forEach(([namespace, object]) => { - const relationTuple = new acl.RelationTuple() + const relationTuple = new relationTuples.RelationTuple() relationTuple.setNamespace(namespace) relationTuple.setObject(object) relationTuple.setRelation('access') - const subjectSet = new acl.SubjectSet() + const subjectSet = new relationTuples.SubjectSet() subjectSet.setNamespace(namespace) subjectSet.setObject(object) subjectSet.setRelation('owner') - const sub = new acl.Subject() + const sub = new relationTuples.Subject() sub.setSet(subjectSet) relationTuple.setSubject(sub) @@ -63,17 +63,17 @@ addSimpleTuple('directories', '/photos', 'access', 'laura') // should be subject set rewrite // access on parent means access on child ;['/photos/beach.jpg', '/photos/mountains.jpg'].forEach((file) => { - const relationTuple = new acl.RelationTuple() + const relationTuple = new relationTuples.RelationTuple() relationTuple.setNamespace('files') relationTuple.setObject(file) relationTuple.setRelation('access') - const subjectSet = new acl.SubjectSet() + const subjectSet = new relationTuples.SubjectSet() subjectSet.setNamespace('directories') subjectSet.setObject('/photos') subjectSet.setRelation('access') - const sub = new acl.Subject() + const sub = new relationTuples.Subject() sub.setSet(subjectSet) relationTuple.setSubject(sub) diff --git a/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/main.go b/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/main.go index f5953fd24..5fe8c2df5 100644 --- a/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/main.go +++ b/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/main.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "google.golang.org/grpc" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" + "google.golang.org/grpc" ) func main() { @@ -15,7 +15,7 @@ func main() { panic("Encountered error: " + err.Error()) } - client := acl.NewWriteServiceClient(conn) + client := rts.NewWriteServiceClient(conn) //directories:/photos#owner@maureen //files:/photos/beach.jpg#owner@maureen @@ -27,32 +27,32 @@ func main() { //files:/photos/mountains.jpg#access@(files:/photos/mountains.jpg#owner) //files:/photos/mountains.jpg#access@(directories:/photos#access) - tuples := []*acl.RelationTuple{ + tuples := []*rts.RelationTuple{ // ownership { Namespace: "directories", Object: "/photos", Relation: "owner", - Subject: acl.NewSubjectID("maureen"), + Subject: rts.NewSubjectID("maureen"), }, { Namespace: "files", Object: "/photos/beach.jpg", Relation: "owner", - Subject: acl.NewSubjectID("maureen"), + Subject: rts.NewSubjectID("maureen"), }, { Namespace: "files", Object: "/photos/mountains.jpg", Relation: "owner", - Subject: acl.NewSubjectID("laura"), + Subject: rts.NewSubjectID("laura"), }, // granted access { Namespace: "directories", Object: "/photos", Relation: "access", - Subject: acl.NewSubjectID("laura"), + Subject: rts.NewSubjectID("laura"), }, } // should be subject set rewrite @@ -62,26 +62,26 @@ func main() { {"files", "/photos/mountains.jpg"}, {"directories", "/photos"}, } { - tuples = append(tuples, &acl.RelationTuple{ + tuples = append(tuples, &rts.RelationTuple{ Namespace: o.n, Object: o.o, Relation: "access", - Subject: acl.NewSubjectSet(o.n, o.o, "owner"), + Subject: rts.NewSubjectSet(o.n, o.o, "owner"), }) } // should be subject set rewrite // access on parent means access on child for _, obj := range []string{"/photos/beach.jpg", "/photos/mountains.jpg"} { - tuples = append(tuples, &acl.RelationTuple{ + tuples = append(tuples, &rts.RelationTuple{ Namespace: "files", Object: obj, Relation: "access", - Subject: acl.NewSubjectSet("directories", "/photos", "access"), + Subject: rts.NewSubjectSet("directories", "/photos", "access"), }) } - _, err = client.TransactRelationTuples(context.Background(), &acl.TransactRelationTuplesRequest{ - RelationTupleDeltas: acl.RelationTupleToDeltas(tuples, acl.RelationTupleDelta_INSERT), + _, err = client.TransactRelationTuples(context.Background(), &rts.TransactRelationTuplesRequest{ + RelationTupleDeltas: rts.RelationTupleToDeltas(tuples, rts.RelationTupleDelta_ACTION_INSERT), }) if err != nil { panic("Encountered error: " + err.Error()) diff --git a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/curl.sh b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/curl.sh index aeb35e5bc..bd4bd9313 100755 --- a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/curl.sh +++ b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/curl.sh @@ -6,5 +6,5 @@ curl -G --silent \ --data-urlencode "relation=access" \ --data-urlencode "object=/photos/beach.jpg" \ --data-urlencode "max-depth=3" \ - http://127.0.0.1:4466/acl/expand | \ + http://127.0.0.1:4466/relation-tuples/expand | \ jq diff --git a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/index.js b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/index.js index a8b15b2cf..5d57eccd1 100644 --- a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/index.js +++ b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/index.js @@ -1,17 +1,17 @@ import grpc from '@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js' -import { acl, expand, expandService } from '@ory/keto-grpc-client' +import { relationTuples, expand, expandService } from '@ory/keto-grpc-client' const expandClient = new expandService.ExpandServiceClient( '127.0.0.1:4466', grpc.credentials.createInsecure() ) -const subjectSet = new acl.SubjectSet() +const subjectSet = new relationTuples.SubjectSet() subjectSet.setNamespace('files') subjectSet.setRelation('access') subjectSet.setObject('/photos/beach.jpg') -const sub = new acl.Subject() +const sub = new relationTuples.Subject() sub.setSet(subjectSet) const expandRequest = new expand.ExpandRequest() diff --git a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/main.go b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/main.go index ac497be3d..fa499becc 100644 --- a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/main.go +++ b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/main.go @@ -5,11 +5,11 @@ import ( "encoding/json" "os" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" + "github.com/ory/keto/internal/expand" "google.golang.org/grpc" - - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" ) func main() { @@ -18,10 +18,10 @@ func main() { panic(err) } - client := acl.NewExpandServiceClient(conn) + client := rts.NewExpandServiceClient(conn) - res, err := client.Expand(context.Background(), &acl.ExpandRequest{ - Subject: acl.NewSubjectSet("files", "/photos/beach.jpg", "access"), + res, err := client.Expand(context.Background(), &rts.ExpandRequest{ + Subject: rts.NewSubjectSet("files", "/photos/beach.jpg", "access"), MaxDepth: 3, }) if err != nil { diff --git a/contrib/docs-code-samples/expand-api-display-access/99-cleanup/index.js b/contrib/docs-code-samples/expand-api-display-access/99-cleanup/index.js index c8d5d9b86..8479500ab 100644 --- a/contrib/docs-code-samples/expand-api-display-access/99-cleanup/index.js +++ b/contrib/docs-code-samples/expand-api-display-access/99-cleanup/index.js @@ -23,7 +23,7 @@ const purgeNamespace = (namespace) => { resp.getRelationTuplesList().forEach((tuple) => { const tupleDelta = new write.RelationTupleDelta() - tupleDelta.setAction(write.RelationTupleDelta.Action.DELETE) + tupleDelta.setAction(write.RelationTupleDelta.Action.ACTION_DELETE) tupleDelta.setRelationTuple(tuple) writeRequest.addRelationTupleDeltas(tupleDelta) }) diff --git a/contrib/docs-code-samples/expand-api-display-access/99-cleanup/main.go b/contrib/docs-code-samples/expand-api-display-access/99-cleanup/main.go index 493d1401a..0a1b56d26 100644 --- a/contrib/docs-code-samples/expand-api-display-access/99-cleanup/main.go +++ b/contrib/docs-code-samples/expand-api-display-access/99-cleanup/main.go @@ -9,7 +9,7 @@ import ( "google.golang.org/grpc" "google.golang.org/protobuf/proto" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" ) func purgeNamespace(nspace string) { @@ -19,9 +19,9 @@ func purgeNamespace(nspace string) { } defer rc.Close() - rClient := acl.NewReadServiceClient(rc) - resp, err := rClient.ListRelationTuples(context.Background(), &acl.ListRelationTuplesRequest{ - Query: &acl.ListRelationTuplesRequest_Query{ + rClient := rts.NewReadServiceClient(rc) + resp, err := rClient.ListRelationTuples(context.Background(), &rts.ListRelationTuplesRequest{ + Query: &rts.ListRelationTuplesRequest_Query{ Namespace: nspace, }, }) @@ -35,16 +35,16 @@ func purgeNamespace(nspace string) { } defer wc.Close() - deltas := make([]*acl.RelationTupleDelta, len(resp.RelationTuples)) + deltas := make([]*rts.RelationTupleDelta, len(resp.RelationTuples)) for i, rt := range resp.RelationTuples { - deltas[i] = &acl.RelationTupleDelta{ - Action: acl.RelationTupleDelta_DELETE, - RelationTuple: proto.Clone(rt).(*acl.RelationTuple), + deltas[i] = &rts.RelationTupleDelta{ + Action: rts.RelationTupleDelta_ACTION_DELETE, + RelationTuple: proto.Clone(rt).(*rts.RelationTuple), } } - wClient := acl.NewWriteServiceClient(wc) - _, err = wClient.TransactRelationTuples(context.Background(), &acl.TransactRelationTuplesRequest{ + wClient := rts.NewWriteServiceClient(wc) + _, err = wClient.TransactRelationTuples(context.Background(), &rts.TransactRelationTuplesRequest{ RelationTupleDeltas: deltas, }) if err != nil { diff --git a/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/index.js b/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/index.js index 3dc46f2f7..4860b52e6 100644 --- a/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/index.js +++ b/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/index.js @@ -1,5 +1,5 @@ import grpc from '@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js' -import { acl, write, writeService } from '@ory/keto-grpc-client' +import { relationTuples, write, writeService } from '@ory/keto-grpc-client' const writeClient = new writeService.WriteServiceClient( '127.0.0.1:4467', @@ -9,17 +9,17 @@ const writeClient = new writeService.WriteServiceClient( const writeRequest = new write.TransactRelationTuplesRequest() const addToChat = (chatName) => (user) => { - const relationTuple = new acl.RelationTuple() + const relationTuple = new relationTuples.RelationTuple() relationTuple.setNamespace('chats') relationTuple.setObject(chatName) relationTuple.setRelation('member') - const sub = new acl.Subject() + const sub = new relationTuples.Subject() sub.setId(user) relationTuple.setSubject(sub) const tupleDelta = new write.RelationTupleDelta() - tupleDelta.setAction(write.RelationTupleDelta.Action.INSERT) + tupleDelta.setAction(write.RelationTupleDelta.Action.ACTION_INSERT) tupleDelta.setRelationTuple(relationTuple) writeRequest.addRelationTupleDeltas(tupleDelta) diff --git a/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/main.go b/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/main.go index 281df3233..bfc4aa4ce 100644 --- a/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/main.go +++ b/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/main.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "google.golang.org/grpc" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" + "google.golang.org/grpc" ) func main() { @@ -15,39 +15,39 @@ func main() { panic("Encountered error: " + err.Error()) } - client := acl.NewWriteServiceClient(conn) + client := rts.NewWriteServiceClient(conn) - var tuples []*acl.RelationTuple + var tuples []*rts.RelationTuple // memes for _, user := range []string{"PM", "Vincent", "Julia"} { - tuples = append(tuples, &acl.RelationTuple{ + tuples = append(tuples, &rts.RelationTuple{ Namespace: "chats", Object: "memes", Relation: "member", - Subject: acl.NewSubjectID(user), + Subject: rts.NewSubjectID(user), }) } // cars for _, user := range []string{"PM", "Julia"} { - tuples = append(tuples, &acl.RelationTuple{ + tuples = append(tuples, &rts.RelationTuple{ Namespace: "chats", Object: "cars", Relation: "member", - Subject: acl.NewSubjectID(user), + Subject: rts.NewSubjectID(user), }) } // coffee-break for _, user := range []string{"PM", "Vincent", "Julia", "Patrik"} { - tuples = append(tuples, &acl.RelationTuple{ + tuples = append(tuples, &rts.RelationTuple{ Namespace: "chats", Object: "coffee-break", Relation: "member", - Subject: acl.NewSubjectID(user), + Subject: rts.NewSubjectID(user), }) } - _, err = client.TransactRelationTuples(context.Background(), &acl.TransactRelationTuplesRequest{ - RelationTupleDeltas: acl.RelationTupleToDeltas(tuples, acl.RelationTupleDelta_INSERT), + _, err = client.TransactRelationTuples(context.Background(), &rts.TransactRelationTuplesRequest{ + RelationTupleDeltas: rts.RelationTupleToDeltas(tuples, rts.RelationTupleDelta_ACTION_INSERT), }) if err != nil { panic("Encountered error: " + err.Error()) diff --git a/contrib/docs-code-samples/list-api-display-objects/01-list-PM/index.js b/contrib/docs-code-samples/list-api-display-objects/01-list-PM/index.js index ce95c2520..43a687ae6 100644 --- a/contrib/docs-code-samples/list-api-display-objects/01-list-PM/index.js +++ b/contrib/docs-code-samples/list-api-display-objects/01-list-PM/index.js @@ -1,5 +1,5 @@ import grpc from '@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js' -import { acl, read, readService } from '@ory/keto-grpc-client' +import { relationTuples, read, readService } from '@ory/keto-grpc-client' const readClient = new readService.ReadServiceClient( '127.0.0.1:4466', @@ -11,7 +11,7 @@ const query = new read.ListRelationTuplesRequest.Query() query.setNamespace('chats') query.setRelation('member') -const sub = new acl.Subject() +const sub = new relationTuples.Subject() sub.setId('PM') query.setSubject(sub) diff --git a/contrib/docs-code-samples/list-api-display-objects/01-list-PM/main.go b/contrib/docs-code-samples/list-api-display-objects/01-list-PM/main.go index cd5c53b85..5f675d145 100644 --- a/contrib/docs-code-samples/list-api-display-objects/01-list-PM/main.go +++ b/contrib/docs-code-samples/list-api-display-objects/01-list-PM/main.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "google.golang.org/grpc" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" + "google.golang.org/grpc" ) func main() { @@ -15,13 +15,13 @@ func main() { panic(err.Error()) } - client := acl.NewReadServiceClient(conn) + client := rts.NewReadServiceClient(conn) - res, err := client.ListRelationTuples(context.Background(), &acl.ListRelationTuplesRequest{ - Query: &acl.ListRelationTuplesRequest_Query{ + res, err := client.ListRelationTuples(context.Background(), &rts.ListRelationTuplesRequest{ + Query: &rts.ListRelationTuplesRequest_Query{ Namespace: "chats", Relation: "member", - Subject: acl.NewSubjectID("PM"), + Subject: rts.NewSubjectID("PM"), }, }) if err != nil { diff --git a/contrib/docs-code-samples/list-api-display-objects/02-list-coffee-break/main.go b/contrib/docs-code-samples/list-api-display-objects/02-list-coffee-break/main.go index f45309e73..ce77bc55a 100644 --- a/contrib/docs-code-samples/list-api-display-objects/02-list-coffee-break/main.go +++ b/contrib/docs-code-samples/list-api-display-objects/02-list-coffee-break/main.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "google.golang.org/grpc" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" + "google.golang.org/grpc" ) func main() { @@ -15,10 +15,10 @@ func main() { panic(err.Error()) } - client := acl.NewReadServiceClient(conn) + client := rts.NewReadServiceClient(conn) - res, err := client.ListRelationTuples(context.Background(), &acl.ListRelationTuplesRequest{ - Query: &acl.ListRelationTuplesRequest_Query{ + res, err := client.ListRelationTuples(context.Background(), &rts.ListRelationTuplesRequest{ + Query: &rts.ListRelationTuplesRequest_Query{ Namespace: "chats", Object: "coffee-break", Relation: "member", @@ -29,6 +29,6 @@ func main() { } for _, rt := range res.RelationTuples { - fmt.Println(rt.Subject.Ref.(*acl.Subject_Id).Id) + fmt.Println(rt.Subject.Ref.(*rts.Subject_Id).Id) } } diff --git a/contrib/docs-code-samples/list-api-display-objects/99-cleanup/index.js b/contrib/docs-code-samples/list-api-display-objects/99-cleanup/index.js index c1ef1061d..0a50c6d61 100644 --- a/contrib/docs-code-samples/list-api-display-objects/99-cleanup/index.js +++ b/contrib/docs-code-samples/list-api-display-objects/99-cleanup/index.js @@ -22,7 +22,7 @@ readClient.listRelationTuples(readRequest, (err, resp) => { resp.getRelationTuplesList().forEach((tuple) => { const tupleDelta = new write.RelationTupleDelta() - tupleDelta.setAction(write.RelationTupleDelta.Action.DELETE) + tupleDelta.setAction(write.RelationTupleDelta.Action.ACTION_DELETE) tupleDelta.setRelationTuple(tuple) writeRequest.addRelationTupleDeltas(tupleDelta) }) diff --git a/contrib/docs-code-samples/list-api-display-objects/99-cleanup/main.go b/contrib/docs-code-samples/list-api-display-objects/99-cleanup/main.go index e81ce2bb7..15f30686c 100644 --- a/contrib/docs-code-samples/list-api-display-objects/99-cleanup/main.go +++ b/contrib/docs-code-samples/list-api-display-objects/99-cleanup/main.go @@ -6,10 +6,10 @@ package main import ( "context" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" + "google.golang.org/grpc" "google.golang.org/protobuf/proto" - - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" ) func main() { @@ -19,9 +19,9 @@ func main() { } defer rc.Close() - rClient := acl.NewReadServiceClient(rc) - resp, err := rClient.ListRelationTuples(context.Background(), &acl.ListRelationTuplesRequest{ - Query: &acl.ListRelationTuplesRequest_Query{ + rClient := rts.NewReadServiceClient(rc) + resp, err := rClient.ListRelationTuples(context.Background(), &rts.ListRelationTuplesRequest{ + Query: &rts.ListRelationTuplesRequest_Query{ Namespace: "chats", }, }) @@ -35,16 +35,16 @@ func main() { } defer wc.Close() - deltas := make([]*acl.RelationTupleDelta, len(resp.RelationTuples)) + deltas := make([]*rts.RelationTupleDelta, len(resp.RelationTuples)) for i, rt := range resp.RelationTuples { - deltas[i] = &acl.RelationTupleDelta{ - Action: acl.RelationTupleDelta_DELETE, - RelationTuple: proto.Clone(rt).(*acl.RelationTuple), + deltas[i] = &rts.RelationTupleDelta{ + Action: rts.RelationTupleDelta_ACTION_DELETE, + RelationTuple: proto.Clone(rt).(*rts.RelationTuple), } } - wClient := acl.NewWriteServiceClient(wc) - _, err = wClient.TransactRelationTuples(context.Background(), &acl.TransactRelationTuplesRequest{ + wClient := rts.NewWriteServiceClient(wc) + _, err = wClient.TransactRelationTuples(context.Background(), &rts.TransactRelationTuplesRequest{ RelationTupleDeltas: deltas, }) if err != nil { diff --git a/contrib/docs-code-samples/package-lock.json b/contrib/docs-code-samples/package-lock.json index 058a25c06..cc0de7b41 100644 --- a/contrib/docs-code-samples/package-lock.json +++ b/contrib/docs-code-samples/package-lock.json @@ -17,7 +17,7 @@ "google-protobuf": "^3.15.0-rc.1" } }, - "../../proto/ory/keto/acl/v1alpha1": { + "../../proto/ory/keto/relationTuples/v1alpha2": { "name": "@ory/keto-grpc-client", "version": "0.6.0-alpha.1-pre", "extraneous": true, diff --git a/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/index.js b/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/index.js index d4c5a2e68..87c53affa 100644 --- a/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/index.js +++ b/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/index.js @@ -1,22 +1,22 @@ import grpc from '@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js' -import { acl, write, writeService } from '@ory/keto-grpc-client' +import { relationTuples, write, writeService } from '@ory/keto-grpc-client' const writeClient = new writeService.WriteServiceClient( '127.0.0.1:4467', grpc.credentials.createInsecure() ) -const relationTuple = new acl.RelationTuple() +const relationTuple = new relationTuples.RelationTuple() relationTuple.setNamespace('messages') relationTuple.setObject('02y_15_4w350m3') relationTuple.setRelation('decypher') -const sub = new acl.Subject() +const sub = new relationTuples.Subject() sub.setId('john') relationTuple.setSubject(sub) const tupleDelta = new write.RelationTupleDelta() -tupleDelta.setAction(write.RelationTupleDelta.Action.INSERT) +tupleDelta.setAction(write.RelationTupleDelta.Action.ACTION_INSERT) tupleDelta.setRelationTuple(relationTuple) const writeRequest = new write.TransactRelationTuplesRequest() diff --git a/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/main.go b/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/main.go index c289bfea7..f74f12979 100644 --- a/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/main.go +++ b/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/main.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "google.golang.org/grpc" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" + "google.golang.org/grpc" ) func main() { @@ -15,17 +15,17 @@ func main() { panic("Encountered error: " + err.Error()) } - client := acl.NewWriteServiceClient(conn) + client := rts.NewWriteServiceClient(conn) - _, err = client.TransactRelationTuples(context.Background(), &acl.TransactRelationTuplesRequest{ - RelationTupleDeltas: []*acl.RelationTupleDelta{ + _, err = client.TransactRelationTuples(context.Background(), &rts.TransactRelationTuplesRequest{ + RelationTupleDeltas: []*rts.RelationTupleDelta{ { - Action: acl.RelationTupleDelta_INSERT, - RelationTuple: &acl.RelationTuple{ + Action: rts.RelationTupleDelta_ACTION_INSERT, + RelationTuple: &rts.RelationTuple{ Namespace: "messages", Object: "02y_15_4w350m3", Relation: "decypher", - Subject: acl.NewSubjectID("john"), + Subject: rts.NewSubjectID("john"), }, }, }, diff --git a/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/curl.sh b/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/curl.sh index e864f5c15..7975711ff 100755 --- a/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/curl.sh +++ b/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/curl.sh @@ -6,5 +6,5 @@ curl -G --silent \ --data-urlencode "relation=decypher" \ --data-urlencode "namespace=messages" \ --data-urlencode "object=02y_15_4w350m3" \ - http://127.0.0.1:4466/acl/check \ + http://127.0.0.1:4466/relation-tuples/check \ | jq -r 'if .allowed == true then "Allowed" else "Denied" end' diff --git a/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/index.js b/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/index.js index 45f13fdcd..2abf232a0 100644 --- a/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/index.js +++ b/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/index.js @@ -1,5 +1,5 @@ import grpc from '@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js' -import { acl, check, checkService } from '@ory/keto-grpc-client' +import { relationTuples, check, checkService } from '@ory/keto-grpc-client' const checkClient = new checkService.CheckServiceClient( '127.0.0.1:4466', @@ -11,7 +11,7 @@ checkRequest.setNamespace('messages') checkRequest.setObject('02y_15_4w350m3') checkRequest.setRelation('decypher') -const sub = new acl.Subject() +const sub = new relationTuples.Subject() sub.setId('john') checkRequest.setSubject(sub) diff --git a/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/main.go b/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/main.go index 0273f1387..e95ba31bb 100644 --- a/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/main.go +++ b/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/main.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "google.golang.org/grpc" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" + "google.golang.org/grpc" ) func main() { @@ -15,13 +15,13 @@ func main() { panic(err.Error()) } - client := acl.NewCheckServiceClient(conn) + client := rts.NewCheckServiceClient(conn) - res, err := client.Check(context.Background(), &acl.CheckRequest{ + res, err := client.Check(context.Background(), &rts.CheckRequest{ Namespace: "messages", Object: "02y_15_4w350m3", Relation: "decypher", - Subject: acl.NewSubjectID("john"), + Subject: rts.NewSubjectID("john"), }) if err != nil { panic(err.Error()) diff --git a/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/index.js b/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/index.js index 5320319c9..475a49c2d 100644 --- a/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/index.js +++ b/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/index.js @@ -1,22 +1,22 @@ import grpc from '@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js' -import { acl, write, writeService } from '@ory/keto-grpc-client' +import { relationTuples, write, writeService } from '@ory/keto-grpc-client' const writeClient = new writeService.WriteServiceClient( '127.0.0.1:4467', grpc.credentials.createInsecure() ) -const relationTuple = new acl.RelationTuple() +const relationTuple = new relationTuples.RelationTuple() relationTuple.setNamespace('messages') relationTuple.setObject('02y_15_4w350m3') relationTuple.setRelation('decypher') -const sub = new acl.Subject() +const sub = new relationTuples.Subject() sub.setId('john') relationTuple.setSubject(sub) const tupleDelta = new write.RelationTupleDelta() -tupleDelta.setAction(write.RelationTupleDelta.Action.DELETE) +tupleDelta.setAction(write.RelationTupleDelta.Action.ACTION_DELETE) tupleDelta.setRelationTuple(relationTuple) const writeRequest = new write.TransactRelationTuplesRequest() diff --git a/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/main.go b/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/main.go index b0679115c..7d0723ca3 100644 --- a/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/main.go +++ b/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/main.go @@ -6,9 +6,9 @@ package main import ( "context" - "google.golang.org/grpc" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" + "google.golang.org/grpc" ) func main() { @@ -18,17 +18,17 @@ func main() { } defer wc.Close() - wClient := acl.NewWriteServiceClient(wc) - _, err = wClient.TransactRelationTuples(context.Background(), &acl.TransactRelationTuplesRequest{ - RelationTupleDeltas: []*acl.RelationTupleDelta{ + wClient := rts.NewWriteServiceClient(wc) + _, err = wClient.TransactRelationTuples(context.Background(), &rts.TransactRelationTuplesRequest{ + RelationTupleDeltas: []*rts.RelationTupleDelta{ { - RelationTuple: &acl.RelationTuple{ + RelationTuple: &rts.RelationTuple{ Namespace: "messages", Object: "02y_15_4w350m3", Relation: "decypher", - Subject: acl.NewSubjectID("john"), + Subject: rts.NewSubjectID("john"), }, - Action: acl.RelationTupleDelta_DELETE, + Action: rts.RelationTupleDelta_ACTION_DELETE, }, }, }) diff --git a/internal/check/handler.go b/internal/check/handler.go index 65da1106e..66d509cd1 100644 --- a/internal/check/handler.go +++ b/internal/check/handler.go @@ -8,7 +8,7 @@ import ( "github.com/ory/herodot" "github.com/pkg/errors" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" "google.golang.org/grpc" @@ -30,13 +30,13 @@ type ( } ) -var _ acl.CheckServiceServer = (*Handler)(nil) +var _ rts.CheckServiceServer = (*Handler)(nil) func NewHandler(d handlerDependencies) *Handler { return &Handler{d: d} } -const RouteBase = "/acl/check" +const RouteBase = "/relation-tuples/check" func (h *Handler) RegisterReadRoutes(r *x.ReadRouter) { r.GET(RouteBase, h.getCheck) @@ -46,12 +46,12 @@ func (h *Handler) RegisterReadRoutes(r *x.ReadRouter) { func (h *Handler) RegisterWriteRoutes(_ *x.WriteRouter) {} func (h *Handler) RegisterReadGRPC(s *grpc.Server) { - acl.RegisterCheckServiceServer(s, h) + rts.RegisterCheckServiceServer(s, h) } func (h *Handler) RegisterWriteGRPC(_ *grpc.Server) {} -// Represents the response for a check request. +// RESTResponse is the response for a check request. // // The content of the allowed field is mirrored in the HTTP status code. // @@ -70,7 +70,7 @@ type getCheckRequest struct { MaxDepth int `json:"max-depth"` } -// swagger:route GET /acl/check read getCheck +// swagger:route GET /relation-tuples/check read getCheck // // Check a relation tuple // @@ -119,7 +119,7 @@ func (h *Handler) getCheck(w http.ResponseWriter, r *http.Request, _ httprouter. h.d.Writer().WriteCode(w, r, http.StatusForbidden, &RESTResponse{Allowed: false}) } -// swagger:route POST /acl/check read postCheck +// swagger:route POST /relation-tuples/check read postCheck // // Check a relation tuple // @@ -165,7 +165,7 @@ func (h *Handler) postCheck(w http.ResponseWriter, r *http.Request, _ httprouter h.d.Writer().WriteCode(w, r, http.StatusForbidden, &RESTResponse{Allowed: false}) } -func (h *Handler) Check(ctx context.Context, req *acl.CheckRequest) (*acl.CheckResponse, error) { +func (h *Handler) Check(ctx context.Context, req *rts.CheckRequest) (*rts.CheckResponse, error) { tuple, err := (&relationtuple.InternalRelationTuple{}).FromDataProvider(req) if err != nil { return nil, err @@ -177,7 +177,7 @@ func (h *Handler) Check(ctx context.Context, req *acl.CheckRequest) (*acl.CheckR return nil, err } - return &acl.CheckResponse{ + return &rts.CheckResponse{ Allowed: allowed, Snaptoken: "not yet implemented", }, nil diff --git a/internal/driver/daemon.go b/internal/driver/daemon.go index 3e60c8639..c7067db50 100644 --- a/internal/driver/daemon.go +++ b/internal/driver/daemon.go @@ -9,6 +9,8 @@ import ( "strings" "syscall" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" + prometheus "github.com/ory/x/prometheusx" "github.com/ory/x/logrusx" @@ -24,12 +26,10 @@ import ( grpcHealthV1 "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/reflection" - "github.com/ory/keto/internal/x" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" - "github.com/ory/keto/internal/check" "github.com/ory/keto/internal/expand" "github.com/ory/keto/internal/relationtuple" + "github.com/ory/keto/internal/x" "github.com/ory/analytics-go/v4" "github.com/ory/x/healthx" @@ -387,7 +387,7 @@ func (r *RegistryDefault) ReadGRPCServer(ctx context.Context) *grpc.Server { ) grpcHealthV1.RegisterHealthServer(s, r.HealthServer()) - acl.RegisterVersionServiceServer(s, r) + rts.RegisterVersionServiceServer(s, r) reflection.Register(s) for _, h := range r.allHandlers() { @@ -404,7 +404,7 @@ func (r *RegistryDefault) WriteGRPCServer(ctx context.Context) *grpc.Server { ) grpcHealthV1.RegisterHealthServer(s, r.HealthServer()) - acl.RegisterVersionServiceServer(s, r) + rts.RegisterVersionServiceServer(s, r) reflection.Register(s) for _, h := range r.allHandlers() { diff --git a/internal/driver/registry_default.go b/internal/driver/registry_default.go index f50f76459..057d1aba8 100644 --- a/internal/driver/registry_default.go +++ b/internal/driver/registry_default.go @@ -5,6 +5,8 @@ import ( "net/http" "sync" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" + "github.com/gobuffalo/pop/v6" "github.com/ory/herodot" "github.com/ory/x/dbal" @@ -27,7 +29,6 @@ import ( "github.com/ory/keto/internal/relationtuple" "github.com/ory/keto/internal/x" "github.com/ory/keto/ketoctx" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" ) var ( @@ -35,7 +36,7 @@ var ( _ x.WriterProvider = (*RegistryDefault)(nil) _ x.LoggerProvider = (*RegistryDefault)(nil) _ Registry = (*RegistryDefault)(nil) - _ acl.VersionServiceServer = (*RegistryDefault)(nil) + _ rts.VersionServiceServer = (*RegistryDefault)(nil) _ ketoctx.ContextualizerProvider = (*RegistryDefault)(nil) ) @@ -99,8 +100,8 @@ func (r *RegistryDefault) HealthServer() *health.Server { return r.healthServer } -func (r *RegistryDefault) GetVersion(_ context.Context, _ *acl.GetVersionRequest) (*acl.GetVersionResponse, error) { - return &acl.GetVersionResponse{Version: config.Version}, nil +func (r *RegistryDefault) GetVersion(_ context.Context, _ *rts.GetVersionRequest) (*rts.GetVersionResponse, error) { + return &rts.GetVersionResponse{Version: config.Version}, nil } func (r *RegistryDefault) Tracer(ctx context.Context) *tracing.Tracer { diff --git a/internal/e2e/grpc_client_test.go b/internal/e2e/grpc_client_test.go index 21d8e1340..e930a23f8 100644 --- a/internal/e2e/grpc_client_test.go +++ b/internal/e2e/grpc_client_test.go @@ -4,6 +4,8 @@ import ( "context" "time" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" + "github.com/ory/herodot" "github.com/stretchr/testify/assert" "google.golang.org/grpc/status" @@ -15,7 +17,6 @@ import ( "github.com/ory/keto/internal/expand" "github.com/ory/keto/internal/relationtuple" "github.com/ory/keto/internal/x" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" ) type grpcClient struct { @@ -55,9 +56,9 @@ func (g *grpcClient) createTuple(t require.TestingT, r *relationtuple.InternalRe } func (g *grpcClient) queryTuple(t require.TestingT, q *relationtuple.RelationQuery, opts ...x.PaginationOptionSetter) *relationtuple.GetResponse { - c := acl.NewReadServiceClient(g.readConn(t)) + c := rts.NewReadServiceClient(g.readConn(t)) - query := &acl.ListRelationTuplesRequest_Query{ + query := &rts.ListRelationTuplesRequest_Query{ Namespace: q.Namespace, Object: q.Object, Relation: q.Relation, @@ -68,7 +69,7 @@ func (g *grpcClient) queryTuple(t require.TestingT, q *relationtuple.RelationQue pagination := x.GetPaginationOptions(opts...) - resp, err := c.ListRelationTuples(g.ctx, &acl.ListRelationTuplesRequest{ + resp, err := c.ListRelationTuples(g.ctx, &rts.ListRelationTuplesRequest{ Query: query, PageToken: pagination.Token, PageSize: int32(pagination.Size), @@ -88,9 +89,9 @@ func (g *grpcClient) queryTuple(t require.TestingT, q *relationtuple.RelationQue } func (g *grpcClient) queryTupleErr(t require.TestingT, expected herodot.DefaultError, q *relationtuple.RelationQuery, opts ...x.PaginationOptionSetter) { - c := acl.NewReadServiceClient(g.readConn(t)) + c := rts.NewReadServiceClient(g.readConn(t)) - query := &acl.ListRelationTuplesRequest_Query{ + query := &rts.ListRelationTuplesRequest_Query{ Namespace: q.Namespace, Object: q.Object, Relation: q.Relation, @@ -101,7 +102,7 @@ func (g *grpcClient) queryTupleErr(t require.TestingT, expected herodot.DefaultE pagination := x.GetPaginationOptions(opts...) - _, err := c.ListRelationTuples(g.ctx, &acl.ListRelationTuplesRequest{ + _, err := c.ListRelationTuples(g.ctx, &rts.ListRelationTuplesRequest{ Query: query, PageToken: pagination.Token, PageSize: int32(pagination.Size), @@ -113,9 +114,9 @@ func (g *grpcClient) queryTupleErr(t require.TestingT, expected herodot.DefaultE } func (g *grpcClient) check(t require.TestingT, r *relationtuple.InternalRelationTuple) bool { - c := acl.NewCheckServiceClient(g.readConn(t)) + c := rts.NewCheckServiceClient(g.readConn(t)) - resp, err := c.Check(g.ctx, &acl.CheckRequest{ + resp, err := c.Check(g.ctx, &rts.CheckRequest{ Namespace: r.Namespace, Object: r.Object, Relation: r.Relation, @@ -127,9 +128,9 @@ func (g *grpcClient) check(t require.TestingT, r *relationtuple.InternalRelation } func (g *grpcClient) expand(t require.TestingT, r *relationtuple.SubjectSet, depth int) *expand.Tree { - c := acl.NewExpandServiceClient(g.readConn(t)) + c := rts.NewExpandServiceClient(g.readConn(t)) - resp, err := c.Expand(g.ctx, &acl.ExpandRequest{ + resp, err := c.Expand(g.ctx, &rts.ExpandRequest{ Subject: r.ToProto(), MaxDepth: int32(depth), }) @@ -170,8 +171,8 @@ func (g *grpcClient) deleteTuple(t require.TestingT, r *relationtuple.InternalRe } func (g *grpcClient) deleteAllTuples(t require.TestingT, q *relationtuple.RelationQuery) { - c := acl.NewWriteServiceClient(g.writeConn(t)) - query := &acl.DeleteRelationTuplesRequest_Query{ + c := rts.NewWriteServiceClient(g.writeConn(t)) + query := &rts.DeleteRelationTuplesRequest_Query{ Namespace: q.Namespace, Object: q.Object, Relation: q.Relation, @@ -179,30 +180,30 @@ func (g *grpcClient) deleteAllTuples(t require.TestingT, q *relationtuple.Relati if s := q.Subject(); s != nil { query.Subject = s.ToProto() } - _, err := c.DeleteRelationTuples(g.ctx, &acl.DeleteRelationTuplesRequest{ + _, err := c.DeleteRelationTuples(g.ctx, &rts.DeleteRelationTuplesRequest{ Query: query, }) require.NoError(t, err) } func (g *grpcClient) transactTuples(t require.TestingT, ins []*relationtuple.InternalRelationTuple, del []*relationtuple.InternalRelationTuple) { - c := acl.NewWriteServiceClient(g.writeConn(t)) + c := rts.NewWriteServiceClient(g.writeConn(t)) - deltas := make([]*acl.RelationTupleDelta, len(ins)+len(del)) + deltas := make([]*rts.RelationTupleDelta, len(ins)+len(del)) for i := range ins { - deltas[i] = &acl.RelationTupleDelta{ + deltas[i] = &rts.RelationTupleDelta{ RelationTuple: ins[i].ToProto(), - Action: acl.RelationTupleDelta_INSERT, + Action: rts.RelationTupleDelta_ACTION_INSERT, } } for i := range del { - deltas[len(ins)+i] = &acl.RelationTupleDelta{ + deltas[len(ins)+i] = &rts.RelationTupleDelta{ RelationTuple: del[i].ToProto(), - Action: acl.RelationTupleDelta_DELETE, + Action: rts.RelationTupleDelta_ACTION_DELETE, } } - _, err := c.TransactRelationTuples(g.ctx, &acl.TransactRelationTuplesRequest{ + _, err := c.TransactRelationTuples(g.ctx, &rts.TransactRelationTuplesRequest{ RelationTupleDeltas: deltas, }) diff --git a/internal/expand/handler.go b/internal/expand/handler.go index 112fca3a3..abf32803c 100644 --- a/internal/expand/handler.go +++ b/internal/expand/handler.go @@ -6,7 +6,7 @@ import ( "github.com/ory/herodot" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" "google.golang.org/grpc" @@ -28,9 +28,9 @@ type ( } ) -var _ acl.ExpandServiceServer = (*handler)(nil) +var _ rts.ExpandServiceServer = (*handler)(nil) -const RouteBase = "/acl/expand" +const RouteBase = "/relation-tuples/expand" func NewHandler(d handlerDependencies) *handler { return &handler{d: d} @@ -43,7 +43,7 @@ func (h *handler) RegisterReadRoutes(r *x.ReadRouter) { func (h *handler) RegisterWriteRoutes(_ *x.WriteRouter) {} func (h *handler) RegisterReadGRPC(s *grpc.Server) { - acl.RegisterExpandServiceServer(s, h) + rts.RegisterExpandServiceServer(s, h) } func (h *handler) RegisterWriteGRPC(s *grpc.Server) {} @@ -55,7 +55,7 @@ type getExpandRequest struct { MaxDepth int `json:"max-depth"` } -// swagger:route GET /acl/expand read getExpand +// swagger:route GET /relation-tuples/expand read getExpand // // Expand a Relation Tuple // @@ -90,7 +90,7 @@ func (h *handler) getExpand(w http.ResponseWriter, r *http.Request, _ httprouter h.d.Writer().Write(w, r, res) } -func (h *handler) Expand(ctx context.Context, req *acl.ExpandRequest) (*acl.ExpandResponse, error) { +func (h *handler) Expand(ctx context.Context, req *rts.ExpandRequest) (*rts.ExpandResponse, error) { sub, err := relationtuple.SubjectFromProto(req.Subject) if err != nil { return nil, err @@ -100,5 +100,5 @@ func (h *handler) Expand(ctx context.Context, req *acl.ExpandRequest) (*acl.Expa return nil, err } - return &acl.ExpandResponse{Tree: tree.ToProto()}, nil + return &rts.ExpandResponse{Tree: tree.ToProto()}, nil } diff --git a/internal/expand/tree.go b/internal/expand/tree.go index 2528e1467..4340ce3e3 100644 --- a/internal/expand/tree.go +++ b/internal/expand/tree.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" "github.com/pkg/errors" @@ -53,29 +53,29 @@ func (t *NodeType) UnmarshalJSON(v []byte) error { return nil } -func (t NodeType) ToProto() acl.NodeType { +func (t NodeType) ToProto() rts.NodeType { switch t { case Leaf: - return acl.NodeType_NODE_TYPE_LEAF + return rts.NodeType_NODE_TYPE_LEAF case Union: - return acl.NodeType_NODE_TYPE_UNION + return rts.NodeType_NODE_TYPE_UNION case Exclusion: - return acl.NodeType_NODE_TYPE_EXCLUSION + return rts.NodeType_NODE_TYPE_EXCLUSION case Intersection: - return acl.NodeType_NODE_TYPE_INTERSECTION + return rts.NodeType_NODE_TYPE_INTERSECTION } - return acl.NodeType_NODE_TYPE_UNSPECIFIED + return rts.NodeType_NODE_TYPE_UNSPECIFIED } -func NodeTypeFromProto(t acl.NodeType) NodeType { +func NodeTypeFromProto(t rts.NodeType) NodeType { switch t { - case acl.NodeType_NODE_TYPE_LEAF: + case rts.NodeType_NODE_TYPE_LEAF: return Leaf - case acl.NodeType_NODE_TYPE_UNION: + case rts.NodeType_NODE_TYPE_UNION: return Union - case acl.NodeType_NODE_TYPE_EXCLUSION: + case rts.NodeType_NODE_TYPE_EXCLUSION: return Exclusion - case acl.NodeType_NODE_TYPE_INTERSECTION: + case rts.NodeType_NODE_TYPE_INTERSECTION: return Intersection } return Leaf @@ -162,24 +162,24 @@ func (t *Tree) MarshalJSON() ([]byte, error) { } // swagger:ignore -func (t *Tree) ToProto() *acl.SubjectTree { +func (t *Tree) ToProto() *rts.SubjectTree { if t == nil { return nil } if t.Type == Leaf { - return &acl.SubjectTree{ - NodeType: acl.NodeType_NODE_TYPE_LEAF, + return &rts.SubjectTree{ + NodeType: rts.NodeType_NODE_TYPE_LEAF, Subject: t.Subject.ToProto(), } } - children := make([]*acl.SubjectTree, len(t.Children)) + children := make([]*rts.SubjectTree, len(t.Children)) for i, c := range t.Children { children[i] = c.ToProto() } - return &acl.SubjectTree{ + return &rts.SubjectTree{ NodeType: t.Type.ToProto(), Subject: t.Subject.ToProto(), Children: children, @@ -187,7 +187,7 @@ func (t *Tree) ToProto() *acl.SubjectTree { } // swagger:ignore -func TreeFromProto(t *acl.SubjectTree) (*Tree, error) { +func TreeFromProto(t *rts.SubjectTree) (*Tree, error) { if t == nil { return nil, nil } @@ -201,7 +201,7 @@ func TreeFromProto(t *acl.SubjectTree) (*Tree, error) { Subject: sub, } - if t.NodeType != acl.NodeType_NODE_TYPE_LEAF { + if t.NodeType != rts.NodeType_NODE_TYPE_LEAF { self.Children = make([]*Tree, len(t.Children)) for i, c := range t.Children { var err error diff --git a/internal/httpclient-next/README.md b/internal/httpclient-next/README.md index 2274a3a59..59bc74698 100644 --- a/internal/httpclient-next/README.md +++ b/internal/httpclient-next/README.md @@ -82,10 +82,10 @@ Class | Method | HTTP request | Description *MetadataApi* | [**GetVersion**](docs/MetadataApi.md#getversion) | **Get** /version | Return Running Software Version. *MetadataApi* | [**IsAlive**](docs/MetadataApi.md#isalive) | **Get** /health/alive | Check HTTP Server Status *MetadataApi* | [**IsReady**](docs/MetadataApi.md#isready) | **Get** /health/ready | Check HTTP Server and Database Status -*ReadApi* | [**GetCheck**](docs/ReadApi.md#getcheck) | **Get** /acl/check | Check a relation tuple -*ReadApi* | [**GetExpand**](docs/ReadApi.md#getexpand) | **Get** /acl/expand | Expand a Relation Tuple +*ReadApi* | [**GetCheck**](docs/ReadApi.md#getcheck) | **Get** /relation-tuples/check | Check a relation tuple +*ReadApi* | [**GetExpand**](docs/ReadApi.md#getexpand) | **Get** /relation-tuples/expand | Expand a Relation Tuple *ReadApi* | [**GetRelationTuples**](docs/ReadApi.md#getrelationtuples) | **Get** /relation-tuples | Query relation tuples -*ReadApi* | [**PostCheck**](docs/ReadApi.md#postcheck) | **Post** /acl/check | Check a relation tuple +*ReadApi* | [**PostCheck**](docs/ReadApi.md#postcheck) | **Post** /relation-tuples/check | Check a relation tuple *WriteApi* | [**CreateRelationTuple**](docs/WriteApi.md#createrelationtuple) | **Put** /admin/relation-tuples | Create a Relation Tuple *WriteApi* | [**DeleteRelationTuples**](docs/WriteApi.md#deleterelationtuples) | **Delete** /admin/relation-tuples | Delete Relation Tuples *WriteApi* | [**PatchRelationTuples**](docs/WriteApi.md#patchrelationtuples) | **Patch** /admin/relation-tuples | Patch Multiple Relation Tuples diff --git a/internal/httpclient-next/api/openapi.yaml b/internal/httpclient-next/api/openapi.yaml index 0888938cc..a57e95b40 100644 --- a/internal/httpclient-next/api/openapi.yaml +++ b/internal/httpclient-next/api/openapi.yaml @@ -10,216 +10,6 @@ info: servers: - url: / paths: - /acl/check: - get: - description: To learn how relation tuples and the check works, head over to - [the documentation](../concepts/relation-tuples.mdx). - operationId: getCheck - parameters: - - description: Namespace of the Relation Tuple - explode: true - in: query - name: namespace - required: false - schema: - type: string - style: form - - description: Object of the Relation Tuple - explode: true - in: query - name: object - required: false - schema: - type: string - style: form - - description: Relation of the Relation Tuple - explode: true - in: query - name: relation - required: false - schema: - type: string - style: form - - description: SubjectID of the Relation Tuple - explode: true - in: query - name: subject_id - required: false - schema: - type: string - style: form - - description: Namespace of the Subject Set - explode: true - in: query - name: subject_set.namespace - required: false - schema: - type: string - style: form - - description: Object of the Subject Set - explode: true - in: query - name: subject_set.object - required: false - schema: - type: string - style: form - - description: Relation of the Subject Set - explode: true - in: query - name: subject_set.relation - required: false - schema: - type: string - style: form - - explode: true - in: query - name: max-depth - required: false - schema: - format: int64 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getCheckResponse' - description: getCheckResponse - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/getCheckResponse' - description: getCheckResponse - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Check a relation tuple - tags: - - read - post: - description: To learn how relation tuples and the check works, head over to - [the documentation](../concepts/relation-tuples.mdx). - operationId: postCheck - parameters: - - explode: true - in: query - name: max-depth - required: false - schema: - format: int64 - type: integer - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RelationQuery' - x-originalParamName: Payload - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getCheckResponse' - description: getCheckResponse - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/getCheckResponse' - description: getCheckResponse - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Check a relation tuple - tags: - - read - /acl/expand: - get: - description: Use this endpoint to expand a relation tuple. - operationId: getExpand - parameters: - - description: Namespace of the Subject Set - explode: true - in: query - name: namespace - required: true - schema: - type: string - style: form - - description: Object of the Subject Set - explode: true - in: query - name: object - required: true - schema: - type: string - style: form - - description: Relation of the Subject Set - explode: true - in: query - name: relation - required: true - schema: - type: string - style: form - - explode: true - in: query - name: max-depth - required: false - schema: - format: int64 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/expandTree' - description: expandTree - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Expand a Relation Tuple - tags: - - read /admin/relation-tuples: delete: description: Use this endpoint to delete relation tuples @@ -522,6 +312,216 @@ paths: summary: Query relation tuples tags: - read + /relation-tuples/check: + get: + description: To learn how relation tuples and the check works, head over to + [the documentation](../concepts/relation-tuples.mdx). + operationId: getCheck + parameters: + - description: Namespace of the Relation Tuple + explode: true + in: query + name: namespace + required: false + schema: + type: string + style: form + - description: Object of the Relation Tuple + explode: true + in: query + name: object + required: false + schema: + type: string + style: form + - description: Relation of the Relation Tuple + explode: true + in: query + name: relation + required: false + schema: + type: string + style: form + - description: SubjectID of the Relation Tuple + explode: true + in: query + name: subject_id + required: false + schema: + type: string + style: form + - description: Namespace of the Subject Set + explode: true + in: query + name: subject_set.namespace + required: false + schema: + type: string + style: form + - description: Object of the Subject Set + explode: true + in: query + name: subject_set.object + required: false + schema: + type: string + style: form + - description: Relation of the Subject Set + explode: true + in: query + name: subject_set.relation + required: false + schema: + type: string + style: form + - explode: true + in: query + name: max-depth + required: false + schema: + format: int64 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getCheckResponse' + description: getCheckResponse + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/getCheckResponse' + description: getCheckResponse + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Check a relation tuple + tags: + - read + post: + description: To learn how relation tuples and the check works, head over to + [the documentation](../concepts/relation-tuples.mdx). + operationId: postCheck + parameters: + - explode: true + in: query + name: max-depth + required: false + schema: + format: int64 + type: integer + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RelationQuery' + x-originalParamName: Payload + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getCheckResponse' + description: getCheckResponse + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/getCheckResponse' + description: getCheckResponse + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Check a relation tuple + tags: + - read + /relation-tuples/expand: + get: + description: Use this endpoint to expand a relation tuple. + operationId: getExpand + parameters: + - description: Namespace of the Subject Set + explode: true + in: query + name: namespace + required: true + schema: + type: string + style: form + - description: Object of the Subject Set + explode: true + in: query + name: object + required: true + schema: + type: string + style: form + - description: Relation of the Subject Set + explode: true + in: query + name: relation + required: true + schema: + type: string + style: form + - explode: true + in: query + name: max-depth + required: false + schema: + format: int64 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/expandTree' + description: expandTree + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Expand a Relation Tuple + tags: + - read /version: get: description: |- @@ -716,7 +716,7 @@ components: type: boolean required: - allowed - title: Represents the response for a check request. + title: RESTResponse is the response for a check request. type: object getRelationTuplesResponse: example: diff --git a/internal/httpclient-next/api_read.go b/internal/httpclient-next/api_read.go index c404c2a75..9529fc041 100644 --- a/internal/httpclient-next/api_read.go +++ b/internal/httpclient-next/api_read.go @@ -168,7 +168,7 @@ func (a *ReadApiService) GetCheckExecute(r ReadApiApiGetCheckRequest) (*GetCheck return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/acl/check" + localVarPath := localBasePath + "/relation-tuples/check" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -343,7 +343,7 @@ func (a *ReadApiService) GetExpandExecute(r ReadApiApiGetExpandRequest) (*Expand return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/acl/expand" + localVarPath := localBasePath + "/relation-tuples/expand" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -692,7 +692,7 @@ func (a *ReadApiService) PostCheckExecute(r ReadApiApiPostCheckRequest) (*GetChe return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/acl/check" + localVarPath := localBasePath + "/relation-tuples/check" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/internal/httpclient-next/docs/ReadApi.md b/internal/httpclient-next/docs/ReadApi.md index 45e0ee57f..bb57fa395 100644 --- a/internal/httpclient-next/docs/ReadApi.md +++ b/internal/httpclient-next/docs/ReadApi.md @@ -4,10 +4,10 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetCheck**](ReadApi.md#GetCheck) | **Get** /acl/check | Check a relation tuple -[**GetExpand**](ReadApi.md#GetExpand) | **Get** /acl/expand | Expand a Relation Tuple +[**GetCheck**](ReadApi.md#GetCheck) | **Get** /relation-tuples/check | Check a relation tuple +[**GetExpand**](ReadApi.md#GetExpand) | **Get** /relation-tuples/expand | Expand a Relation Tuple [**GetRelationTuples**](ReadApi.md#GetRelationTuples) | **Get** /relation-tuples | Query relation tuples -[**PostCheck**](ReadApi.md#PostCheck) | **Post** /acl/check | Check a relation tuple +[**PostCheck**](ReadApi.md#PostCheck) | **Post** /relation-tuples/check | Check a relation tuple diff --git a/internal/httpclient/client/read/get_check_responses.go b/internal/httpclient/client/read/get_check_responses.go index aace82caf..17d8aae46 100644 --- a/internal/httpclient/client/read/get_check_responses.go +++ b/internal/httpclient/client/read/get_check_responses.go @@ -66,7 +66,7 @@ type GetCheckOK struct { } func (o *GetCheckOK) Error() string { - return fmt.Sprintf("[GET /acl/check][%d] getCheckOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /relation-tuples/check][%d] getCheckOK %+v", 200, o.Payload) } func (o *GetCheckOK) GetPayload() *models.GetCheckResponse { return o.Payload @@ -98,7 +98,7 @@ type GetCheckBadRequest struct { } func (o *GetCheckBadRequest) Error() string { - return fmt.Sprintf("[GET /acl/check][%d] getCheckBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[GET /relation-tuples/check][%d] getCheckBadRequest %+v", 400, o.Payload) } func (o *GetCheckBadRequest) GetPayload() *models.GenericError { return o.Payload @@ -130,7 +130,7 @@ type GetCheckForbidden struct { } func (o *GetCheckForbidden) Error() string { - return fmt.Sprintf("[GET /acl/check][%d] getCheckForbidden %+v", 403, o.Payload) + return fmt.Sprintf("[GET /relation-tuples/check][%d] getCheckForbidden %+v", 403, o.Payload) } func (o *GetCheckForbidden) GetPayload() *models.GetCheckResponse { return o.Payload @@ -162,7 +162,7 @@ type GetCheckInternalServerError struct { } func (o *GetCheckInternalServerError) Error() string { - return fmt.Sprintf("[GET /acl/check][%d] getCheckInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[GET /relation-tuples/check][%d] getCheckInternalServerError %+v", 500, o.Payload) } func (o *GetCheckInternalServerError) GetPayload() *models.GenericError { return o.Payload diff --git a/internal/httpclient/client/read/get_expand_responses.go b/internal/httpclient/client/read/get_expand_responses.go index 8d760abbc..8d3c43658 100644 --- a/internal/httpclient/client/read/get_expand_responses.go +++ b/internal/httpclient/client/read/get_expand_responses.go @@ -66,7 +66,7 @@ type GetExpandOK struct { } func (o *GetExpandOK) Error() string { - return fmt.Sprintf("[GET /acl/expand][%d] getExpandOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /relation-tuples/expand][%d] getExpandOK %+v", 200, o.Payload) } func (o *GetExpandOK) GetPayload() *models.ExpandTree { return o.Payload @@ -98,7 +98,7 @@ type GetExpandBadRequest struct { } func (o *GetExpandBadRequest) Error() string { - return fmt.Sprintf("[GET /acl/expand][%d] getExpandBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[GET /relation-tuples/expand][%d] getExpandBadRequest %+v", 400, o.Payload) } func (o *GetExpandBadRequest) GetPayload() *models.GenericError { return o.Payload @@ -130,7 +130,7 @@ type GetExpandNotFound struct { } func (o *GetExpandNotFound) Error() string { - return fmt.Sprintf("[GET /acl/expand][%d] getExpandNotFound %+v", 404, o.Payload) + return fmt.Sprintf("[GET /relation-tuples/expand][%d] getExpandNotFound %+v", 404, o.Payload) } func (o *GetExpandNotFound) GetPayload() *models.GenericError { return o.Payload @@ -162,7 +162,7 @@ type GetExpandInternalServerError struct { } func (o *GetExpandInternalServerError) Error() string { - return fmt.Sprintf("[GET /acl/expand][%d] getExpandInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[GET /relation-tuples/expand][%d] getExpandInternalServerError %+v", 500, o.Payload) } func (o *GetExpandInternalServerError) GetPayload() *models.GenericError { return o.Payload diff --git a/internal/httpclient/client/read/post_check_responses.go b/internal/httpclient/client/read/post_check_responses.go index a1929fab8..4839b24d9 100644 --- a/internal/httpclient/client/read/post_check_responses.go +++ b/internal/httpclient/client/read/post_check_responses.go @@ -66,7 +66,7 @@ type PostCheckOK struct { } func (o *PostCheckOK) Error() string { - return fmt.Sprintf("[POST /acl/check][%d] postCheckOK %+v", 200, o.Payload) + return fmt.Sprintf("[POST /relation-tuples/check][%d] postCheckOK %+v", 200, o.Payload) } func (o *PostCheckOK) GetPayload() *models.GetCheckResponse { return o.Payload @@ -98,7 +98,7 @@ type PostCheckBadRequest struct { } func (o *PostCheckBadRequest) Error() string { - return fmt.Sprintf("[POST /acl/check][%d] postCheckBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[POST /relation-tuples/check][%d] postCheckBadRequest %+v", 400, o.Payload) } func (o *PostCheckBadRequest) GetPayload() *models.GenericError { return o.Payload @@ -130,7 +130,7 @@ type PostCheckForbidden struct { } func (o *PostCheckForbidden) Error() string { - return fmt.Sprintf("[POST /acl/check][%d] postCheckForbidden %+v", 403, o.Payload) + return fmt.Sprintf("[POST /relation-tuples/check][%d] postCheckForbidden %+v", 403, o.Payload) } func (o *PostCheckForbidden) GetPayload() *models.GetCheckResponse { return o.Payload @@ -162,7 +162,7 @@ type PostCheckInternalServerError struct { } func (o *PostCheckInternalServerError) Error() string { - return fmt.Sprintf("[POST /acl/check][%d] postCheckInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[POST /relation-tuples/check][%d] postCheckInternalServerError %+v", 500, o.Payload) } func (o *PostCheckInternalServerError) GetPayload() *models.GenericError { return o.Payload diff --git a/internal/httpclient/client/read/read_client.go b/internal/httpclient/client/read/read_client.go index 825ad6733..fe408bfd2 100644 --- a/internal/httpclient/client/read/read_client.go +++ b/internal/httpclient/client/read/read_client.go @@ -54,7 +54,7 @@ func (a *Client) GetCheck(params *GetCheckParams, opts ...ClientOption) (*GetChe op := &runtime.ClientOperation{ ID: "getCheck", Method: "GET", - PathPattern: "/acl/check", + PathPattern: "/relation-tuples/check", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/x-www-form-urlencoded"}, Schemes: []string{"http", "https"}, @@ -94,7 +94,7 @@ func (a *Client) GetExpand(params *GetExpandParams, opts ...ClientOption) (*GetE op := &runtime.ClientOperation{ ID: "getExpand", Method: "GET", - PathPattern: "/acl/expand", + PathPattern: "/relation-tuples/expand", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/x-www-form-urlencoded"}, Schemes: []string{"http", "https"}, @@ -174,7 +174,7 @@ func (a *Client) PostCheck(params *PostCheckParams, opts ...ClientOption) (*Post op := &runtime.ClientOperation{ ID: "postCheck", Method: "POST", - PathPattern: "/acl/check", + PathPattern: "/relation-tuples/check", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, diff --git a/internal/httpclient/models/get_check_response.go b/internal/httpclient/models/get_check_response.go index 37c08646a..5c167f084 100644 --- a/internal/httpclient/models/get_check_response.go +++ b/internal/httpclient/models/get_check_response.go @@ -14,7 +14,7 @@ import ( "github.com/go-openapi/validate" ) -// GetCheckResponse Represents the response for a check request. +// GetCheckResponse RESTResponse is the response for a check request. // // The content of the allowed field is mirrored in the HTTP status code. // diff --git a/internal/relationtuple/definitions.go b/internal/relationtuple/definitions.go index e7647f563..9fc1c63c9 100644 --- a/internal/relationtuple/definitions.go +++ b/internal/relationtuple/definitions.go @@ -8,14 +8,14 @@ import ( "strings" "testing" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" + "github.com/ory/x/pointerx" "github.com/ory/herodot" "github.com/sirupsen/logrus" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" - "github.com/pkg/errors" "github.com/ory/keto/internal/x" @@ -34,7 +34,7 @@ type ( } RelationCollection struct { - protoRelations []*acl.RelationTuple + protoRelations []*rts.RelationTuple internalRelations []*InternalRelationTuple } SubjectID struct { @@ -67,7 +67,7 @@ type RelationQuery struct { // swagger:ignore type TupleData interface { // swagger:ignore - GetSubject() *acl.Subject + GetSubject() *rts.Subject GetObject() string GetNamespace() string GetRelation() string @@ -87,7 +87,7 @@ type Subject interface { SubjectSet() *SubjectSet // swagger:ignore - ToProto() *acl.Subject + ToProto() *rts.Subject } // swagger:ignore @@ -142,15 +142,15 @@ func SubjectFromString(s string) (Subject, error) { } // swagger:ignore -func SubjectFromProto(gs *acl.Subject) (Subject, error) { +func SubjectFromProto(gs *rts.Subject) (Subject, error) { switch s := gs.GetRef().(type) { case nil: return nil, errors.WithStack(ErrNilSubject) - case *acl.Subject_Id: + case *rts.Subject_Id: return &SubjectID{ ID: s.Id, }, nil - case *acl.Subject_Set: + case *rts.Subject_Set: return &SubjectSet{ Namespace: s.Set.Namespace, Object: s.Set.Object, @@ -228,19 +228,19 @@ func (s *SubjectID) SubjectSet() *SubjectSet { } // swagger:ignore -func (s *SubjectID) ToProto() *acl.Subject { - return &acl.Subject{ - Ref: &acl.Subject_Id{ +func (s *SubjectID) ToProto() *rts.Subject { + return &rts.Subject{ + Ref: &rts.Subject_Id{ Id: s.ID, }, } } // swagger:ignore -func (s *SubjectSet) ToProto() *acl.Subject { - return &acl.Subject{ - Ref: &acl.Subject_Set{ - Set: &acl.SubjectSet{ +func (s *SubjectSet) ToProto() *rts.Subject { + return &rts.Subject{ + Ref: &rts.Subject_Set{ + Set: &rts.SubjectSet{ Namespace: s.Namespace, Object: s.Object, Relation: s.Relation, @@ -355,8 +355,8 @@ func (r *InternalRelationTuple) FromDataProvider(d TupleData) (*InternalRelation return r, nil } -func (r *InternalRelationTuple) ToProto() *acl.RelationTuple { - return &acl.RelationTuple{ +func (r *InternalRelationTuple) ToProto() *rts.RelationTuple { + return &rts.RelationTuple{ Namespace: r.Namespace, Object: r.Object, Relation: r.Relation, @@ -431,9 +431,9 @@ func (q *RelationQuery) FromProto(query TupleData) (*RelationQuery, error) { if query.GetSubject() != nil { switch s := query.GetSubject().Ref.(type) { - case *acl.Subject_Id: + case *rts.Subject_Id: q.SubjectID = &s.Id - case *acl.Subject_Set: + case *rts.Subject_Set: q.SubjectSet = &SubjectSet{ Namespace: s.Set.Namespace, Object: s.Set.Object, @@ -552,7 +552,7 @@ func (r *InternalRelationTuple) Interface() interface{} { return r } -func NewProtoRelationCollection(rels []*acl.RelationTuple) *RelationCollection { +func NewProtoRelationCollection(rels []*rts.RelationTuple) *RelationCollection { return &RelationCollection{ protoRelations: rels, } diff --git a/internal/relationtuple/definitions_test.go b/internal/relationtuple/definitions_test.go index e97efff16..089077b60 100644 --- a/internal/relationtuple/definitions_test.go +++ b/internal/relationtuple/definitions_test.go @@ -8,14 +8,14 @@ import ( "strconv" "testing" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" + "github.com/ory/x/pointerx" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" ) func TestSubject(t *testing.T) { @@ -74,13 +74,13 @@ func TestSubject(t *testing.T) { t.Run("case=proto decoding", func(t *testing.T) { for i, tc := range []struct { - proto *acl.Subject + proto *rts.Subject expected Subject err error }{ { - proto: &acl.Subject{ - Ref: &acl.Subject_Id{Id: "foo"}, + proto: &rts.Subject{ + Ref: &rts.Subject_Id{Id: "foo"}, }, expected: &SubjectID{ID: "foo"}, }, @@ -89,9 +89,9 @@ func TestSubject(t *testing.T) { err: ErrNilSubject, }, { - proto: &acl.Subject{ - Ref: &acl.Subject_Set{ - Set: &acl.SubjectSet{ + proto: &rts.Subject{ + Ref: &rts.Subject_Set{ + Set: &rts.SubjectSet{ Namespace: "n", Object: "o", Relation: "r", @@ -410,7 +410,7 @@ func TestInternalRelationTuple(t *testing.T) { err error }{ { - proto: &acl.RelationTuple{ + proto: &rts.RelationTuple{ Namespace: "n", Object: "o", Relation: "r", @@ -419,13 +419,13 @@ func TestInternalRelationTuple(t *testing.T) { err: ErrNilSubject, }, { - proto: &acl.RelationTuple{ + proto: &rts.RelationTuple{ Namespace: "n", Object: "o", Relation: "r", - Subject: &acl.Subject{ - Ref: &acl.Subject_Set{ - Set: &acl.SubjectSet{ + Subject: &rts.Subject{ + Ref: &rts.Subject_Set{ + Set: &rts.SubjectSet{ Namespace: "n", Object: "o", Relation: "r", @@ -445,12 +445,12 @@ func TestInternalRelationTuple(t *testing.T) { }, }, { - proto: &acl.RelationTuple{ + proto: &rts.RelationTuple{ Namespace: "n", Object: "o", Relation: "r", - Subject: &acl.Subject{ - Ref: &acl.Subject_Id{ + Subject: &rts.Subject{ + Ref: &rts.Subject_Id{ Id: "user", }, }, @@ -615,9 +615,9 @@ func TestRelationCollection(t *testing.T) { Relation: "sr", } - proto := make([]*acl.RelationTuple, 3) + proto := make([]*rts.RelationTuple, 3) for i := range expected { - proto[i] = &acl.RelationTuple{ + proto[i] = &rts.RelationTuple{ Namespace: "n" + strconv.Itoa(i), Object: "o" + strconv.Itoa(i), Relation: "r" + strconv.Itoa(i), @@ -631,7 +631,7 @@ func TestRelationCollection(t *testing.T) { }).ToProto() NewRelationCollection([]*InternalRelationTuple{}) - NewProtoRelationCollection([]*acl.RelationTuple{}) + NewProtoRelationCollection([]*rts.RelationTuple{}) for i, c := range []*RelationCollection{ NewRelationCollection(expected), @@ -674,7 +674,7 @@ func TestRelationCollection(t *testing.T) { err error }{ { - collection: NewProtoRelationCollection([]*acl.RelationTuple{{ + collection: NewProtoRelationCollection([]*rts.RelationTuple{{ Namespace: "n", Object: "o", Relation: "r", @@ -688,7 +688,7 @@ func TestRelationCollection(t *testing.T) { }}, }, { - collection: NewProtoRelationCollection([]*acl.RelationTuple{{ /*subject is nil*/ }}), + collection: NewProtoRelationCollection([]*rts.RelationTuple{{ /*subject is nil*/ }}), err: ErrNilSubject, }, } { diff --git a/internal/relationtuple/handler.go b/internal/relationtuple/handler.go index 989a7b009..03225ed52 100644 --- a/internal/relationtuple/handler.go +++ b/internal/relationtuple/handler.go @@ -3,7 +3,7 @@ package relationtuple import ( "google.golang.org/grpc" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" "github.com/ory/keto/internal/x" ) @@ -50,9 +50,9 @@ func (h *handler) RegisterWriteRoutes(r *x.WriteRouter) { } func (h *handler) RegisterReadGRPC(s *grpc.Server) { - acl.RegisterReadServiceServer(s, h) + rts.RegisterReadServiceServer(s, h) } func (h *handler) RegisterWriteGRPC(s *grpc.Server) { - acl.RegisterWriteServiceServer(s, h) + rts.RegisterWriteServiceServer(s, h) } diff --git a/internal/relationtuple/read_server.go b/internal/relationtuple/read_server.go index 593ef2c5b..cc36f682e 100644 --- a/internal/relationtuple/read_server.go +++ b/internal/relationtuple/read_server.go @@ -5,20 +5,20 @@ import ( "net/http" "strconv" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" + "github.com/ory/herodot" "github.com/pkg/errors" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" - "github.com/julienschmidt/httprouter" "github.com/ory/keto/internal/x" ) -var _ acl.ReadServiceServer = (*handler)(nil) +var _ rts.ReadServiceServer = (*handler)(nil) -func (h *handler) ListRelationTuples(ctx context.Context, req *acl.ListRelationTuplesRequest) (*acl.ListRelationTuplesResponse, error) { +func (h *handler) ListRelationTuples(ctx context.Context, req *rts.ListRelationTuplesRequest) (*rts.ListRelationTuplesResponse, error) { if req.Query == nil { return nil, errors.New("invalid request") } @@ -36,8 +36,8 @@ func (h *handler) ListRelationTuples(ctx context.Context, req *acl.ListRelationT return nil, err } - resp := &acl.ListRelationTuplesResponse{ - RelationTuples: make([]*acl.RelationTuple, len(rels)), + resp := &rts.ListRelationTuplesResponse{ + RelationTuples: make([]*rts.RelationTuple, len(rels)), NextPageToken: nextPage, } for i, r := range rels { diff --git a/internal/relationtuple/transact_server.go b/internal/relationtuple/transact_server.go index 729f6f57a..5bdd02e72 100644 --- a/internal/relationtuple/transact_server.go +++ b/internal/relationtuple/transact_server.go @@ -5,16 +5,16 @@ import ( "encoding/json" "net/http" - acl "github.com/ory/keto/proto/ory/keto/acl/v1alpha1" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" "github.com/julienschmidt/httprouter" "github.com/ory/herodot" "github.com/pkg/errors" ) -var _ acl.WriteServiceServer = (*handler)(nil) +var _ rts.WriteServiceServer = (*handler)(nil) -func protoTuplesWithAction(deltas []*acl.RelationTupleDelta, action acl.RelationTupleDelta_Action) (filtered []*InternalRelationTuple, err error) { +func protoTuplesWithAction(deltas []*rts.RelationTupleDelta, action rts.RelationTupleDelta_Action) (filtered []*InternalRelationTuple, err error) { for _, d := range deltas { if d.Action == action { it, err := (&InternalRelationTuple{}).FromDataProvider(d.RelationTuple) @@ -27,13 +27,13 @@ func protoTuplesWithAction(deltas []*acl.RelationTupleDelta, action acl.Relation return } -func (h *handler) TransactRelationTuples(ctx context.Context, req *acl.TransactRelationTuplesRequest) (*acl.TransactRelationTuplesResponse, error) { - insertTuples, err := protoTuplesWithAction(req.RelationTupleDeltas, acl.RelationTupleDelta_INSERT) +func (h *handler) TransactRelationTuples(ctx context.Context, req *rts.TransactRelationTuplesRequest) (*rts.TransactRelationTuplesResponse, error) { + insertTuples, err := protoTuplesWithAction(req.RelationTupleDeltas, rts.RelationTupleDelta_ACTION_INSERT) if err != nil { return nil, err } - deleteTuples, err := protoTuplesWithAction(req.RelationTupleDeltas, acl.RelationTupleDelta_DELETE) + deleteTuples, err := protoTuplesWithAction(req.RelationTupleDeltas, rts.RelationTupleDelta_ACTION_DELETE) if err != nil { return nil, err } @@ -47,12 +47,12 @@ func (h *handler) TransactRelationTuples(ctx context.Context, req *acl.TransactR for i := range insertTuples { snaptokens[i] = "not yet implemented" } - return &acl.TransactRelationTuplesResponse{ + return &rts.TransactRelationTuplesResponse{ Snaptokens: snaptokens, }, nil } -func (h *handler) DeleteRelationTuples(ctx context.Context, req *acl.DeleteRelationTuplesRequest) (*acl.DeleteRelationTuplesResponse, error) { +func (h *handler) DeleteRelationTuples(ctx context.Context, req *rts.DeleteRelationTuplesRequest) (*rts.DeleteRelationTuplesResponse, error) { if req.Query == nil { return nil, errors.WithStack(herodot.ErrBadRequest.WithReason("invalid request")) } @@ -66,7 +66,7 @@ func (h *handler) DeleteRelationTuples(ctx context.Context, req *acl.DeleteRelat return nil, errors.WithStack(herodot.ErrInternalServerError.WithError(err.Error())) } - return &acl.DeleteRelationTuplesResponse{}, nil + return &rts.DeleteRelationTuplesResponse{}, nil } // The basic ACL relation tuple diff --git a/proto/index.d.ts b/proto/index.d.ts index 6eeb0b350..00722a258 100644 --- a/proto/index.d.ts +++ b/proto/index.d.ts @@ -1,5 +1,5 @@ -import * as v1apha1 from './ory/keto/acl/v1alpha1' +import * as v1apha2 from './ory/keto/relation_tuples/v1alpha2' declare module '@ory/keto-grpc-client' { - export default v1apha1 + export default v1apha2 } diff --git a/proto/index.js b/proto/index.js index cc19930b8..d269b5ff1 100644 --- a/proto/index.js +++ b/proto/index.js @@ -1 +1 @@ -module.exports = require('./ory/keto/acl/v1alpha1') +module.exports = require('./ory/keto/relation_tuples/v1alpha2') diff --git a/proto/ory/keto/README.md b/proto/ory/keto/README.md index 46dfb95ba..ba8b9fd0d 100644 --- a/proto/ory/keto/README.md +++ b/proto/ory/keto/README.md @@ -3,7 +3,7 @@ > ORY Keto is still a `sandbox` project and the included APIs are unstable until > we reach `v1` and release `v1.0.0` of Keto! > -> Older API versions, such as `v1alpha1`, will still get support for a +> Older API versions, such as `v1alpha2`, will still get support for a > reasonable amount of time after release of `v1`! This directory contains the ProtoBuf & gRPC definitions for the Access Control diff --git a/proto/ory/keto/acl/v1alpha1/acl.pb.go b/proto/ory/keto/acl/v1alpha1/acl.pb.go deleted file mode 100644 index fdc29533b..000000000 --- a/proto/ory/keto/acl/v1alpha1/acl.pb.go +++ /dev/null @@ -1,391 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc v3.13.0 -// source: ory/keto/acl/v1alpha1/acl.proto - -package acl - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// RelationTuple defines a relation between an Object and a Subject. -type RelationTuple struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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"` -} - -func (x *RelationTuple) Reset() { - *x = RelationTuple{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_acl_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_acl_v1alpha1_acl_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RelationTuple.ProtoReflect.Descriptor instead. -func (*RelationTuple) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_acl_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 -} - -// Subject is either a concrete subject id or -// a `SubjectSet` expanding to more Subjects. -type Subject struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The reference of this abstract subject. - // - // Types that are assignable to Ref: - // *Subject_Id - // *Subject_Set - Ref isSubject_Ref `protobuf_oneof:"ref"` -} - -func (x *Subject) Reset() { - *x = Subject{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_acl_proto_msgTypes[1] - 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_acl_v1alpha1_acl_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Subject.ProtoReflect.Descriptor instead. -func (*Subject) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_acl_proto_rawDescGZIP(), []int{1} -} - -func (m *Subject) GetRef() isSubject_Ref { - if m != nil { - return m.Ref - } - return nil -} - -func (x *Subject) GetId() string { - if x, ok := x.GetRef().(*Subject_Id); ok { - return x.Id - } - return "" -} - -func (x *Subject) GetSet() *SubjectSet { - if x, ok := x.GetRef().(*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/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 - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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"` -} - -func (x *SubjectSet) Reset() { - *x = SubjectSet{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_acl_proto_msgTypes[2] - 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_acl_v1alpha1_acl_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubjectSet.ProtoReflect.Descriptor instead. -func (*SubjectSet) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_acl_proto_rawDescGZIP(), []int{2} -} - -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_acl_v1alpha1_acl_proto protoreflect.FileDescriptor - -var file_ory_keto_acl_v1alpha1_acl_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x61, 0x63, 0x6c, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x15, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x9b, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x07, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x59, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x03, 0x73, 0x65, 0x74, 0x42, 0x05, 0x0a, 0x03, 0x72, 0x65, - 0x66, 0x22, 0x5e, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x8b, 0x01, 0x0a, 0x18, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, - 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x08, - 0x41, 0x63, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x61, - 0x63, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x61, 0x63, 0x6c, 0xaa, - 0x02, 0x15, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x41, 0x63, 0x6c, 0x2e, 0x56, - 0x31, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, - 0x74, 0x6f, 0x5c, 0x41, 0x63, 0x6c, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_ory_keto_acl_v1alpha1_acl_proto_rawDescOnce sync.Once - file_ory_keto_acl_v1alpha1_acl_proto_rawDescData = file_ory_keto_acl_v1alpha1_acl_proto_rawDesc -) - -func file_ory_keto_acl_v1alpha1_acl_proto_rawDescGZIP() []byte { - file_ory_keto_acl_v1alpha1_acl_proto_rawDescOnce.Do(func() { - file_ory_keto_acl_v1alpha1_acl_proto_rawDescData = protoimpl.X.CompressGZIP(file_ory_keto_acl_v1alpha1_acl_proto_rawDescData) - }) - return file_ory_keto_acl_v1alpha1_acl_proto_rawDescData -} - -var file_ory_keto_acl_v1alpha1_acl_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_ory_keto_acl_v1alpha1_acl_proto_goTypes = []interface{}{ - (*RelationTuple)(nil), // 0: ory.keto.acl.v1alpha1.RelationTuple - (*Subject)(nil), // 1: ory.keto.acl.v1alpha1.Subject - (*SubjectSet)(nil), // 2: ory.keto.acl.v1alpha1.SubjectSet -} -var file_ory_keto_acl_v1alpha1_acl_proto_depIdxs = []int32{ - 1, // 0: ory.keto.acl.v1alpha1.RelationTuple.subject:type_name -> ory.keto.acl.v1alpha1.Subject - 2, // 1: ory.keto.acl.v1alpha1.Subject.set:type_name -> ory.keto.acl.v1alpha1.SubjectSet - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_ory_keto_acl_v1alpha1_acl_proto_init() } -func file_ory_keto_acl_v1alpha1_acl_proto_init() { - if File_ory_keto_acl_v1alpha1_acl_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_ory_keto_acl_v1alpha1_acl_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RelationTuple); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_acl_v1alpha1_acl_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Subject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_acl_v1alpha1_acl_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubjectSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_ory_keto_acl_v1alpha1_acl_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*Subject_Id)(nil), - (*Subject_Set)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ory_keto_acl_v1alpha1_acl_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_ory_keto_acl_v1alpha1_acl_proto_goTypes, - DependencyIndexes: file_ory_keto_acl_v1alpha1_acl_proto_depIdxs, - MessageInfos: file_ory_keto_acl_v1alpha1_acl_proto_msgTypes, - }.Build() - File_ory_keto_acl_v1alpha1_acl_proto = out.File - file_ory_keto_acl_v1alpha1_acl_proto_rawDesc = nil - file_ory_keto_acl_v1alpha1_acl_proto_goTypes = nil - file_ory_keto_acl_v1alpha1_acl_proto_depIdxs = nil -} diff --git a/proto/ory/keto/acl/v1alpha1/check_service_grpc_pb.d.ts b/proto/ory/keto/acl/v1alpha1/check_service_grpc_pb.d.ts deleted file mode 100644 index 393a6edc9..000000000 --- a/proto/ory/keto/acl/v1alpha1/check_service_grpc_pb.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -// package: ory.keto.acl.v1alpha1 -// file: ory/keto/acl/v1alpha1/check_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "grpc"; -import * as ory_keto_acl_v1alpha1_check_service_pb from "../../../../ory/keto/acl/v1alpha1/check_service_pb"; -import * as ory_keto_acl_v1alpha1_acl_pb from "../../../../ory/keto/acl/v1alpha1/acl_pb"; - -interface ICheckServiceService extends grpc.ServiceDefinition { - check: ICheckServiceService_ICheck; -} - -interface ICheckServiceService_ICheck extends grpc.MethodDefinition { - path: "/ory.keto.acl.v1alpha1.CheckService/Check"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const CheckServiceService: ICheckServiceService; - -export interface ICheckServiceServer { - check: grpc.handleUnaryCall; -} - -export interface ICheckServiceClient { - check(request: ory_keto_acl_v1alpha1_check_service_pb.CheckRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; - check(request: ory_keto_acl_v1alpha1_check_service_pb.CheckRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; - check(request: ory_keto_acl_v1alpha1_check_service_pb.CheckRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; -} - -export class CheckServiceClient extends grpc.Client implements ICheckServiceClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public check(request: ory_keto_acl_v1alpha1_check_service_pb.CheckRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; - public check(request: ory_keto_acl_v1alpha1_check_service_pb.CheckRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; - public check(request: ory_keto_acl_v1alpha1_check_service_pb.CheckRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; -} diff --git a/proto/ory/keto/acl/v1alpha1/check_service_grpc_pb.js b/proto/ory/keto/acl/v1alpha1/check_service_grpc_pb.js deleted file mode 100644 index 9d3e13865..000000000 --- a/proto/ory/keto/acl/v1alpha1/check_service_grpc_pb.js +++ /dev/null @@ -1,50 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var ory_keto_acl_v1alpha1_check_service_pb = require('../../../../ory/keto/acl/v1alpha1/check_service_pb.js'); -var ory_keto_acl_v1alpha1_acl_pb = require('../../../../ory/keto/acl/v1alpha1/acl_pb.js'); - -function serialize_ory_keto_acl_v1alpha1_CheckRequest(arg) { - if (!(arg instanceof ory_keto_acl_v1alpha1_check_service_pb.CheckRequest)) { - throw new Error('Expected argument of type ory.keto.acl.v1alpha1.CheckRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_acl_v1alpha1_CheckRequest(buffer_arg) { - return ory_keto_acl_v1alpha1_check_service_pb.CheckRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_ory_keto_acl_v1alpha1_CheckResponse(arg) { - if (!(arg instanceof ory_keto_acl_v1alpha1_check_service_pb.CheckResponse)) { - throw new Error('Expected argument of type ory.keto.acl.v1alpha1.CheckResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_acl_v1alpha1_CheckResponse(buffer_arg) { - return ory_keto_acl_v1alpha1_check_service_pb.CheckResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// The service that performs authorization checks -// based on the stored Access Control Lists. -// -// This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). -var CheckServiceService = exports.CheckServiceService = { - // Performs an authorization check. -check: { - path: '/ory.keto.acl.v1alpha1.CheckService/Check', - requestStream: false, - responseStream: false, - requestType: ory_keto_acl_v1alpha1_check_service_pb.CheckRequest, - responseType: ory_keto_acl_v1alpha1_check_service_pb.CheckResponse, - requestSerialize: serialize_ory_keto_acl_v1alpha1_CheckRequest, - requestDeserialize: deserialize_ory_keto_acl_v1alpha1_CheckRequest, - responseSerialize: serialize_ory_keto_acl_v1alpha1_CheckResponse, - responseDeserialize: deserialize_ory_keto_acl_v1alpha1_CheckResponse, - }, -}; - -exports.CheckServiceClient = grpc.makeGenericClientConstructor(CheckServiceService); diff --git a/proto/ory/keto/acl/v1alpha1/expand_service.pb.go b/proto/ory/keto/acl/v1alpha1/expand_service.pb.go deleted file mode 100644 index 38eaabef4..000000000 --- a/proto/ory/keto/acl/v1alpha1/expand_service.pb.go +++ /dev/null @@ -1,453 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc v3.13.0 -// source: ory/keto/acl/v1alpha1/expand_service.proto - -package acl - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -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_acl_v1alpha1_expand_service_proto_enumTypes[0].Descriptor() -} - -func (NodeType) Type() protoreflect.EnumType { - return &file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_expand_service_proto_rawDescGZIP(), []int{0} -} - -// The request for an ExpandService.Expand RPC. -// Expands the given subject set. -type ExpandRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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. - // - Snaptoken string `protobuf:"bytes,3,opt,name=snaptoken,proto3" json:"snaptoken,omitempty"` -} - -func (x *ExpandRequest) Reset() { - *x = ExpandRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_expand_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExpandRequest.ProtoReflect.Descriptor instead. -func (*ExpandRequest) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_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 - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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"` -} - -func (x *ExpandResponse) Reset() { - *x = ExpandResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_expand_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExpandResponse.ProtoReflect.Descriptor instead. -func (*ExpandResponse) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_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 - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The type of the node. - NodeType NodeType `protobuf:"varint,1,opt,name=node_type,json=nodeType,proto3,enum=ory.keto.acl.v1alpha1.NodeType" json:"node_type,omitempty"` - // The subject this node represents. - Subject *Subject `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,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"` -} - -func (x *SubjectTree) Reset() { - *x = SubjectTree{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_expand_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubjectTree.ProtoReflect.Descriptor instead. -func (*SubjectTree) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_expand_service_proto_rawDescGZIP(), []int{2} -} - -func (x *SubjectTree) GetNodeType() NodeType { - if x != nil { - return x.NodeType - } - return NodeType_NODE_TYPE_UNSPECIFIED -} - -func (x *SubjectTree) GetSubject() *Subject { - if x != nil { - return x.Subject - } - return nil -} - -func (x *SubjectTree) GetChildren() []*SubjectTree { - if x != nil { - return x.Children - } - return nil -} - -var File_ory_keto_acl_v1alpha1_expand_service_proto protoreflect.FileDescriptor - -var file_ory_keto_acl_v1alpha1_expand_service_proto_rawDesc = []byte{ - 0x0a, 0x2a, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x61, 0x63, 0x6c, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x5f, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x6f, 0x72, - 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x1a, 0x1f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x61, 0x63, - 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x6c, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x84, 0x01, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x74, 0x68, 0x12, 0x1c, 0x0a, - 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x48, 0x0a, 0x0e, 0x45, - 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, - 0x04, 0x74, 0x72, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x72, - 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x52, - 0x04, 0x74, 0x72, 0x65, 0x65, 0x22, 0xc5, 0x01, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x54, 0x72, 0x65, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, - 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3e, 0x0a, - 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, - 0x72, 0x65, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x2a, 0x83, 0x01, - 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x4e, 0x4f, - 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x4e, 0x4f, - 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, - 0x4e, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, - 0x12, 0x0a, 0x0e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x45, 0x41, - 0x46, 0x10, 0x04, 0x32, 0x66, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x06, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x24, - 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, - 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x95, 0x01, 0x0a, 0x18, - 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x12, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, - 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, - 0x74, 0x6f, 0x2f, 0x61, 0x63, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, - 0x61, 0x63, 0x6c, 0xaa, 0x02, 0x15, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x41, - 0x63, 0x6c, 0x2e, 0x56, 0x31, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x4f, 0x72, - 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x41, 0x63, 0x6c, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_ory_keto_acl_v1alpha1_expand_service_proto_rawDescOnce sync.Once - file_ory_keto_acl_v1alpha1_expand_service_proto_rawDescData = file_ory_keto_acl_v1alpha1_expand_service_proto_rawDesc -) - -func file_ory_keto_acl_v1alpha1_expand_service_proto_rawDescGZIP() []byte { - file_ory_keto_acl_v1alpha1_expand_service_proto_rawDescOnce.Do(func() { - file_ory_keto_acl_v1alpha1_expand_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_ory_keto_acl_v1alpha1_expand_service_proto_rawDescData) - }) - return file_ory_keto_acl_v1alpha1_expand_service_proto_rawDescData -} - -var file_ory_keto_acl_v1alpha1_expand_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_ory_keto_acl_v1alpha1_expand_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_ory_keto_acl_v1alpha1_expand_service_proto_goTypes = []interface{}{ - (NodeType)(0), // 0: ory.keto.acl.v1alpha1.NodeType - (*ExpandRequest)(nil), // 1: ory.keto.acl.v1alpha1.ExpandRequest - (*ExpandResponse)(nil), // 2: ory.keto.acl.v1alpha1.ExpandResponse - (*SubjectTree)(nil), // 3: ory.keto.acl.v1alpha1.SubjectTree - (*Subject)(nil), // 4: ory.keto.acl.v1alpha1.Subject -} -var file_ory_keto_acl_v1alpha1_expand_service_proto_depIdxs = []int32{ - 4, // 0: ory.keto.acl.v1alpha1.ExpandRequest.subject:type_name -> ory.keto.acl.v1alpha1.Subject - 3, // 1: ory.keto.acl.v1alpha1.ExpandResponse.tree:type_name -> ory.keto.acl.v1alpha1.SubjectTree - 0, // 2: ory.keto.acl.v1alpha1.SubjectTree.node_type:type_name -> ory.keto.acl.v1alpha1.NodeType - 4, // 3: ory.keto.acl.v1alpha1.SubjectTree.subject:type_name -> ory.keto.acl.v1alpha1.Subject - 3, // 4: ory.keto.acl.v1alpha1.SubjectTree.children:type_name -> ory.keto.acl.v1alpha1.SubjectTree - 1, // 5: ory.keto.acl.v1alpha1.ExpandService.Expand:input_type -> ory.keto.acl.v1alpha1.ExpandRequest - 2, // 6: ory.keto.acl.v1alpha1.ExpandService.Expand:output_type -> ory.keto.acl.v1alpha1.ExpandResponse - 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_acl_v1alpha1_expand_service_proto_init() } -func file_ory_keto_acl_v1alpha1_expand_service_proto_init() { - if File_ory_keto_acl_v1alpha1_expand_service_proto != nil { - return - } - file_ory_keto_acl_v1alpha1_acl_proto_init() - if !protoimpl.UnsafeEnabled { - file_ory_keto_acl_v1alpha1_expand_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExpandRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_acl_v1alpha1_expand_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExpandResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_acl_v1alpha1_expand_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubjectTree); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ory_keto_acl_v1alpha1_expand_service_proto_rawDesc, - NumEnums: 1, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_ory_keto_acl_v1alpha1_expand_service_proto_goTypes, - DependencyIndexes: file_ory_keto_acl_v1alpha1_expand_service_proto_depIdxs, - EnumInfos: file_ory_keto_acl_v1alpha1_expand_service_proto_enumTypes, - MessageInfos: file_ory_keto_acl_v1alpha1_expand_service_proto_msgTypes, - }.Build() - File_ory_keto_acl_v1alpha1_expand_service_proto = out.File - file_ory_keto_acl_v1alpha1_expand_service_proto_rawDesc = nil - file_ory_keto_acl_v1alpha1_expand_service_proto_goTypes = nil - file_ory_keto_acl_v1alpha1_expand_service_proto_depIdxs = nil -} diff --git a/proto/ory/keto/acl/v1alpha1/expand_service_grpc_pb.d.ts b/proto/ory/keto/acl/v1alpha1/expand_service_grpc_pb.d.ts deleted file mode 100644 index 36305fc05..000000000 --- a/proto/ory/keto/acl/v1alpha1/expand_service_grpc_pb.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -// package: ory.keto.acl.v1alpha1 -// file: ory/keto/acl/v1alpha1/expand_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "grpc"; -import * as ory_keto_acl_v1alpha1_expand_service_pb from "../../../../ory/keto/acl/v1alpha1/expand_service_pb"; -import * as ory_keto_acl_v1alpha1_acl_pb from "../../../../ory/keto/acl/v1alpha1/acl_pb"; - -interface IExpandServiceService extends grpc.ServiceDefinition { - expand: IExpandServiceService_IExpand; -} - -interface IExpandServiceService_IExpand extends grpc.MethodDefinition { - path: "/ory.keto.acl.v1alpha1.ExpandService/Expand"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const ExpandServiceService: IExpandServiceService; - -export interface IExpandServiceServer { - expand: grpc.handleUnaryCall; -} - -export interface IExpandServiceClient { - expand(request: ory_keto_acl_v1alpha1_expand_service_pb.ExpandRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; - expand(request: ory_keto_acl_v1alpha1_expand_service_pb.ExpandRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; - expand(request: ory_keto_acl_v1alpha1_expand_service_pb.ExpandRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; -} - -export class ExpandServiceClient extends grpc.Client implements IExpandServiceClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public expand(request: ory_keto_acl_v1alpha1_expand_service_pb.ExpandRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; - public expand(request: ory_keto_acl_v1alpha1_expand_service_pb.ExpandRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; - public expand(request: ory_keto_acl_v1alpha1_expand_service_pb.ExpandRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; -} diff --git a/proto/ory/keto/acl/v1alpha1/expand_service_grpc_pb.js b/proto/ory/keto/acl/v1alpha1/expand_service_grpc_pb.js deleted file mode 100644 index 6dc9e238b..000000000 --- a/proto/ory/keto/acl/v1alpha1/expand_service_grpc_pb.js +++ /dev/null @@ -1,50 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var ory_keto_acl_v1alpha1_expand_service_pb = require('../../../../ory/keto/acl/v1alpha1/expand_service_pb.js'); -var ory_keto_acl_v1alpha1_acl_pb = require('../../../../ory/keto/acl/v1alpha1/acl_pb.js'); - -function serialize_ory_keto_acl_v1alpha1_ExpandRequest(arg) { - if (!(arg instanceof ory_keto_acl_v1alpha1_expand_service_pb.ExpandRequest)) { - throw new Error('Expected argument of type ory.keto.acl.v1alpha1.ExpandRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_acl_v1alpha1_ExpandRequest(buffer_arg) { - return ory_keto_acl_v1alpha1_expand_service_pb.ExpandRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_ory_keto_acl_v1alpha1_ExpandResponse(arg) { - if (!(arg instanceof ory_keto_acl_v1alpha1_expand_service_pb.ExpandResponse)) { - throw new Error('Expected argument of type ory.keto.acl.v1alpha1.ExpandResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_acl_v1alpha1_ExpandResponse(buffer_arg) { - return ory_keto_acl_v1alpha1_expand_service_pb.ExpandResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// The service that performs subject set expansion -// based on the stored Access Control Lists. -// -// This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). -var ExpandServiceService = exports.ExpandServiceService = { - // Expands the subject set into a tree of subjects. -expand: { - path: '/ory.keto.acl.v1alpha1.ExpandService/Expand', - requestStream: false, - responseStream: false, - requestType: ory_keto_acl_v1alpha1_expand_service_pb.ExpandRequest, - responseType: ory_keto_acl_v1alpha1_expand_service_pb.ExpandResponse, - requestSerialize: serialize_ory_keto_acl_v1alpha1_ExpandRequest, - requestDeserialize: deserialize_ory_keto_acl_v1alpha1_ExpandRequest, - responseSerialize: serialize_ory_keto_acl_v1alpha1_ExpandResponse, - responseDeserialize: deserialize_ory_keto_acl_v1alpha1_ExpandResponse, - }, -}; - -exports.ExpandServiceClient = grpc.makeGenericClientConstructor(ExpandServiceService); diff --git a/proto/ory/keto/acl/v1alpha1/expand_service_pb.js b/proto/ory/keto/acl/v1alpha1/expand_service_pb.js deleted file mode 100644 index 65ce783b9..000000000 --- a/proto/ory/keto/acl/v1alpha1/expand_service_pb.js +++ /dev/null @@ -1,707 +0,0 @@ -// source: ory/keto/acl/v1alpha1/expand_service.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); - -var ory_keto_acl_v1alpha1_acl_pb = require('../../../../ory/keto/acl/v1alpha1/acl_pb.js'); -goog.object.extend(proto, ory_keto_acl_v1alpha1_acl_pb); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.ExpandRequest', null, global); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.ExpandResponse', null, global); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.NodeType', null, global); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.SubjectTree', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.acl.v1alpha1.ExpandRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.acl.v1alpha1.ExpandRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.acl.v1alpha1.ExpandRequest.displayName = 'proto.ory.keto.acl.v1alpha1.ExpandRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.acl.v1alpha1.ExpandResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ory.keto.acl.v1alpha1.ExpandResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.acl.v1alpha1.ExpandResponse.displayName = 'proto.ory.keto.acl.v1alpha1.ExpandResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ory.keto.acl.v1alpha1.SubjectTree = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.ory.keto.acl.v1alpha1.SubjectTree.repeatedFields_, null); -}; -goog.inherits(proto.ory.keto.acl.v1alpha1.SubjectTree, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ory.keto.acl.v1alpha1.SubjectTree.displayName = 'proto.ory.keto.acl.v1alpha1.SubjectTree'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.acl.v1alpha1.ExpandRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.ExpandRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.ExpandRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.acl.v1alpha1.ExpandRequest.toObject = function(includeInstance, msg) { - var f, obj = { - subject: (f = msg.getSubject()) && ory_keto_acl_v1alpha1_acl_pb.Subject.toObject(includeInstance, f), - maxDepth: jspb.Message.getFieldWithDefault(msg, 2, 0), - snaptoken: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.ExpandRequest} - */ -proto.ory.keto.acl.v1alpha1.ExpandRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.ExpandRequest; - return proto.ory.keto.acl.v1alpha1.ExpandRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.ExpandRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.ExpandRequest} - */ -proto.ory.keto.acl.v1alpha1.ExpandRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new ory_keto_acl_v1alpha1_acl_pb.Subject; - reader.readMessage(value,ory_keto_acl_v1alpha1_acl_pb.Subject.deserializeBinaryFromReader); - msg.setSubject(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMaxDepth(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSnaptoken(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.acl.v1alpha1.ExpandRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.ExpandRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.ExpandRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.acl.v1alpha1.ExpandRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSubject(); - if (f != null) { - writer.writeMessage( - 1, - f, - ory_keto_acl_v1alpha1_acl_pb.Subject.serializeBinaryToWriter - ); - } - f = message.getMaxDepth(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getSnaptoken(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional Subject subject = 1; - * @return {?proto.ory.keto.acl.v1alpha1.Subject} - */ -proto.ory.keto.acl.v1alpha1.ExpandRequest.prototype.getSubject = function() { - return /** @type{?proto.ory.keto.acl.v1alpha1.Subject} */ ( - jspb.Message.getWrapperField(this, ory_keto_acl_v1alpha1_acl_pb.Subject, 1)); -}; - - -/** - * @param {?proto.ory.keto.acl.v1alpha1.Subject|undefined} value - * @return {!proto.ory.keto.acl.v1alpha1.ExpandRequest} returns this -*/ -proto.ory.keto.acl.v1alpha1.ExpandRequest.prototype.setSubject = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.acl.v1alpha1.ExpandRequest} returns this - */ -proto.ory.keto.acl.v1alpha1.ExpandRequest.prototype.clearSubject = function() { - return this.setSubject(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.acl.v1alpha1.ExpandRequest.prototype.hasSubject = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int32 max_depth = 2; - * @return {number} - */ -proto.ory.keto.acl.v1alpha1.ExpandRequest.prototype.getMaxDepth = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.ory.keto.acl.v1alpha1.ExpandRequest} returns this - */ -proto.ory.keto.acl.v1alpha1.ExpandRequest.prototype.setMaxDepth = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string snaptoken = 3; - * @return {string} - */ -proto.ory.keto.acl.v1alpha1.ExpandRequest.prototype.getSnaptoken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.ExpandRequest} returns this - */ -proto.ory.keto.acl.v1alpha1.ExpandRequest.prototype.setSnaptoken = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.acl.v1alpha1.ExpandResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.ExpandResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.ExpandResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.acl.v1alpha1.ExpandResponse.toObject = function(includeInstance, msg) { - var f, obj = { - tree: (f = msg.getTree()) && proto.ory.keto.acl.v1alpha1.SubjectTree.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.ExpandResponse} - */ -proto.ory.keto.acl.v1alpha1.ExpandResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.ExpandResponse; - return proto.ory.keto.acl.v1alpha1.ExpandResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.ExpandResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.ExpandResponse} - */ -proto.ory.keto.acl.v1alpha1.ExpandResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.ory.keto.acl.v1alpha1.SubjectTree; - reader.readMessage(value,proto.ory.keto.acl.v1alpha1.SubjectTree.deserializeBinaryFromReader); - msg.setTree(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.acl.v1alpha1.ExpandResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.ExpandResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.ExpandResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.acl.v1alpha1.ExpandResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTree(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.ory.keto.acl.v1alpha1.SubjectTree.serializeBinaryToWriter - ); - } -}; - - -/** - * optional SubjectTree tree = 1; - * @return {?proto.ory.keto.acl.v1alpha1.SubjectTree} - */ -proto.ory.keto.acl.v1alpha1.ExpandResponse.prototype.getTree = function() { - return /** @type{?proto.ory.keto.acl.v1alpha1.SubjectTree} */ ( - jspb.Message.getWrapperField(this, proto.ory.keto.acl.v1alpha1.SubjectTree, 1)); -}; - - -/** - * @param {?proto.ory.keto.acl.v1alpha1.SubjectTree|undefined} value - * @return {!proto.ory.keto.acl.v1alpha1.ExpandResponse} returns this -*/ -proto.ory.keto.acl.v1alpha1.ExpandResponse.prototype.setTree = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.acl.v1alpha1.ExpandResponse} returns this - */ -proto.ory.keto.acl.v1alpha1.ExpandResponse.prototype.clearTree = function() { - return this.setTree(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.acl.v1alpha1.ExpandResponse.prototype.hasTree = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.ory.keto.acl.v1alpha1.SubjectTree.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.ory.keto.acl.v1alpha1.SubjectTree.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.SubjectTree.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.SubjectTree} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.acl.v1alpha1.SubjectTree.toObject = function(includeInstance, msg) { - var f, obj = { - nodeType: jspb.Message.getFieldWithDefault(msg, 1, 0), - subject: (f = msg.getSubject()) && ory_keto_acl_v1alpha1_acl_pb.Subject.toObject(includeInstance, f), - childrenList: jspb.Message.toObjectList(msg.getChildrenList(), - proto.ory.keto.acl.v1alpha1.SubjectTree.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.SubjectTree} - */ -proto.ory.keto.acl.v1alpha1.SubjectTree.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.SubjectTree; - return proto.ory.keto.acl.v1alpha1.SubjectTree.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.SubjectTree} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.SubjectTree} - */ -proto.ory.keto.acl.v1alpha1.SubjectTree.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.ory.keto.acl.v1alpha1.NodeType} */ (reader.readEnum()); - msg.setNodeType(value); - break; - case 2: - var value = new ory_keto_acl_v1alpha1_acl_pb.Subject; - reader.readMessage(value,ory_keto_acl_v1alpha1_acl_pb.Subject.deserializeBinaryFromReader); - msg.setSubject(value); - break; - case 3: - var value = new proto.ory.keto.acl.v1alpha1.SubjectTree; - reader.readMessage(value,proto.ory.keto.acl.v1alpha1.SubjectTree.deserializeBinaryFromReader); - msg.addChildren(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ory.keto.acl.v1alpha1.SubjectTree.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.SubjectTree.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.SubjectTree} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ory.keto.acl.v1alpha1.SubjectTree.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getSubject(); - if (f != null) { - writer.writeMessage( - 2, - f, - ory_keto_acl_v1alpha1_acl_pb.Subject.serializeBinaryToWriter - ); - } - f = message.getChildrenList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.ory.keto.acl.v1alpha1.SubjectTree.serializeBinaryToWriter - ); - } -}; - - -/** - * optional NodeType node_type = 1; - * @return {!proto.ory.keto.acl.v1alpha1.NodeType} - */ -proto.ory.keto.acl.v1alpha1.SubjectTree.prototype.getNodeType = function() { - return /** @type {!proto.ory.keto.acl.v1alpha1.NodeType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.ory.keto.acl.v1alpha1.NodeType} value - * @return {!proto.ory.keto.acl.v1alpha1.SubjectTree} returns this - */ -proto.ory.keto.acl.v1alpha1.SubjectTree.prototype.setNodeType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional Subject subject = 2; - * @return {?proto.ory.keto.acl.v1alpha1.Subject} - */ -proto.ory.keto.acl.v1alpha1.SubjectTree.prototype.getSubject = function() { - return /** @type{?proto.ory.keto.acl.v1alpha1.Subject} */ ( - jspb.Message.getWrapperField(this, ory_keto_acl_v1alpha1_acl_pb.Subject, 2)); -}; - - -/** - * @param {?proto.ory.keto.acl.v1alpha1.Subject|undefined} value - * @return {!proto.ory.keto.acl.v1alpha1.SubjectTree} returns this -*/ -proto.ory.keto.acl.v1alpha1.SubjectTree.prototype.setSubject = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.acl.v1alpha1.SubjectTree} returns this - */ -proto.ory.keto.acl.v1alpha1.SubjectTree.prototype.clearSubject = function() { - return this.setSubject(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ory.keto.acl.v1alpha1.SubjectTree.prototype.hasSubject = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * repeated SubjectTree children = 3; - * @return {!Array} - */ -proto.ory.keto.acl.v1alpha1.SubjectTree.prototype.getChildrenList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.ory.keto.acl.v1alpha1.SubjectTree, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.ory.keto.acl.v1alpha1.SubjectTree} returns this -*/ -proto.ory.keto.acl.v1alpha1.SubjectTree.prototype.setChildrenList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.ory.keto.acl.v1alpha1.SubjectTree=} opt_value - * @param {number=} opt_index - * @return {!proto.ory.keto.acl.v1alpha1.SubjectTree} - */ -proto.ory.keto.acl.v1alpha1.SubjectTree.prototype.addChildren = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.ory.keto.acl.v1alpha1.SubjectTree, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.ory.keto.acl.v1alpha1.SubjectTree} returns this - */ -proto.ory.keto.acl.v1alpha1.SubjectTree.prototype.clearChildrenList = function() { - return this.setChildrenList([]); -}; - - -/** - * @enum {number} - */ -proto.ory.keto.acl.v1alpha1.NodeType = { - NODE_TYPE_UNSPECIFIED: 0, - NODE_TYPE_UNION: 1, - NODE_TYPE_EXCLUSION: 2, - NODE_TYPE_INTERSECTION: 3, - NODE_TYPE_LEAF: 4 -}; - -goog.object.extend(exports, proto.ory.keto.acl.v1alpha1); diff --git a/proto/ory/keto/acl/v1alpha1/read_service.pb.go b/proto/ory/keto/acl/v1alpha1/read_service.pb.go deleted file mode 100644 index e5733e79f..000000000 --- a/proto/ory/keto/acl/v1alpha1/read_service.pb.go +++ /dev/null @@ -1,444 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc v3.13.0 -// source: ory/keto/acl/v1alpha1/read_service.proto - -package acl - -import ( - field_mask "google.golang.org/genproto/protobuf/field_mask" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Request for ReadService.ListRelationTuples RPC. -// See `ListRelationTuplesRequest_Query` for how to filter the query. -type ListRelationTuplesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // All query constraints are concatenated - // with a logical AND operator. - // - // The RelationTuple list from ListRelationTuplesResponse - // is ordered from the newest RelationTuple to the oldest. - Query *ListRelationTuplesRequest_Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` - // This field is not implemented yet and has no effect. - // - ExpandMask *field_mask.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. - // - 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"` -} - -func (x *ListRelationTuplesRequest) Reset() { - *x = ListRelationTuplesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_read_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListRelationTuplesRequest.ProtoReflect.Descriptor instead. -func (*ListRelationTuplesRequest) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_read_service_proto_rawDescGZIP(), []int{0} -} - -func (x *ListRelationTuplesRequest) GetQuery() *ListRelationTuplesRequest_Query { - if x != nil { - return x.Query - } - return nil -} - -func (x *ListRelationTuplesRequest) GetExpandMask() *field_mask.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 - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The relation tuples 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"` -} - -func (x *ListRelationTuplesResponse) Reset() { - *x = ListRelationTuplesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_read_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListRelationTuplesResponse.ProtoReflect.Descriptor instead. -func (*ListRelationTuplesResponse) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_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 relation tuples. -// Clients can specify any optional field to -// partially filter for specific relation tuples. -// -// 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 - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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"` -} - -func (x *ListRelationTuplesRequest_Query) Reset() { - *x = ListRelationTuplesRequest_Query{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_read_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListRelationTuplesRequest_Query.ProtoReflect.Descriptor instead. -func (*ListRelationTuplesRequest_Query) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_read_service_proto protoreflect.FileDescriptor - -var file_ory_keto_acl_v1alpha1_read_service_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x61, 0x63, 0x6c, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x6f, 0x72, 0x79, 0x2e, - 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x1a, 0x1f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x61, 0x63, 0x6c, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x6c, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x03, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x12, 0x3b, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, - 0x6b, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x1c, 0x0a, - 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, - 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x93, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x93, 0x01, - 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0f, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, - 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x0e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, - 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x32, 0x88, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x79, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, - 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6f, 0x72, - 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x93, - 0x01, 0x0a, 0x18, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, - 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x10, 0x52, 0x65, 0x61, - 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, - 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, - 0x65, 0x74, 0x6f, 0x2f, 0x61, 0x63, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x3b, 0x61, 0x63, 0x6c, 0xaa, 0x02, 0x15, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, - 0x41, 0x63, 0x6c, 0x2e, 0x56, 0x31, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x4f, - 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x41, 0x63, 0x6c, 0x5c, 0x56, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_ory_keto_acl_v1alpha1_read_service_proto_rawDescOnce sync.Once - file_ory_keto_acl_v1alpha1_read_service_proto_rawDescData = file_ory_keto_acl_v1alpha1_read_service_proto_rawDesc -) - -func file_ory_keto_acl_v1alpha1_read_service_proto_rawDescGZIP() []byte { - file_ory_keto_acl_v1alpha1_read_service_proto_rawDescOnce.Do(func() { - file_ory_keto_acl_v1alpha1_read_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_ory_keto_acl_v1alpha1_read_service_proto_rawDescData) - }) - return file_ory_keto_acl_v1alpha1_read_service_proto_rawDescData -} - -var file_ory_keto_acl_v1alpha1_read_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_ory_keto_acl_v1alpha1_read_service_proto_goTypes = []interface{}{ - (*ListRelationTuplesRequest)(nil), // 0: ory.keto.acl.v1alpha1.ListRelationTuplesRequest - (*ListRelationTuplesResponse)(nil), // 1: ory.keto.acl.v1alpha1.ListRelationTuplesResponse - (*ListRelationTuplesRequest_Query)(nil), // 2: ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query - (*field_mask.FieldMask)(nil), // 3: google.protobuf.FieldMask - (*RelationTuple)(nil), // 4: ory.keto.acl.v1alpha1.RelationTuple - (*Subject)(nil), // 5: ory.keto.acl.v1alpha1.Subject -} -var file_ory_keto_acl_v1alpha1_read_service_proto_depIdxs = []int32{ - 2, // 0: ory.keto.acl.v1alpha1.ListRelationTuplesRequest.query:type_name -> ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query - 3, // 1: ory.keto.acl.v1alpha1.ListRelationTuplesRequest.expand_mask:type_name -> google.protobuf.FieldMask - 4, // 2: ory.keto.acl.v1alpha1.ListRelationTuplesResponse.relation_tuples:type_name -> ory.keto.acl.v1alpha1.RelationTuple - 5, // 3: ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.subject:type_name -> ory.keto.acl.v1alpha1.Subject - 0, // 4: ory.keto.acl.v1alpha1.ReadService.ListRelationTuples:input_type -> ory.keto.acl.v1alpha1.ListRelationTuplesRequest - 1, // 5: ory.keto.acl.v1alpha1.ReadService.ListRelationTuples:output_type -> ory.keto.acl.v1alpha1.ListRelationTuplesResponse - 5, // [5:6] is the sub-list for method output_type - 4, // [4:5] 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_acl_v1alpha1_read_service_proto_init() } -func file_ory_keto_acl_v1alpha1_read_service_proto_init() { - if File_ory_keto_acl_v1alpha1_read_service_proto != nil { - return - } - file_ory_keto_acl_v1alpha1_acl_proto_init() - if !protoimpl.UnsafeEnabled { - file_ory_keto_acl_v1alpha1_read_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRelationTuplesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_acl_v1alpha1_read_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRelationTuplesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_acl_v1alpha1_read_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRelationTuplesRequest_Query); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ory_keto_acl_v1alpha1_read_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_ory_keto_acl_v1alpha1_read_service_proto_goTypes, - DependencyIndexes: file_ory_keto_acl_v1alpha1_read_service_proto_depIdxs, - MessageInfos: file_ory_keto_acl_v1alpha1_read_service_proto_msgTypes, - }.Build() - File_ory_keto_acl_v1alpha1_read_service_proto = out.File - file_ory_keto_acl_v1alpha1_read_service_proto_rawDesc = nil - file_ory_keto_acl_v1alpha1_read_service_proto_goTypes = nil - file_ory_keto_acl_v1alpha1_read_service_proto_depIdxs = nil -} diff --git a/proto/ory/keto/acl/v1alpha1/read_service_grpc_pb.d.ts b/proto/ory/keto/acl/v1alpha1/read_service_grpc_pb.d.ts deleted file mode 100644 index d86ee4aa3..000000000 --- a/proto/ory/keto/acl/v1alpha1/read_service_grpc_pb.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -// package: ory.keto.acl.v1alpha1 -// file: ory/keto/acl/v1alpha1/read_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "grpc"; -import * as ory_keto_acl_v1alpha1_read_service_pb from "../../../../ory/keto/acl/v1alpha1/read_service_pb"; -import * as ory_keto_acl_v1alpha1_acl_pb from "../../../../ory/keto/acl/v1alpha1/acl_pb"; -import * as google_protobuf_field_mask_pb from "google-protobuf/google/protobuf/field_mask_pb"; - -interface IReadServiceService extends grpc.ServiceDefinition { - listRelationTuples: IReadServiceService_IListRelationTuples; -} - -interface IReadServiceService_IListRelationTuples extends grpc.MethodDefinition { - path: "/ory.keto.acl.v1alpha1.ReadService/ListRelationTuples"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const ReadServiceService: IReadServiceService; - -export interface IReadServiceServer { - listRelationTuples: grpc.handleUnaryCall; -} - -export interface IReadServiceClient { - listRelationTuples(request: ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; - listRelationTuples(request: ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; - listRelationTuples(request: ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; -} - -export class ReadServiceClient extends grpc.Client implements IReadServiceClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public listRelationTuples(request: ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; - public listRelationTuples(request: ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; - public listRelationTuples(request: ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; -} diff --git a/proto/ory/keto/acl/v1alpha1/read_service_grpc_pb.js b/proto/ory/keto/acl/v1alpha1/read_service_grpc_pb.js deleted file mode 100644 index 56f1f7d01..000000000 --- a/proto/ory/keto/acl/v1alpha1/read_service_grpc_pb.js +++ /dev/null @@ -1,50 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var ory_keto_acl_v1alpha1_read_service_pb = require('../../../../ory/keto/acl/v1alpha1/read_service_pb.js'); -var ory_keto_acl_v1alpha1_acl_pb = require('../../../../ory/keto/acl/v1alpha1/acl_pb.js'); -var google_protobuf_field_mask_pb = require('google-protobuf/google/protobuf/field_mask_pb.js'); - -function serialize_ory_keto_acl_v1alpha1_ListRelationTuplesRequest(arg) { - if (!(arg instanceof ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesRequest)) { - throw new Error('Expected argument of type ory.keto.acl.v1alpha1.ListRelationTuplesRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_acl_v1alpha1_ListRelationTuplesRequest(buffer_arg) { - return ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_ory_keto_acl_v1alpha1_ListRelationTuplesResponse(arg) { - if (!(arg instanceof ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesResponse)) { - throw new Error('Expected argument of type ory.keto.acl.v1alpha1.ListRelationTuplesResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_acl_v1alpha1_ListRelationTuplesResponse(buffer_arg) { - return ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// The service to query relation tuples. -// -// This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). -var ReadServiceService = exports.ReadServiceService = { - // Lists ACL relation tuples. -listRelationTuples: { - path: '/ory.keto.acl.v1alpha1.ReadService/ListRelationTuples', - requestStream: false, - responseStream: false, - requestType: ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesRequest, - responseType: ory_keto_acl_v1alpha1_read_service_pb.ListRelationTuplesResponse, - requestSerialize: serialize_ory_keto_acl_v1alpha1_ListRelationTuplesRequest, - requestDeserialize: deserialize_ory_keto_acl_v1alpha1_ListRelationTuplesRequest, - responseSerialize: serialize_ory_keto_acl_v1alpha1_ListRelationTuplesResponse, - responseDeserialize: deserialize_ory_keto_acl_v1alpha1_ListRelationTuplesResponse, - }, -}; - -exports.ReadServiceClient = grpc.makeGenericClientConstructor(ReadServiceService); diff --git a/proto/ory/keto/acl/v1alpha1/version.pb.go b/proto/ory/keto/acl/v1alpha1/version.pb.go deleted file mode 100644 index af27fcde1..000000000 --- a/proto/ory/keto/acl/v1alpha1/version.pb.go +++ /dev/null @@ -1,218 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc v3.13.0 -// source: ory/keto/acl/v1alpha1/version.proto - -package acl - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Request for the VersionService.GetVersion RPC. -type GetVersionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetVersionRequest) Reset() { - *x = GetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_version_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetVersionRequest.ProtoReflect.Descriptor instead. -func (*GetVersionRequest) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_version_proto_rawDescGZIP(), []int{0} -} - -// Response of the VersionService.GetVersion RPC. -type GetVersionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The version string of the Ory Keto instance. - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` -} - -func (x *GetVersionResponse) Reset() { - *x = GetVersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_version_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetVersionResponse.ProtoReflect.Descriptor instead. -func (*GetVersionResponse) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_version_proto_rawDescGZIP(), []int{1} -} - -func (x *GetVersionResponse) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -var File_ory_keto_acl_v1alpha1_version_proto protoreflect.FileDescriptor - -var file_ory_keto_acl_v1alpha1_version_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x61, 0x63, 0x6c, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x13, 0x0a, 0x11, - 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x2e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x32, 0x73, 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x28, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6f, 0x72, - 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x96, 0x01, 0x0a, 0x18, 0x73, 0x68, 0x2e, 0x6f, 0x72, - 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x42, 0x13, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x61, - 0x63, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x61, 0x63, 0x6c, 0xaa, - 0x02, 0x15, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x41, 0x63, 0x6c, 0x2e, 0x56, - 0x31, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, - 0x74, 0x6f, 0x5c, 0x41, 0x63, 0x6c, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_ory_keto_acl_v1alpha1_version_proto_rawDescOnce sync.Once - file_ory_keto_acl_v1alpha1_version_proto_rawDescData = file_ory_keto_acl_v1alpha1_version_proto_rawDesc -) - -func file_ory_keto_acl_v1alpha1_version_proto_rawDescGZIP() []byte { - file_ory_keto_acl_v1alpha1_version_proto_rawDescOnce.Do(func() { - file_ory_keto_acl_v1alpha1_version_proto_rawDescData = protoimpl.X.CompressGZIP(file_ory_keto_acl_v1alpha1_version_proto_rawDescData) - }) - return file_ory_keto_acl_v1alpha1_version_proto_rawDescData -} - -var file_ory_keto_acl_v1alpha1_version_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_ory_keto_acl_v1alpha1_version_proto_goTypes = []interface{}{ - (*GetVersionRequest)(nil), // 0: ory.keto.acl.v1alpha1.GetVersionRequest - (*GetVersionResponse)(nil), // 1: ory.keto.acl.v1alpha1.GetVersionResponse -} -var file_ory_keto_acl_v1alpha1_version_proto_depIdxs = []int32{ - 0, // 0: ory.keto.acl.v1alpha1.VersionService.GetVersion:input_type -> ory.keto.acl.v1alpha1.GetVersionRequest - 1, // 1: ory.keto.acl.v1alpha1.VersionService.GetVersion:output_type -> ory.keto.acl.v1alpha1.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_acl_v1alpha1_version_proto_init() } -func file_ory_keto_acl_v1alpha1_version_proto_init() { - if File_ory_keto_acl_v1alpha1_version_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_ory_keto_acl_v1alpha1_version_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_acl_v1alpha1_version_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetVersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ory_keto_acl_v1alpha1_version_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_ory_keto_acl_v1alpha1_version_proto_goTypes, - DependencyIndexes: file_ory_keto_acl_v1alpha1_version_proto_depIdxs, - MessageInfos: file_ory_keto_acl_v1alpha1_version_proto_msgTypes, - }.Build() - File_ory_keto_acl_v1alpha1_version_proto = out.File - file_ory_keto_acl_v1alpha1_version_proto_rawDesc = nil - file_ory_keto_acl_v1alpha1_version_proto_goTypes = nil - file_ory_keto_acl_v1alpha1_version_proto_depIdxs = nil -} diff --git a/proto/ory/keto/acl/v1alpha1/version_grpc_pb.d.ts b/proto/ory/keto/acl/v1alpha1/version_grpc_pb.d.ts deleted file mode 100644 index a7449ecc5..000000000 --- a/proto/ory/keto/acl/v1alpha1/version_grpc_pb.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -// package: ory.keto.acl.v1alpha1 -// file: ory/keto/acl/v1alpha1/version.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "grpc"; -import * as ory_keto_acl_v1alpha1_version_pb from "../../../../ory/keto/acl/v1alpha1/version_pb"; - -interface IVersionServiceService extends grpc.ServiceDefinition { - getVersion: IVersionServiceService_IGetVersion; -} - -interface IVersionServiceService_IGetVersion extends grpc.MethodDefinition { - path: "/ory.keto.acl.v1alpha1.VersionService/GetVersion"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const VersionServiceService: IVersionServiceService; - -export interface IVersionServiceServer { - getVersion: grpc.handleUnaryCall; -} - -export interface IVersionServiceClient { - getVersion(request: ory_keto_acl_v1alpha1_version_pb.GetVersionRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; - getVersion(request: ory_keto_acl_v1alpha1_version_pb.GetVersionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; - getVersion(request: ory_keto_acl_v1alpha1_version_pb.GetVersionRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; -} - -export class VersionServiceClient extends grpc.Client implements IVersionServiceClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public getVersion(request: ory_keto_acl_v1alpha1_version_pb.GetVersionRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; - public getVersion(request: ory_keto_acl_v1alpha1_version_pb.GetVersionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; - public getVersion(request: ory_keto_acl_v1alpha1_version_pb.GetVersionRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; -} diff --git a/proto/ory/keto/acl/v1alpha1/version_grpc_pb.js b/proto/ory/keto/acl/v1alpha1/version_grpc_pb.js deleted file mode 100644 index 4438eb196..000000000 --- a/proto/ory/keto/acl/v1alpha1/version_grpc_pb.js +++ /dev/null @@ -1,48 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var ory_keto_acl_v1alpha1_version_pb = require('../../../../ory/keto/acl/v1alpha1/version_pb.js'); - -function serialize_ory_keto_acl_v1alpha1_GetVersionRequest(arg) { - if (!(arg instanceof ory_keto_acl_v1alpha1_version_pb.GetVersionRequest)) { - throw new Error('Expected argument of type ory.keto.acl.v1alpha1.GetVersionRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_acl_v1alpha1_GetVersionRequest(buffer_arg) { - return ory_keto_acl_v1alpha1_version_pb.GetVersionRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_ory_keto_acl_v1alpha1_GetVersionResponse(arg) { - if (!(arg instanceof ory_keto_acl_v1alpha1_version_pb.GetVersionResponse)) { - throw new Error('Expected argument of type ory.keto.acl.v1alpha1.GetVersionResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_acl_v1alpha1_GetVersionResponse(buffer_arg) { - return ory_keto_acl_v1alpha1_version_pb.GetVersionResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// The service returning the specific Ory Keto instance version. -// -// This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis) and [write-APIs](../concepts/api-overview.mdx#write-apis). -var VersionServiceService = exports.VersionServiceService = { - // Returns the version of the Ory Keto instance. -getVersion: { - path: '/ory.keto.acl.v1alpha1.VersionService/GetVersion', - requestStream: false, - responseStream: false, - requestType: ory_keto_acl_v1alpha1_version_pb.GetVersionRequest, - responseType: ory_keto_acl_v1alpha1_version_pb.GetVersionResponse, - requestSerialize: serialize_ory_keto_acl_v1alpha1_GetVersionRequest, - requestDeserialize: deserialize_ory_keto_acl_v1alpha1_GetVersionRequest, - responseSerialize: serialize_ory_keto_acl_v1alpha1_GetVersionResponse, - responseDeserialize: deserialize_ory_keto_acl_v1alpha1_GetVersionResponse, - }, -}; - -exports.VersionServiceClient = grpc.makeGenericClientConstructor(VersionServiceService); diff --git a/proto/ory/keto/acl/v1alpha1/write_service.pb.go b/proto/ory/keto/acl/v1alpha1/write_service.pb.go deleted file mode 100644 index 70ba24cde..000000000 --- a/proto/ory/keto/acl/v1alpha1/write_service.pb.go +++ /dev/null @@ -1,630 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc v3.13.0 -// source: ory/keto/acl/v1alpha1/write_service.proto - -package acl - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -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. - // It is ignored if already existing. - RelationTupleDelta_INSERT RelationTupleDelta_Action = 1 - // Deletion of the RelationTuple. - // It is ignored if it does not exist. - RelationTupleDelta_DELETE RelationTupleDelta_Action = 2 -) - -// Enum value maps for RelationTupleDelta_Action. -var ( - RelationTupleDelta_Action_name = map[int32]string{ - 0: "ACTION_UNSPECIFIED", - 1: "INSERT", - 2: "DELETE", - } - RelationTupleDelta_Action_value = map[string]int32{ - "ACTION_UNSPECIFIED": 0, - "INSERT": 1, - "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_acl_v1alpha1_write_service_proto_enumTypes[0].Descriptor() -} - -func (RelationTupleDelta_Action) Type() protoreflect.EnumType { - return &file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_write_service_proto_rawDescGZIP(), []int{1, 0} -} - -// The request of a WriteService.TransactRelationTuples RPC. -type TransactRelationTuplesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The write delta for the relation tuples 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"` -} - -func (x *TransactRelationTuplesRequest) Reset() { - *x = TransactRelationTuplesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_write_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TransactRelationTuplesRequest.ProtoReflect.Descriptor instead. -func (*TransactRelationTuplesRequest) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_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 - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The action to do on the RelationTuple. - Action RelationTupleDelta_Action `protobuf:"varint,1,opt,name=action,proto3,enum=ory.keto.acl.v1alpha1.RelationTupleDelta_Action" json:"action,omitempty"` - // The target RelationTuple. - RelationTuple *RelationTuple `protobuf:"bytes,2,opt,name=relation_tuple,json=relationTuple,proto3" json:"relation_tuple,omitempty"` -} - -func (x *RelationTupleDelta) Reset() { - *x = RelationTupleDelta{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_write_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RelationTupleDelta.ProtoReflect.Descriptor instead. -func (*RelationTupleDelta) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_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 - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This field is not implemented yet and has no effect. - // - Snaptokens []string `protobuf:"bytes,1,rep,name=snaptokens,proto3" json:"snaptokens,omitempty"` -} - -func (x *TransactRelationTuplesResponse) Reset() { - *x = TransactRelationTuplesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_write_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TransactRelationTuplesResponse.ProtoReflect.Descriptor instead. -func (*TransactRelationTuplesResponse) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_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 - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Query *DeleteRelationTuplesRequest_Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` -} - -func (x *DeleteRelationTuplesRequest) Reset() { - *x = DeleteRelationTuplesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_write_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteRelationTuplesRequest.ProtoReflect.Descriptor instead. -func (*DeleteRelationTuplesRequest) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_write_service_proto_rawDescGZIP(), []int{3} -} - -func (x *DeleteRelationTuplesRequest) GetQuery() *DeleteRelationTuplesRequest_Query { - if x != nil { - return x.Query - } - return nil -} - -type DeleteRelationTuplesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteRelationTuplesResponse) Reset() { - *x = DeleteRelationTuplesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_write_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteRelationTuplesResponse.ProtoReflect.Descriptor instead. -func (*DeleteRelationTuplesResponse) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_write_service_proto_rawDescGZIP(), []int{4} -} - -// The query for deleting relation tuples -type DeleteRelationTuplesRequest_Query struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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"` -} - -func (x *DeleteRelationTuplesRequest_Query) Reset() { - *x = DeleteRelationTuplesRequest_Query{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_write_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteRelationTuplesRequest_Query.ProtoReflect.Descriptor instead. -func (*DeleteRelationTuplesRequest_Query) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_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_acl_v1alpha1_write_service_proto protoreflect.FileDescriptor - -var file_ory_keto_acl_v1alpha1_write_service_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x61, 0x63, 0x6c, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x1a, 0x1f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x61, 0x63, 0x6c, - 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x6c, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x7e, 0x0a, 0x1d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x5d, 0x0a, 0x15, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, - 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x13, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, - 0x74, 0x61, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x48, 0x0a, 0x06, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x44, 0x65, 0x6c, 0x74, 0x61, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, - 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, - 0x65, 0x22, 0x38, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, - 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x10, 0x01, 0x12, - 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, 0x22, 0x40, 0x0a, 0x1e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, - 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0x83, 0x02, - 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, - 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6f, - 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x1a, 0x93, 0x01, - 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, - 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x32, 0x97, 0x02, 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, - 0x34, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, - 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x14, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, - 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x94, 0x01, - 0x0a, 0x18, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, - 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x11, 0x57, 0x61, 0x74, 0x63, - 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, - 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, - 0x65, 0x74, 0x6f, 0x2f, 0x61, 0x63, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x3b, 0x61, 0x63, 0x6c, 0xaa, 0x02, 0x15, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, - 0x41, 0x63, 0x6c, 0x2e, 0x56, 0x31, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x4f, - 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x41, 0x63, 0x6c, 0x5c, 0x56, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_ory_keto_acl_v1alpha1_write_service_proto_rawDescOnce sync.Once - file_ory_keto_acl_v1alpha1_write_service_proto_rawDescData = file_ory_keto_acl_v1alpha1_write_service_proto_rawDesc -) - -func file_ory_keto_acl_v1alpha1_write_service_proto_rawDescGZIP() []byte { - file_ory_keto_acl_v1alpha1_write_service_proto_rawDescOnce.Do(func() { - file_ory_keto_acl_v1alpha1_write_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_ory_keto_acl_v1alpha1_write_service_proto_rawDescData) - }) - return file_ory_keto_acl_v1alpha1_write_service_proto_rawDescData -} - -var file_ory_keto_acl_v1alpha1_write_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_ory_keto_acl_v1alpha1_write_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_ory_keto_acl_v1alpha1_write_service_proto_goTypes = []interface{}{ - (RelationTupleDelta_Action)(0), // 0: ory.keto.acl.v1alpha1.RelationTupleDelta.Action - (*TransactRelationTuplesRequest)(nil), // 1: ory.keto.acl.v1alpha1.TransactRelationTuplesRequest - (*RelationTupleDelta)(nil), // 2: ory.keto.acl.v1alpha1.RelationTupleDelta - (*TransactRelationTuplesResponse)(nil), // 3: ory.keto.acl.v1alpha1.TransactRelationTuplesResponse - (*DeleteRelationTuplesRequest)(nil), // 4: ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest - (*DeleteRelationTuplesResponse)(nil), // 5: ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse - (*DeleteRelationTuplesRequest_Query)(nil), // 6: ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query - (*RelationTuple)(nil), // 7: ory.keto.acl.v1alpha1.RelationTuple - (*Subject)(nil), // 8: ory.keto.acl.v1alpha1.Subject -} -var file_ory_keto_acl_v1alpha1_write_service_proto_depIdxs = []int32{ - 2, // 0: ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.relation_tuple_deltas:type_name -> ory.keto.acl.v1alpha1.RelationTupleDelta - 0, // 1: ory.keto.acl.v1alpha1.RelationTupleDelta.action:type_name -> ory.keto.acl.v1alpha1.RelationTupleDelta.Action - 7, // 2: ory.keto.acl.v1alpha1.RelationTupleDelta.relation_tuple:type_name -> ory.keto.acl.v1alpha1.RelationTuple - 6, // 3: ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.query:type_name -> ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query - 8, // 4: ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.subject:type_name -> ory.keto.acl.v1alpha1.Subject - 1, // 5: ory.keto.acl.v1alpha1.WriteService.TransactRelationTuples:input_type -> ory.keto.acl.v1alpha1.TransactRelationTuplesRequest - 4, // 6: ory.keto.acl.v1alpha1.WriteService.DeleteRelationTuples:input_type -> ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest - 3, // 7: ory.keto.acl.v1alpha1.WriteService.TransactRelationTuples:output_type -> ory.keto.acl.v1alpha1.TransactRelationTuplesResponse - 5, // 8: ory.keto.acl.v1alpha1.WriteService.DeleteRelationTuples:output_type -> ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse - 7, // [7:9] is the sub-list for method output_type - 5, // [5:7] 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_acl_v1alpha1_write_service_proto_init() } -func file_ory_keto_acl_v1alpha1_write_service_proto_init() { - if File_ory_keto_acl_v1alpha1_write_service_proto != nil { - return - } - file_ory_keto_acl_v1alpha1_acl_proto_init() - if !protoimpl.UnsafeEnabled { - file_ory_keto_acl_v1alpha1_write_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransactRelationTuplesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_acl_v1alpha1_write_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RelationTupleDelta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_acl_v1alpha1_write_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransactRelationTuplesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_acl_v1alpha1_write_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRelationTuplesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_acl_v1alpha1_write_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRelationTuplesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_acl_v1alpha1_write_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRelationTuplesRequest_Query); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ory_keto_acl_v1alpha1_write_service_proto_rawDesc, - NumEnums: 1, - NumMessages: 6, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_ory_keto_acl_v1alpha1_write_service_proto_goTypes, - DependencyIndexes: file_ory_keto_acl_v1alpha1_write_service_proto_depIdxs, - EnumInfos: file_ory_keto_acl_v1alpha1_write_service_proto_enumTypes, - MessageInfos: file_ory_keto_acl_v1alpha1_write_service_proto_msgTypes, - }.Build() - File_ory_keto_acl_v1alpha1_write_service_proto = out.File - file_ory_keto_acl_v1alpha1_write_service_proto_rawDesc = nil - file_ory_keto_acl_v1alpha1_write_service_proto_goTypes = nil - file_ory_keto_acl_v1alpha1_write_service_proto_depIdxs = nil -} diff --git a/proto/ory/keto/acl/v1alpha1/write_service_grpc_pb.d.ts b/proto/ory/keto/acl/v1alpha1/write_service_grpc_pb.d.ts deleted file mode 100644 index 83dc289cd..000000000 --- a/proto/ory/keto/acl/v1alpha1/write_service_grpc_pb.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -// package: ory.keto.acl.v1alpha1 -// file: ory/keto/acl/v1alpha1/write_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "grpc"; -import * as ory_keto_acl_v1alpha1_write_service_pb from "../../../../ory/keto/acl/v1alpha1/write_service_pb"; -import * as ory_keto_acl_v1alpha1_acl_pb from "../../../../ory/keto/acl/v1alpha1/acl_pb"; - -interface IWriteServiceService extends grpc.ServiceDefinition { - transactRelationTuples: IWriteServiceService_ITransactRelationTuples; - deleteRelationTuples: IWriteServiceService_IDeleteRelationTuples; -} - -interface IWriteServiceService_ITransactRelationTuples extends grpc.MethodDefinition { - path: "/ory.keto.acl.v1alpha1.WriteService/TransactRelationTuples"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IWriteServiceService_IDeleteRelationTuples extends grpc.MethodDefinition { - path: "/ory.keto.acl.v1alpha1.WriteService/DeleteRelationTuples"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const WriteServiceService: IWriteServiceService; - -export interface IWriteServiceServer { - transactRelationTuples: grpc.handleUnaryCall; - deleteRelationTuples: grpc.handleUnaryCall; -} - -export interface IWriteServiceClient { - transactRelationTuples(request: ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; - transactRelationTuples(request: ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; - transactRelationTuples(request: ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; - deleteRelationTuples(request: ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; - deleteRelationTuples(request: ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; - deleteRelationTuples(request: ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; -} - -export class WriteServiceClient extends grpc.Client implements IWriteServiceClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public transactRelationTuples(request: ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; - public transactRelationTuples(request: ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; - public transactRelationTuples(request: ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; - public deleteRelationTuples(request: ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; - public deleteRelationTuples(request: ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; - public deleteRelationTuples(request: ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; -} diff --git a/proto/ory/keto/acl/v1alpha1/write_service_grpc_pb.js b/proto/ory/keto/acl/v1alpha1/write_service_grpc_pb.js deleted file mode 100644 index b81a58e49..000000000 --- a/proto/ory/keto/acl/v1alpha1/write_service_grpc_pb.js +++ /dev/null @@ -1,83 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var ory_keto_acl_v1alpha1_write_service_pb = require('../../../../ory/keto/acl/v1alpha1/write_service_pb.js'); -var ory_keto_acl_v1alpha1_acl_pb = require('../../../../ory/keto/acl/v1alpha1/acl_pb.js'); - -function serialize_ory_keto_acl_v1alpha1_DeleteRelationTuplesRequest(arg) { - if (!(arg instanceof ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesRequest)) { - throw new Error('Expected argument of type ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_acl_v1alpha1_DeleteRelationTuplesRequest(buffer_arg) { - return ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_ory_keto_acl_v1alpha1_DeleteRelationTuplesResponse(arg) { - if (!(arg instanceof ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesResponse)) { - throw new Error('Expected argument of type ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_acl_v1alpha1_DeleteRelationTuplesResponse(buffer_arg) { - return ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_ory_keto_acl_v1alpha1_TransactRelationTuplesRequest(arg) { - if (!(arg instanceof ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesRequest)) { - throw new Error('Expected argument of type ory.keto.acl.v1alpha1.TransactRelationTuplesRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_acl_v1alpha1_TransactRelationTuplesRequest(buffer_arg) { - return ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_ory_keto_acl_v1alpha1_TransactRelationTuplesResponse(arg) { - if (!(arg instanceof ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesResponse)) { - throw new Error('Expected argument of type ory.keto.acl.v1alpha1.TransactRelationTuplesResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_ory_keto_acl_v1alpha1_TransactRelationTuplesResponse(buffer_arg) { - return ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// The write service to create and delete Access Control Lists. -// -// This service is part of the [write-APIs](../concepts/api-overview.mdx#write-apis). -var WriteServiceService = exports.WriteServiceService = { - // Writes one or more relation tuples in a single transaction. -transactRelationTuples: { - path: '/ory.keto.acl.v1alpha1.WriteService/TransactRelationTuples', - requestStream: false, - responseStream: false, - requestType: ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesRequest, - responseType: ory_keto_acl_v1alpha1_write_service_pb.TransactRelationTuplesResponse, - requestSerialize: serialize_ory_keto_acl_v1alpha1_TransactRelationTuplesRequest, - requestDeserialize: deserialize_ory_keto_acl_v1alpha1_TransactRelationTuplesRequest, - responseSerialize: serialize_ory_keto_acl_v1alpha1_TransactRelationTuplesResponse, - responseDeserialize: deserialize_ory_keto_acl_v1alpha1_TransactRelationTuplesResponse, - }, - // Deletes relation tuples based on relation query -deleteRelationTuples: { - path: '/ory.keto.acl.v1alpha1.WriteService/DeleteRelationTuples', - requestStream: false, - responseStream: false, - requestType: ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesRequest, - responseType: ory_keto_acl_v1alpha1_write_service_pb.DeleteRelationTuplesResponse, - requestSerialize: serialize_ory_keto_acl_v1alpha1_DeleteRelationTuplesRequest, - requestDeserialize: deserialize_ory_keto_acl_v1alpha1_DeleteRelationTuplesRequest, - responseSerialize: serialize_ory_keto_acl_v1alpha1_DeleteRelationTuplesResponse, - responseDeserialize: deserialize_ory_keto_acl_v1alpha1_DeleteRelationTuplesResponse, - }, -}; - -exports.WriteServiceClient = grpc.makeGenericClientConstructor(WriteServiceService); diff --git a/proto/ory/keto/acl/v1alpha1/check_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go similarity index 53% rename from proto/ory/keto/acl/v1alpha1/check_service.pb.go rename to proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go index 1f6524cdf..b9822e715 100644 --- a/proto/ory/keto/acl/v1alpha1/check_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go @@ -2,9 +2,9 @@ // versions: // protoc-gen-go v1.27.1 // protoc v3.13.0 -// source: ory/keto/acl/v1alpha1/check_service.proto +// source: ory/keto/relation_tuples/v1alpha2/check_service.proto -package acl +package rts import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -87,7 +87,7 @@ type CheckRequest struct { func (x *CheckRequest) Reset() { *x = CheckRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_check_service_proto_msgTypes[0] + mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -100,7 +100,7 @@ func (x *CheckRequest) String() string { func (*CheckRequest) ProtoMessage() {} func (x *CheckRequest) ProtoReflect() protoreflect.Message { - mi := &file_ory_keto_acl_v1alpha1_check_service_proto_msgTypes[0] + mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113,7 +113,7 @@ func (x *CheckRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead. func (*CheckRequest) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_check_service_proto_rawDescGZIP(), []int{0} + return file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescGZIP(), []int{0} } func (x *CheckRequest) GetNamespace() string { @@ -195,7 +195,7 @@ type CheckResponse struct { func (x *CheckResponse) Reset() { *x = CheckResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_acl_v1alpha1_check_service_proto_msgTypes[1] + mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -208,7 +208,7 @@ func (x *CheckResponse) String() string { func (*CheckResponse) ProtoMessage() {} func (x *CheckResponse) ProtoReflect() protoreflect.Message { - mi := &file_ory_keto_acl_v1alpha1_check_service_proto_msgTypes[1] + mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -221,7 +221,7 @@ func (x *CheckResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead. func (*CheckResponse) Descriptor() ([]byte, []int) { - return file_ory_keto_acl_v1alpha1_check_service_proto_rawDescGZIP(), []int{1} + return file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescGZIP(), []int{1} } func (x *CheckResponse) GetAllowed() bool { @@ -238,75 +238,84 @@ func (x *CheckResponse) GetSnaptoken() string { return "" } -var File_ory_keto_acl_v1alpha1_check_service_proto protoreflect.FileDescriptor - -var file_ory_keto_acl_v1alpha1_check_service_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x61, 0x63, 0x6c, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x1a, 0x1f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x61, 0x63, 0x6c, - 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x6c, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xed, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, +var File_ory_keto_relation_tuples_v1alpha2_check_service_proto protoreflect.FileDescriptor + +var file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, + 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, + 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xf9, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6e, 0x61, - 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, - 0x70, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x44, 0x65, - 0x70, 0x74, 0x68, 0x22, 0x47, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, 0x1c, - 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x62, 0x0a, 0x0c, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x05, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x23, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, - 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0x94, 0x01, 0x0a, 0x18, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, - 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x11, 0x43, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x74, 0x68, 0x22, + 0x47, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6e, + 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x7a, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x12, 0x2f, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc2, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, + 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, + 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, - 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x61, 0x63, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x3b, 0x61, 0x63, 0x6c, 0xaa, 0x02, 0x15, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, - 0x74, 0x6f, 0x2e, 0x41, 0x63, 0x6c, 0x2e, 0x56, 0x31, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, - 0x02, 0x15, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x41, 0x63, 0x6c, 0x5c, 0x56, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, + 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, + 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( - file_ory_keto_acl_v1alpha1_check_service_proto_rawDescOnce sync.Once - file_ory_keto_acl_v1alpha1_check_service_proto_rawDescData = file_ory_keto_acl_v1alpha1_check_service_proto_rawDesc + file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescOnce sync.Once + file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescData = file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDesc ) -func file_ory_keto_acl_v1alpha1_check_service_proto_rawDescGZIP() []byte { - file_ory_keto_acl_v1alpha1_check_service_proto_rawDescOnce.Do(func() { - file_ory_keto_acl_v1alpha1_check_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_ory_keto_acl_v1alpha1_check_service_proto_rawDescData) +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(file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescData) }) - return file_ory_keto_acl_v1alpha1_check_service_proto_rawDescData + return file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescData } -var file_ory_keto_acl_v1alpha1_check_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_ory_keto_acl_v1alpha1_check_service_proto_goTypes = []interface{}{ - (*CheckRequest)(nil), // 0: ory.keto.acl.v1alpha1.CheckRequest - (*CheckResponse)(nil), // 1: ory.keto.acl.v1alpha1.CheckResponse - (*Subject)(nil), // 2: ory.keto.acl.v1alpha1.Subject +var file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_ory_keto_relation_tuples_v1alpha2_check_service_proto_goTypes = []interface{}{ + (*CheckRequest)(nil), // 0: ory.keto.relation_tuples.v1alpha2.CheckRequest + (*CheckResponse)(nil), // 1: ory.keto.relation_tuples.v1alpha2.CheckResponse + (*Subject)(nil), // 2: ory.keto.relation_tuples.v1alpha2.Subject } -var file_ory_keto_acl_v1alpha1_check_service_proto_depIdxs = []int32{ - 2, // 0: ory.keto.acl.v1alpha1.CheckRequest.subject:type_name -> ory.keto.acl.v1alpha1.Subject - 0, // 1: ory.keto.acl.v1alpha1.CheckService.Check:input_type -> ory.keto.acl.v1alpha1.CheckRequest - 1, // 2: ory.keto.acl.v1alpha1.CheckService.Check:output_type -> ory.keto.acl.v1alpha1.CheckResponse +var file_ory_keto_relation_tuples_v1alpha2_check_service_proto_depIdxs = []int32{ + 2, // 0: ory.keto.relation_tuples.v1alpha2.CheckRequest.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject + 0, // 1: ory.keto.relation_tuples.v1alpha2.CheckService.Check:input_type -> ory.keto.relation_tuples.v1alpha2.CheckRequest + 1, // 2: ory.keto.relation_tuples.v1alpha2.CheckService.Check:output_type -> ory.keto.relation_tuples.v1alpha2.CheckResponse 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 @@ -314,14 +323,14 @@ var file_ory_keto_acl_v1alpha1_check_service_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_ory_keto_acl_v1alpha1_check_service_proto_init() } -func file_ory_keto_acl_v1alpha1_check_service_proto_init() { - if File_ory_keto_acl_v1alpha1_check_service_proto != nil { +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_acl_v1alpha1_acl_proto_init() + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() if !protoimpl.UnsafeEnabled { - file_ory_keto_acl_v1alpha1_check_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CheckRequest); i { case 0: return &v.state @@ -333,7 +342,7 @@ func file_ory_keto_acl_v1alpha1_check_service_proto_init() { return nil } } - file_ory_keto_acl_v1alpha1_check_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CheckResponse); i { case 0: return &v.state @@ -350,18 +359,18 @@ func file_ory_keto_acl_v1alpha1_check_service_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ory_keto_acl_v1alpha1_check_service_proto_rawDesc, + RawDescriptor: file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_ory_keto_acl_v1alpha1_check_service_proto_goTypes, - DependencyIndexes: file_ory_keto_acl_v1alpha1_check_service_proto_depIdxs, - MessageInfos: file_ory_keto_acl_v1alpha1_check_service_proto_msgTypes, + 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_acl_v1alpha1_check_service_proto = out.File - file_ory_keto_acl_v1alpha1_check_service_proto_rawDesc = nil - file_ory_keto_acl_v1alpha1_check_service_proto_goTypes = nil - file_ory_keto_acl_v1alpha1_check_service_proto_depIdxs = nil + File_ory_keto_relation_tuples_v1alpha2_check_service_proto = out.File + file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDesc = nil + file_ory_keto_relation_tuples_v1alpha2_check_service_proto_goTypes = nil + file_ory_keto_relation_tuples_v1alpha2_check_service_proto_depIdxs = nil } diff --git a/proto/ory/keto/acl/v1alpha1/check_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/check_service.proto similarity index 90% rename from proto/ory/keto/acl/v1alpha1/check_service.proto rename to proto/ory/keto/relation_tuples/v1alpha2/check_service.proto index e64ddde3a..d3d87e1f0 100644 --- a/proto/ory/keto/acl/v1alpha1/check_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.proto @@ -1,15 +1,15 @@ syntax = "proto3"; -package ory.keto.acl.v1alpha1; +package ory.keto.relation_tuples.v1alpha2; -import "ory/keto/acl/v1alpha1/acl.proto"; +import "ory/keto/relation_tuples/v1alpha2/relation_tuples.proto"; -option go_package = "github.com/ory/keto/proto/ory/keto/acl/v1alpha1;acl"; -option csharp_namespace = "Ory.Keto.Acl.V1Alpha1"; +option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; +option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; option java_multiple_files = true; option java_outer_classname = "CheckServiceProto"; -option java_package = "sh.ory.keto.acl.v1alpha1"; -option php_namespace = "Ory\\Keto\\Acl\\V1alpha1"; +option java_package = "sh.ory.keto.relation_tuples.v1alpha2"; +option php_namespace = "Ory\\Keto\\RelationTuples\\v1alpha2"; // The service that performs authorization checks // based on the stored Access Control Lists. diff --git a/proto/ory/keto/acl/v1alpha1/check_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go similarity index 91% rename from proto/ory/keto/acl/v1alpha1/check_service_grpc.pb.go rename to proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go index 629b65779..8fdc43f20 100644 --- a/proto/ory/keto/acl/v1alpha1/check_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -package acl +package rts import ( context "context" @@ -32,7 +32,7 @@ func NewCheckServiceClient(cc grpc.ClientConnInterface) CheckServiceClient { func (c *checkServiceClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) { out := new(CheckResponse) - err := c.cc.Invoke(ctx, "/ory.keto.acl.v1alpha1.CheckService/Check", in, out, opts...) + err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", in, out, opts...) if err != nil { return nil, err } @@ -76,7 +76,7 @@ func _CheckService_Check_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ory.keto.acl.v1alpha1.CheckService/Check", + FullMethod: "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CheckServiceServer).Check(ctx, req.(*CheckRequest)) @@ -88,7 +88,7 @@ func _CheckService_Check_Handler(srv interface{}, ctx context.Context, dec func( // 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.acl.v1alpha1.CheckService", + ServiceName: "ory.keto.relation_tuples.v1alpha2.CheckService", HandlerType: (*CheckServiceServer)(nil), Methods: []grpc.MethodDesc{ { @@ -97,5 +97,5 @@ var CheckService_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "ory/keto/acl/v1alpha1/check_service.proto", + Metadata: "ory/keto/relation_tuples/v1alpha2/check_service.proto", } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts new file mode 100644 index 000000000..2cd99f6ba --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts @@ -0,0 +1,42 @@ +// package: ory.keto.relation_tuples.v1alpha2 +// file: ory/keto/relation_tuples/v1alpha2/check_service.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "grpc"; +import * as ory_keto_relation_tuples_v1alpha2_check_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/check_service_pb"; +import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; + +interface ICheckServiceService extends grpc.ServiceDefinition { + check: ICheckServiceService_ICheck; +} + +interface ICheckServiceService_ICheck extends grpc.MethodDefinition { + path: "/ory.keto.relation_tuples.v1alpha2.CheckService/Check"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const CheckServiceService: ICheckServiceService; + +export interface ICheckServiceServer { + check: grpc.handleUnaryCall; +} + +export interface ICheckServiceClient { + check(request: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; + check(request: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; + check(request: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; +} + +export class CheckServiceClient extends grpc.Client implements ICheckServiceClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public check(request: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; + public check(request: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; + public check(request: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse) => void): grpc.ClientUnaryCall; +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js new file mode 100644 index 000000000..65fe201f5 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js @@ -0,0 +1,50 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('@grpc/grpc-js'); +var ory_keto_relation_tuples_v1alpha2_check_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/check_service_pb.js'); +var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); + +function serialize_ory_keto_relation_tuples_v1alpha2_CheckRequest(arg) { + if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest)) { + throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.CheckRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_ory_keto_relation_tuples_v1alpha2_CheckRequest(buffer_arg) { + return ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_ory_keto_relation_tuples_v1alpha2_CheckResponse(arg) { + if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse)) { + throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.CheckResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_ory_keto_relation_tuples_v1alpha2_CheckResponse(buffer_arg) { + return ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// The service that performs authorization checks +// based on the stored Access Control Lists. +// +// This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). +var CheckServiceService = exports.CheckServiceService = { + // Performs an authorization check. +check: { + path: '/ory.keto.relation_tuples.v1alpha2.CheckService/Check', + requestStream: false, + responseStream: false, + requestType: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest, + responseType: ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckResponse, + requestSerialize: serialize_ory_keto_relation_tuples_v1alpha2_CheckRequest, + requestDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_CheckRequest, + responseSerialize: serialize_ory_keto_relation_tuples_v1alpha2_CheckResponse, + responseDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_CheckResponse, + }, +}; + +exports.CheckServiceClient = grpc.makeGenericClientConstructor(CheckServiceService); diff --git a/proto/ory/keto/acl/v1alpha1/check_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts similarity index 82% rename from proto/ory/keto/acl/v1alpha1/check_service_pb.d.ts rename to proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts index 2a2eac742..0fef506e2 100644 --- a/proto/ory/keto/acl/v1alpha1/check_service_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts @@ -1,11 +1,11 @@ -// package: ory.keto.acl.v1alpha1 -// file: ory/keto/acl/v1alpha1/check_service.proto +// package: ory.keto.relation_tuples.v1alpha2 +// file: ory/keto/relation_tuples/v1alpha2/check_service.proto /* tslint:disable */ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as ory_keto_acl_v1alpha1_acl_pb from "../../../../ory/keto/acl/v1alpha1/acl_pb"; +import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; export class CheckRequest extends jspb.Message { getNamespace(): string; @@ -17,8 +17,8 @@ export class CheckRequest extends jspb.Message { hasSubject(): boolean; clearSubject(): void; - getSubject(): ory_keto_acl_v1alpha1_acl_pb.Subject | undefined; - setSubject(value?: ory_keto_acl_v1alpha1_acl_pb.Subject): CheckRequest; + getSubject(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject | undefined; + setSubject(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject): CheckRequest; getLatest(): boolean; setLatest(value: boolean): CheckRequest; getSnaptoken(): string; @@ -41,7 +41,7 @@ export namespace CheckRequest { namespace: string, object: string, relation: string, - subject?: ory_keto_acl_v1alpha1_acl_pb.Subject.AsObject, + subject?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.AsObject, latest: boolean, snaptoken: string, maxDepth: number, diff --git a/proto/ory/keto/acl/v1alpha1/check_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js similarity index 59% rename from proto/ory/keto/acl/v1alpha1/check_service_pb.js rename to proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js index 5a19c3f4a..e971b9072 100644 --- a/proto/ory/keto/acl/v1alpha1/check_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js @@ -1,4 +1,4 @@ -// source: ory/keto/acl/v1alpha1/check_service.proto +// source: ory/keto/relation_tuples/v1alpha2/check_service.proto /** * @fileoverview * @enhanceable @@ -21,10 +21,10 @@ var global = (function() { return Function('return this')(); }.call(null)); -var ory_keto_acl_v1alpha1_acl_pb = require('../../../../ory/keto/acl/v1alpha1/acl_pb.js'); -goog.object.extend(proto, ory_keto_acl_v1alpha1_acl_pb); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.CheckRequest', null, global); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.CheckResponse', null, global); +var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); +goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CheckRequest', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CheckResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -35,16 +35,16 @@ goog.exportSymbol('proto.ory.keto.acl.v1alpha1.CheckResponse', null, global); * @extends {jspb.Message} * @constructor */ -proto.ory.keto.acl.v1alpha1.CheckRequest = function(opt_data) { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.ory.keto.acl.v1alpha1.CheckRequest, jspb.Message); +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.CheckRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ory.keto.acl.v1alpha1.CheckRequest.displayName = 'proto.ory.keto.acl.v1alpha1.CheckRequest'; + proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.CheckRequest'; } /** * Generated by JsPbCodeGenerator. @@ -56,16 +56,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.ory.keto.acl.v1alpha1.CheckResponse = function(opt_data) { +proto.ory.keto.relation_tuples.v1alpha2.CheckResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.ory.keto.acl.v1alpha1.CheckResponse, jspb.Message); +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.CheckResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ory.keto.acl.v1alpha1.CheckResponse.displayName = 'proto.ory.keto.acl.v1alpha1.CheckResponse'; + proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.CheckResponse'; } @@ -83,8 +83,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.CheckRequest.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.toObject(opt_includeInstance, this); }; @@ -93,16 +93,16 @@ proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.toObject = function(opt_inclu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.CheckRequest} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.CheckRequest.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.toObject = function(includeInstance, msg) { var f, obj = { namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), object: jspb.Message.getFieldWithDefault(msg, 2, ""), relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subject: (f = msg.getSubject()) && ory_keto_acl_v1alpha1_acl_pb.Subject.toObject(includeInstance, f), + subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f), latest: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), snaptoken: jspb.Message.getFieldWithDefault(msg, 6, ""), maxDepth: jspb.Message.getFieldWithDefault(msg, 7, 0) @@ -119,23 +119,23 @@ proto.ory.keto.acl.v1alpha1.CheckRequest.toObject = function(includeInstance, ms /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.CheckRequest} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} */ -proto.ory.keto.acl.v1alpha1.CheckRequest.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.CheckRequest; - return proto.ory.keto.acl.v1alpha1.CheckRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.CheckRequest; + return proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.CheckRequest} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.CheckRequest} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} */ -proto.ory.keto.acl.v1alpha1.CheckRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -155,8 +155,8 @@ proto.ory.keto.acl.v1alpha1.CheckRequest.deserializeBinaryFromReader = function( msg.setRelation(value); break; case 4: - var value = new ory_keto_acl_v1alpha1_acl_pb.Subject; - reader.readMessage(value,ory_keto_acl_v1alpha1_acl_pb.Subject.deserializeBinaryFromReader); + var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject; + reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.deserializeBinaryFromReader); msg.setSubject(value); break; case 5: @@ -184,9 +184,9 @@ proto.ory.keto.acl.v1alpha1.CheckRequest.deserializeBinaryFromReader = function( * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.CheckRequest.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -194,11 +194,11 @@ proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.CheckRequest} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.CheckRequest.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getNamespace(); if (f.length > 0) { @@ -226,7 +226,7 @@ proto.ory.keto.acl.v1alpha1.CheckRequest.serializeBinaryToWriter = function(mess writer.writeMessage( 4, f, - ory_keto_acl_v1alpha1_acl_pb.Subject.serializeBinaryToWriter + ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.serializeBinaryToWriter ); } f = message.getLatest(); @@ -257,16 +257,16 @@ proto.ory.keto.acl.v1alpha1.CheckRequest.serializeBinaryToWriter = function(mess * optional string namespace = 1; * @return {string} */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.getNamespace = function() { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getNamespace = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.CheckRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.setNamespace = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setNamespace = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -275,16 +275,16 @@ proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.setNamespace = function(value * optional string object = 2; * @return {string} */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.getObject = function() { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getObject = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.CheckRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.setObject = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setObject = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -293,44 +293,44 @@ proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.setObject = function(value) { * optional string relation = 3; * @return {string} */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.getRelation = function() { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getRelation = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.CheckRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.setRelation = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setRelation = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional Subject subject = 4; - * @return {?proto.ory.keto.acl.v1alpha1.Subject} + * @return {?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.getSubject = function() { - return /** @type{?proto.ory.keto.acl.v1alpha1.Subject} */ ( - jspb.Message.getWrapperField(this, ory_keto_acl_v1alpha1_acl_pb.Subject, 4)); +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getSubject = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ ( + jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject, 4)); }; /** - * @param {?proto.ory.keto.acl.v1alpha1.Subject|undefined} value - * @return {!proto.ory.keto.acl.v1alpha1.CheckRequest} returns this + * @param {?proto.ory.keto.relation_tuples.v1alpha2.Subject|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.setSubject = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setSubject = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.ory.keto.acl.v1alpha1.CheckRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.clearSubject = function() { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.clearSubject = function() { return this.setSubject(undefined); }; @@ -339,7 +339,7 @@ proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.clearSubject = function() { * Returns whether this field is set. * @return {boolean} */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.hasSubject = function() { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.hasSubject = function() { return jspb.Message.getField(this, 4) != null; }; @@ -348,16 +348,16 @@ proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.hasSubject = function() { * optional bool latest = 5; * @return {boolean} */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.getLatest = function() { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getLatest = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; /** * @param {boolean} value - * @return {!proto.ory.keto.acl.v1alpha1.CheckRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.setLatest = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setLatest = function(value) { return jspb.Message.setProto3BooleanField(this, 5, value); }; @@ -366,16 +366,16 @@ proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.setLatest = function(value) { * optional string snaptoken = 6; * @return {string} */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.getSnaptoken = function() { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getSnaptoken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.CheckRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.setSnaptoken = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setSnaptoken = function(value) { return jspb.Message.setProto3StringField(this, 6, value); }; @@ -384,16 +384,16 @@ proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.setSnaptoken = function(value * optional int32 max_depth = 7; * @return {number} */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.getMaxDepth = function() { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getMaxDepth = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** * @param {number} value - * @return {!proto.ory.keto.acl.v1alpha1.CheckRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this */ -proto.ory.keto.acl.v1alpha1.CheckRequest.prototype.setMaxDepth = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setMaxDepth = function(value) { return jspb.Message.setProto3IntField(this, 7, value); }; @@ -414,8 +414,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.acl.v1alpha1.CheckResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.CheckResponse.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.toObject(opt_includeInstance, this); }; @@ -424,11 +424,11 @@ proto.ory.keto.acl.v1alpha1.CheckResponse.prototype.toObject = function(opt_incl * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.CheckResponse} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.CheckResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.CheckResponse.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.toObject = function(includeInstance, msg) { var f, obj = { allowed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), snaptoken: jspb.Message.getFieldWithDefault(msg, 2, "") @@ -445,23 +445,23 @@ proto.ory.keto.acl.v1alpha1.CheckResponse.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.CheckResponse} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckResponse} */ -proto.ory.keto.acl.v1alpha1.CheckResponse.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.CheckResponse; - return proto.ory.keto.acl.v1alpha1.CheckResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.CheckResponse; + return proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.CheckResponse} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.CheckResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.CheckResponse} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckResponse} */ -proto.ory.keto.acl.v1alpha1.CheckResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -489,9 +489,9 @@ proto.ory.keto.acl.v1alpha1.CheckResponse.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.acl.v1alpha1.CheckResponse.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.CheckResponse.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -499,11 +499,11 @@ proto.ory.keto.acl.v1alpha1.CheckResponse.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.CheckResponse} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.CheckResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.CheckResponse.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAllowed(); if (f) { @@ -526,16 +526,16 @@ proto.ory.keto.acl.v1alpha1.CheckResponse.serializeBinaryToWriter = function(mes * optional bool allowed = 1; * @return {boolean} */ -proto.ory.keto.acl.v1alpha1.CheckResponse.prototype.getAllowed = function() { +proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.prototype.getAllowed = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** * @param {boolean} value - * @return {!proto.ory.keto.acl.v1alpha1.CheckResponse} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckResponse} returns this */ -proto.ory.keto.acl.v1alpha1.CheckResponse.prototype.setAllowed = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.prototype.setAllowed = function(value) { return jspb.Message.setProto3BooleanField(this, 1, value); }; @@ -544,18 +544,18 @@ proto.ory.keto.acl.v1alpha1.CheckResponse.prototype.setAllowed = function(value) * optional string snaptoken = 2; * @return {string} */ -proto.ory.keto.acl.v1alpha1.CheckResponse.prototype.getSnaptoken = function() { +proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.prototype.getSnaptoken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.CheckResponse} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckResponse} returns this */ -proto.ory.keto.acl.v1alpha1.CheckResponse.prototype.setSnaptoken = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.prototype.setSnaptoken = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; -goog.object.extend(exports, proto.ory.keto.acl.v1alpha1); +goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go new file mode 100644 index 000000000..2d07f5e9e --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go @@ -0,0 +1,464 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.13.0 +// source: ory/keto/relation_tuples/v1alpha2/expand_service.proto + +package rts + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +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 + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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. + // + Snaptoken string `protobuf:"bytes,3,opt,name=snaptoken,proto3" json:"snaptoken,omitempty"` +} + +func (x *ExpandRequest) Reset() { + *x = ExpandRequest{} + if protoimpl.UnsafeEnabled { + 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 protoimpl.UnsafeEnabled && 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 + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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"` +} + +func (x *ExpandResponse) Reset() { + *x = ExpandResponse{} + if protoimpl.UnsafeEnabled { + 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 protoimpl.UnsafeEnabled && 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 + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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. + Subject *Subject `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,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"` +} + +func (x *SubjectTree) Reset() { + *x = SubjectTree{} + if protoimpl.UnsafeEnabled { + 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 protoimpl.UnsafeEnabled && 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 +} + +func (x *SubjectTree) GetSubject() *Subject { + if x != nil { + return x.Subject + } + 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 + +var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDesc = []byte{ + 0x0a, 0x36, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x1a, 0x37, 0x6f, 0x72, 0x79, + 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6e, 0x61, + 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6e, + 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x54, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x61, 0x6e, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x72, 0x65, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x52, 0x04, 0x74, 0x72, 0x65, 0x65, 0x22, 0xe9, 0x01, + 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x12, 0x48, 0x0a, + 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2b, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x6e, + 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, + 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x4a, 0x0a, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x52, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x2a, 0x83, 0x01, 0x0a, 0x08, 0x4e, 0x6f, + 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, + 0x4e, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, + 0x1a, 0x0a, 0x16, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, + 0x45, 0x52, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4e, + 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x45, 0x41, 0x46, 0x10, 0x04, 0x32, + 0x7e, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x6d, 0x0a, 0x06, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x30, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, + 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6f, + 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0xc3, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x12, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, + 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, + 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, + 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDescOnce sync.Once + file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDescData = file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDesc +) + +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(file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDescData) + }) + 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 = []interface{}{ + (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 +} +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 + 3, // 4: ory.keto.relation_tuples.v1alpha2.SubjectTree.children:type_name -> ory.keto.relation_tuples.v1alpha2.SubjectTree + 1, // 5: ory.keto.relation_tuples.v1alpha2.ExpandService.Expand:input_type -> ory.keto.relation_tuples.v1alpha2.ExpandRequest + 2, // 6: ory.keto.relation_tuples.v1alpha2.ExpandService.Expand:output_type -> ory.keto.relation_tuples.v1alpha2.ExpandResponse + 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_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() + if !protoimpl.UnsafeEnabled { + file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExpandRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExpandResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubjectTree); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_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_rawDesc = nil + file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_goTypes = nil + file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_depIdxs = nil +} diff --git a/proto/ory/keto/acl/v1alpha1/expand_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.proto similarity index 86% rename from proto/ory/keto/acl/v1alpha1/expand_service.proto rename to proto/ory/keto/relation_tuples/v1alpha2/expand_service.proto index 0e89385f9..d5380f5a8 100644 --- a/proto/ory/keto/acl/v1alpha1/expand_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.proto @@ -1,15 +1,15 @@ syntax = "proto3"; -package ory.keto.acl.v1alpha1; +package ory.keto.relation_tuples.v1alpha2; -import "ory/keto/acl/v1alpha1/acl.proto"; +import "ory/keto/relation_tuples/v1alpha2/relation_tuples.proto"; -option go_package = "github.com/ory/keto/proto/ory/keto/acl/v1alpha1;acl"; -option csharp_namespace = "Ory.Keto.Acl.V1Alpha1"; +option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; +option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; option java_multiple_files = true; option java_outer_classname = "ExpandServiceProto"; -option java_package = "sh.ory.keto.acl.v1alpha1"; -option php_namespace = "Ory\\Keto\\Acl\\V1alpha1"; +option java_package = "sh.ory.keto.relation_tuples.v1alpha2"; +option php_namespace = "Ory\\Keto\\RelationTuples\\v1alpha2"; // The service that performs subject set expansion // based on the stored Access Control Lists. diff --git a/proto/ory/keto/acl/v1alpha1/expand_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc.pb.go similarity index 91% rename from proto/ory/keto/acl/v1alpha1/expand_service_grpc.pb.go rename to proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc.pb.go index 7b55fb971..a26ca7f95 100644 --- a/proto/ory/keto/acl/v1alpha1/expand_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -package acl +package rts import ( context "context" @@ -32,7 +32,7 @@ func NewExpandServiceClient(cc grpc.ClientConnInterface) ExpandServiceClient { func (c *expandServiceClient) Expand(ctx context.Context, in *ExpandRequest, opts ...grpc.CallOption) (*ExpandResponse, error) { out := new(ExpandResponse) - err := c.cc.Invoke(ctx, "/ory.keto.acl.v1alpha1.ExpandService/Expand", in, out, opts...) + err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand", in, out, opts...) if err != nil { return nil, err } @@ -76,7 +76,7 @@ func _ExpandService_Expand_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ory.keto.acl.v1alpha1.ExpandService/Expand", + FullMethod: "/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ExpandServiceServer).Expand(ctx, req.(*ExpandRequest)) @@ -88,7 +88,7 @@ func _ExpandService_Expand_Handler(srv interface{}, ctx context.Context, dec fun // 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.acl.v1alpha1.ExpandService", + ServiceName: "ory.keto.relation_tuples.v1alpha2.ExpandService", HandlerType: (*ExpandServiceServer)(nil), Methods: []grpc.MethodDesc{ { @@ -97,5 +97,5 @@ var ExpandService_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "ory/keto/acl/v1alpha1/expand_service.proto", + Metadata: "ory/keto/relation_tuples/v1alpha2/expand_service.proto", } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.d.ts new file mode 100644 index 000000000..456049012 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.d.ts @@ -0,0 +1,42 @@ +// package: ory.keto.relation_tuples.v1alpha2 +// file: ory/keto/relation_tuples/v1alpha2/expand_service.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "grpc"; +import * as ory_keto_relation_tuples_v1alpha2_expand_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/expand_service_pb"; +import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; + +interface IExpandServiceService extends grpc.ServiceDefinition { + expand: IExpandServiceService_IExpand; +} + +interface IExpandServiceService_IExpand extends grpc.MethodDefinition { + path: "/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const ExpandServiceService: IExpandServiceService; + +export interface IExpandServiceServer { + expand: grpc.handleUnaryCall; +} + +export interface IExpandServiceClient { + expand(request: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; + expand(request: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; + expand(request: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; +} + +export class ExpandServiceClient extends grpc.Client implements IExpandServiceClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public expand(request: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; + public expand(request: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; + public expand(request: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse) => void): grpc.ClientUnaryCall; +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.js new file mode 100644 index 000000000..ab89c4b40 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.js @@ -0,0 +1,50 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('@grpc/grpc-js'); +var ory_keto_relation_tuples_v1alpha2_expand_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/expand_service_pb.js'); +var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); + +function serialize_ory_keto_relation_tuples_v1alpha2_ExpandRequest(arg) { + if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest)) { + throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.ExpandRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_ory_keto_relation_tuples_v1alpha2_ExpandRequest(buffer_arg) { + return ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_ory_keto_relation_tuples_v1alpha2_ExpandResponse(arg) { + if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse)) { + throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.ExpandResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_ory_keto_relation_tuples_v1alpha2_ExpandResponse(buffer_arg) { + return ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// The service that performs subject set expansion +// based on the stored Access Control Lists. +// +// This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). +var ExpandServiceService = exports.ExpandServiceService = { + // Expands the subject set into a tree of subjects. +expand: { + path: '/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand', + requestStream: false, + responseStream: false, + requestType: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest, + responseType: ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandResponse, + requestSerialize: serialize_ory_keto_relation_tuples_v1alpha2_ExpandRequest, + requestDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_ExpandRequest, + responseSerialize: serialize_ory_keto_relation_tuples_v1alpha2_ExpandResponse, + responseDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_ExpandResponse, + }, +}; + +exports.ExpandServiceClient = grpc.makeGenericClientConstructor(ExpandServiceService); diff --git a/proto/ory/keto/acl/v1alpha1/expand_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts similarity index 80% rename from proto/ory/keto/acl/v1alpha1/expand_service_pb.d.ts rename to proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts index 3e90c0763..bd4b2b3e8 100644 --- a/proto/ory/keto/acl/v1alpha1/expand_service_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts @@ -1,18 +1,18 @@ -// package: ory.keto.acl.v1alpha1 -// file: ory/keto/acl/v1alpha1/expand_service.proto +// package: ory.keto.relation_tuples.v1alpha2 +// file: ory/keto/relation_tuples/v1alpha2/expand_service.proto /* tslint:disable */ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as ory_keto_acl_v1alpha1_acl_pb from "../../../../ory/keto/acl/v1alpha1/acl_pb"; +import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; export class ExpandRequest extends jspb.Message { hasSubject(): boolean; clearSubject(): void; - getSubject(): ory_keto_acl_v1alpha1_acl_pb.Subject | undefined; - setSubject(value?: ory_keto_acl_v1alpha1_acl_pb.Subject): ExpandRequest; + getSubject(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject | undefined; + setSubject(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject): ExpandRequest; getMaxDepth(): number; setMaxDepth(value: number): ExpandRequest; getSnaptoken(): string; @@ -30,7 +30,7 @@ export class ExpandRequest extends jspb.Message { export namespace ExpandRequest { export type AsObject = { - subject?: ory_keto_acl_v1alpha1_acl_pb.Subject.AsObject, + subject?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.AsObject, maxDepth: number, snaptoken: string, } @@ -65,8 +65,8 @@ export class SubjectTree extends jspb.Message { hasSubject(): boolean; clearSubject(): void; - getSubject(): ory_keto_acl_v1alpha1_acl_pb.Subject | undefined; - setSubject(value?: ory_keto_acl_v1alpha1_acl_pb.Subject): SubjectTree; + getSubject(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject | undefined; + setSubject(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject): SubjectTree; clearChildrenList(): void; getChildrenList(): Array; setChildrenList(value: Array): SubjectTree; @@ -85,7 +85,7 @@ export class SubjectTree extends jspb.Message { export namespace SubjectTree { export type AsObject = { nodeType: NodeType, - subject?: ory_keto_acl_v1alpha1_acl_pb.Subject.AsObject, + subject?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.AsObject, childrenList: Array, } } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js new file mode 100644 index 000000000..a2f8a316f --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js @@ -0,0 +1,707 @@ +// source: ory/keto/relation_tuples/v1alpha2/expand_service.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); +goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.NodeType', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.SubjectTree', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.repeatedFields_, null); +}; +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.SubjectTree, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.SubjectTree'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.toObject = function(includeInstance, msg) { + var f, obj = { + subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f), + maxDepth: jspb.Message.getFieldWithDefault(msg, 2, 0), + snaptoken: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest; + return proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject; + reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.deserializeBinaryFromReader); + msg.setSubject(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxDepth(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSnaptoken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSubject(); + if (f != null) { + writer.writeMessage( + 1, + f, + ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.serializeBinaryToWriter + ); + } + f = message.getMaxDepth(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getSnaptoken(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional Subject subject = 1; + * @return {?proto.ory.keto.relation_tuples.v1alpha2.Subject} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.getSubject = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ ( + jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject, 1)); +}; + + +/** + * @param {?proto.ory.keto.relation_tuples.v1alpha2.Subject|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} returns this +*/ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.setSubject = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.clearSubject = function() { + return this.setSubject(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.hasSubject = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 max_depth = 2; + * @return {number} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.getMaxDepth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.setMaxDepth = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string snaptoken = 3; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.getSnaptoken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.setSnaptoken = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.toObject = function(includeInstance, msg) { + var f, obj = { + tree: (f = msg.getTree()) && proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse; + return proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.ory.keto.relation_tuples.v1alpha2.SubjectTree; + reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.deserializeBinaryFromReader); + msg.setTree(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTree(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.serializeBinaryToWriter + ); + } +}; + + +/** + * optional SubjectTree tree = 1; + * @return {?proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.prototype.getTree = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} */ ( + jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.SubjectTree, 1)); +}; + + +/** + * @param {?proto.ory.keto.relation_tuples.v1alpha2.SubjectTree|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse} returns this +*/ +proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.prototype.setTree = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.prototype.clearTree = function() { + return this.setTree(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.prototype.hasTree = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.toObject = function(includeInstance, msg) { + var f, obj = { + nodeType: jspb.Message.getFieldWithDefault(msg, 1, 0), + subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f), + childrenList: jspb.Message.toObjectList(msg.getChildrenList(), + proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.SubjectTree; + return proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.ory.keto.relation_tuples.v1alpha2.NodeType} */ (reader.readEnum()); + msg.setNodeType(value); + break; + case 2: + var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject; + reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.deserializeBinaryFromReader); + msg.setSubject(value); + break; + case 3: + var value = new proto.ory.keto.relation_tuples.v1alpha2.SubjectTree; + reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.deserializeBinaryFromReader); + msg.addChildren(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodeType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getSubject(); + if (f != null) { + writer.writeMessage( + 2, + f, + ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.serializeBinaryToWriter + ); + } + f = message.getChildrenList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.serializeBinaryToWriter + ); + } +}; + + +/** + * optional NodeType node_type = 1; + * @return {!proto.ory.keto.relation_tuples.v1alpha2.NodeType} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.getNodeType = function() { + return /** @type {!proto.ory.keto.relation_tuples.v1alpha2.NodeType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.ory.keto.relation_tuples.v1alpha2.NodeType} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.setNodeType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional Subject subject = 2; + * @return {?proto.ory.keto.relation_tuples.v1alpha2.Subject} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.getSubject = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ ( + jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject, 2)); +}; + + +/** + * @param {?proto.ory.keto.relation_tuples.v1alpha2.Subject|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} returns this +*/ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.setSubject = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.clearSubject = function() { + return this.setSubject(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.hasSubject = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated SubjectTree children = 3; + * @return {!Array} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.getChildrenList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.SubjectTree, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} returns this +*/ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.setChildrenList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree=} opt_value + * @param {number=} opt_index + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.addChildren = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.ory.keto.relation_tuples.v1alpha2.SubjectTree, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectTree} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.clearChildrenList = function() { + return this.setChildrenList([]); +}; + + +/** + * @enum {number} + */ +proto.ory.keto.relation_tuples.v1alpha2.NodeType = { + NODE_TYPE_UNSPECIFIED: 0, + NODE_TYPE_UNION: 1, + NODE_TYPE_EXCLUSION: 2, + NODE_TYPE_INTERSECTION: 3, + NODE_TYPE_LEAF: 4 +}; + +goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/proto/ory/keto/acl/v1alpha1/index.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/index.d.ts similarity index 79% rename from proto/ory/keto/acl/v1alpha1/index.d.ts rename to proto/ory/keto/relation_tuples/v1alpha2/index.d.ts index 638c6fb9a..132b06054 100644 --- a/proto/ory/keto/acl/v1alpha1/index.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/index.d.ts @@ -1,4 +1,4 @@ -import * as acl from './acl_pb' +import * as relationTuples from './relation_tuples_pb' import * as write from './write_service_pb' import * as writeService from './write_service_grpc_pb' import * as check from './check_service_pb' @@ -8,9 +8,9 @@ import * as expandService from './expand_service_grpc_pb' import * as read from './read_service_pb' import * as readService from './read_service_grpc_pb' -declare module '@ory/keto-grpc-client/ory/keto/acl/v1alpha1' { +declare module '@ory/keto-grpc-client/ory/keto/acl/v1alpha2' { export { - acl, + relationTuples, write, writeService, check, diff --git a/proto/ory/keto/acl/v1alpha1/index.js b/proto/ory/keto/relation_tuples/v1alpha2/index.js similarity index 89% rename from proto/ory/keto/acl/v1alpha1/index.js rename to proto/ory/keto/relation_tuples/v1alpha2/index.js index 10ed09ad3..08e099950 100644 --- a/proto/ory/keto/acl/v1alpha1/index.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/index.js @@ -1,7 +1,7 @@ // This has to be as is because of the way named exports // are supported in ESM from CommonJS packages. Don't ask, it just works. -const acl = require('./acl_pb.js') +const relationTuples = require('./relation_tuples_pb.js') const write = require('./write_service_pb.js') const writeService = require('./write_service_grpc_pb.js') const check = require('./check_service_pb.js') @@ -12,7 +12,7 @@ const read = require('./read_service_pb.js') const readService = require('./read_service_grpc_pb.js') module.exports = { - acl, + relationTuples, check, checkService, write, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go new file mode 100644 index 000000000..020209bb3 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go @@ -0,0 +1,454 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.13.0 +// source: ory/keto/relation_tuples/v1alpha2/read_service.proto + +package rts + +import ( + field_mask "google.golang.org/genproto/protobuf/field_mask" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Request for ReadService.ListRelationTuples RPC. +// See `ListRelationTuplesRequest_Query` for how to filter the query. +type ListRelationTuplesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // All query constraints are concatenated + // with a logical AND operator. + // + // The RelationTuple list from ListRelationTuplesResponse + // is ordered from the newest RelationTuple to the oldest. + Query *ListRelationTuplesRequest_Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + // This field is not implemented yet and has no effect. + // + ExpandMask *field_mask.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. + // + 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"` +} + +func (x *ListRelationTuplesRequest) Reset() { + *x = ListRelationTuplesRequest{} + if protoimpl.UnsafeEnabled { + 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 protoimpl.UnsafeEnabled && 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} +} + +func (x *ListRelationTuplesRequest) GetQuery() *ListRelationTuplesRequest_Query { + if x != nil { + return x.Query + } + return nil +} + +func (x *ListRelationTuplesRequest) GetExpandMask() *field_mask.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 + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The relation tuples 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"` +} + +func (x *ListRelationTuplesResponse) Reset() { + *x = ListRelationTuplesResponse{} + if protoimpl.UnsafeEnabled { + 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 protoimpl.UnsafeEnabled && 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 relation tuples. +// Clients can specify any optional field to +// partially filter for specific relation tuples. +// +// 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 + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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"` +} + +func (x *ListRelationTuplesRequest_Query) Reset() { + *x = ListRelationTuplesRequest_Query{} + if protoimpl.UnsafeEnabled { + 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 protoimpl.UnsafeEnabled && 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 + +var file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDesc = []byte{ + 0x0a, 0x34, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, 0x6b, + 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x03, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x58, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x42, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x3b, 0x0a, 0x0b, + 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x65, + 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6e, 0x61, + 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6e, + 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x1a, 0x9f, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x9f, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, + 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, + 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xa1, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3c, + 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x6f, + 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc1, 0x01, 0x0a, 0x24, + 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x42, 0x10, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, + 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, + 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDescOnce sync.Once + file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDescData = file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDesc +) + +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(file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDescData) + }) + 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 = []interface{}{ + (*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 + (*field_mask.FieldMask)(nil), // 3: google.protobuf.FieldMask + (*RelationTuple)(nil), // 4: ory.keto.relation_tuples.v1alpha2.RelationTuple + (*Subject)(nil), // 5: 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.expand_mask:type_name -> google.protobuf.FieldMask + 4, // 2: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.relation_tuples:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTuple + 5, // 3: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject + 0, // 4: ory.keto.relation_tuples.v1alpha2.ReadService.ListRelationTuples:input_type -> ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest + 1, // 5: ory.keto.relation_tuples.v1alpha2.ReadService.ListRelationTuples:output_type -> ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse + 5, // [5:6] is the sub-list for method output_type + 4, // [4:5] 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_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() + if !protoimpl.UnsafeEnabled { + file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRelationTuplesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRelationTuplesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRelationTuplesRequest_Query); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_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_rawDesc = nil + file_ory_keto_relation_tuples_v1alpha2_read_service_proto_goTypes = nil + file_ory_keto_relation_tuples_v1alpha2_read_service_proto_depIdxs = nil +} diff --git a/proto/ory/keto/acl/v1alpha1/read_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/read_service.proto similarity index 89% rename from proto/ory/keto/acl/v1alpha1/read_service.proto rename to proto/ory/keto/relation_tuples/v1alpha2/read_service.proto index d4152ec52..4ccc67ec9 100644 --- a/proto/ory/keto/acl/v1alpha1/read_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.proto @@ -1,16 +1,16 @@ syntax = "proto3"; -package ory.keto.acl.v1alpha1; +package ory.keto.relation_tuples.v1alpha2; -import "ory/keto/acl/v1alpha1/acl.proto"; +import "ory/keto/relation_tuples/v1alpha2/relation_tuples.proto"; import "google/protobuf/field_mask.proto"; -option go_package = "github.com/ory/keto/proto/ory/keto/acl/v1alpha1;acl"; -option csharp_namespace = "Ory.Keto.Acl.V1Alpha1"; +option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; +option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; option java_multiple_files = true; option java_outer_classname = "ReadServiceProto"; -option java_package = "sh.ory.keto.acl.v1alpha1"; -option php_namespace = "Ory\\Keto\\Acl\\V1alpha1"; +option java_package = "sh.ory.keto.relation_tuples.v1alpha2"; +option php_namespace = "Ory\\Keto\\RelationTuples\\v1alpha2"; // The service to query relation tuples. // diff --git a/proto/ory/keto/acl/v1alpha1/read_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go similarity index 91% rename from proto/ory/keto/acl/v1alpha1/read_service_grpc.pb.go rename to proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go index 2ddf34d72..d9ce30729 100644 --- a/proto/ory/keto/acl/v1alpha1/read_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -package acl +package rts import ( context "context" @@ -32,7 +32,7 @@ func NewReadServiceClient(cc grpc.ClientConnInterface) ReadServiceClient { func (c *readServiceClient) ListRelationTuples(ctx context.Context, in *ListRelationTuplesRequest, opts ...grpc.CallOption) (*ListRelationTuplesResponse, error) { out := new(ListRelationTuplesResponse) - err := c.cc.Invoke(ctx, "/ory.keto.acl.v1alpha1.ReadService/ListRelationTuples", in, out, opts...) + err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples", in, out, opts...) if err != nil { return nil, err } @@ -76,7 +76,7 @@ func _ReadService_ListRelationTuples_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ory.keto.acl.v1alpha1.ReadService/ListRelationTuples", + FullMethod: "/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ReadServiceServer).ListRelationTuples(ctx, req.(*ListRelationTuplesRequest)) @@ -88,7 +88,7 @@ func _ReadService_ListRelationTuples_Handler(srv interface{}, ctx context.Contex // 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.acl.v1alpha1.ReadService", + ServiceName: "ory.keto.relation_tuples.v1alpha2.ReadService", HandlerType: (*ReadServiceServer)(nil), Methods: []grpc.MethodDesc{ { @@ -97,5 +97,5 @@ var ReadService_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "ory/keto/acl/v1alpha1/read_service.proto", + Metadata: "ory/keto/relation_tuples/v1alpha2/read_service.proto", } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.d.ts new file mode 100644 index 000000000..4622b75af --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.d.ts @@ -0,0 +1,43 @@ +// package: ory.keto.relation_tuples.v1alpha2 +// file: ory/keto/relation_tuples/v1alpha2/read_service.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "grpc"; +import * as ory_keto_relation_tuples_v1alpha2_read_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/read_service_pb"; +import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as google_protobuf_field_mask_pb from "google-protobuf/google/protobuf/field_mask_pb"; + +interface IReadServiceService extends grpc.ServiceDefinition { + listRelationTuples: IReadServiceService_IListRelationTuples; +} + +interface IReadServiceService_IListRelationTuples extends grpc.MethodDefinition { + path: "/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const ReadServiceService: IReadServiceService; + +export interface IReadServiceServer { + listRelationTuples: grpc.handleUnaryCall; +} + +export interface IReadServiceClient { + listRelationTuples(request: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; + listRelationTuples(request: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; + listRelationTuples(request: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; +} + +export class ReadServiceClient extends grpc.Client implements IReadServiceClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public listRelationTuples(request: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; + public listRelationTuples(request: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; + public listRelationTuples(request: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse) => void): grpc.ClientUnaryCall; +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js new file mode 100644 index 000000000..5fb177d71 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js @@ -0,0 +1,50 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('@grpc/grpc-js'); +var ory_keto_relation_tuples_v1alpha2_read_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/read_service_pb.js'); +var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); +var google_protobuf_field_mask_pb = require('google-protobuf/google/protobuf/field_mask_pb.js'); + +function serialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesRequest(arg) { + if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest)) { + throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesRequest(buffer_arg) { + return ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesResponse(arg) { + if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse)) { + throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesResponse(buffer_arg) { + return ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// The service to query relation tuples. +// +// This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). +var ReadServiceService = exports.ReadServiceService = { + // Lists ACL relation tuples. +listRelationTuples: { + path: '/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples', + requestStream: false, + responseStream: false, + requestType: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest, + responseType: ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesResponse, + requestSerialize: serialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesRequest, + requestDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesRequest, + responseSerialize: serialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesResponse, + responseDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesResponse, + }, +}; + +exports.ReadServiceClient = grpc.makeGenericClientConstructor(ReadServiceService); diff --git a/proto/ory/keto/acl/v1alpha1/read_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.d.ts similarity index 79% rename from proto/ory/keto/acl/v1alpha1/read_service_pb.d.ts rename to proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.d.ts index 36df16053..4e8e6572d 100644 --- a/proto/ory/keto/acl/v1alpha1/read_service_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.d.ts @@ -1,11 +1,11 @@ -// package: ory.keto.acl.v1alpha1 -// file: ory/keto/acl/v1alpha1/read_service.proto +// package: ory.keto.relation_tuples.v1alpha2 +// file: ory/keto/relation_tuples/v1alpha2/read_service.proto /* tslint:disable */ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as ory_keto_acl_v1alpha1_acl_pb from "../../../../ory/keto/acl/v1alpha1/acl_pb"; +import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; import * as google_protobuf_field_mask_pb from "google-protobuf/google/protobuf/field_mask_pb"; export class ListRelationTuplesRequest extends jspb.Message { @@ -56,8 +56,8 @@ export namespace ListRelationTuplesRequest { hasSubject(): boolean; clearSubject(): void; - getSubject(): ory_keto_acl_v1alpha1_acl_pb.Subject | undefined; - setSubject(value?: ory_keto_acl_v1alpha1_acl_pb.Subject): Query; + getSubject(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject | undefined; + setSubject(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject): Query; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Query.AsObject; @@ -74,7 +74,7 @@ export namespace ListRelationTuplesRequest { namespace: string, object: string, relation: string, - subject?: ory_keto_acl_v1alpha1_acl_pb.Subject.AsObject, + subject?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.AsObject, } } @@ -82,9 +82,9 @@ export namespace ListRelationTuplesRequest { export class ListRelationTuplesResponse extends jspb.Message { clearRelationTuplesList(): void; - getRelationTuplesList(): Array; - setRelationTuplesList(value: Array): ListRelationTuplesResponse; - addRelationTuples(value?: ory_keto_acl_v1alpha1_acl_pb.RelationTuple, index?: number): ory_keto_acl_v1alpha1_acl_pb.RelationTuple; + getRelationTuplesList(): Array; + setRelationTuplesList(value: Array): ListRelationTuplesResponse; + addRelationTuples(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple, index?: number): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple; getNextPageToken(): string; setNextPageToken(value: string): ListRelationTuplesResponse; @@ -100,7 +100,7 @@ export class ListRelationTuplesResponse extends jspb.Message { export namespace ListRelationTuplesResponse { export type AsObject = { - relationTuplesList: Array, + relationTuplesList: Array, nextPageToken: string, } } diff --git a/proto/ory/keto/acl/v1alpha1/read_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js similarity index 51% rename from proto/ory/keto/acl/v1alpha1/read_service_pb.js rename to proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js index fcd8145be..fbdb86028 100644 --- a/proto/ory/keto/acl/v1alpha1/read_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js @@ -1,4 +1,4 @@ -// source: ory/keto/acl/v1alpha1/read_service.proto +// source: ory/keto/relation_tuples/v1alpha2/read_service.proto /** * @fileoverview * @enhanceable @@ -21,13 +21,13 @@ var global = (function() { return Function('return this')(); }.call(null)); -var ory_keto_acl_v1alpha1_acl_pb = require('../../../../ory/keto/acl/v1alpha1/acl_pb.js'); -goog.object.extend(proto, ory_keto_acl_v1alpha1_acl_pb); +var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); +goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); var google_protobuf_field_mask_pb = require('google-protobuf/google/protobuf/field_mask_pb.js'); goog.object.extend(proto, google_protobuf_field_mask_pb); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest', null, global); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query', null, global); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -38,16 +38,16 @@ goog.exportSymbol('proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse', null * @extends {jspb.Message} * @constructor */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest = function(opt_data) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest, jspb.Message); +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.displayName = 'proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest'; + proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest'; } /** * Generated by JsPbCodeGenerator. @@ -59,16 +59,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query = function(opt_data) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query, jspb.Message); +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.displayName = 'proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query'; + proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query'; } /** * Generated by JsPbCodeGenerator. @@ -80,16 +80,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.repeatedFields_, null); +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.repeatedFields_, null); }; -goog.inherits(proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse, jspb.Message); +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.displayName = 'proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse'; + proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse'; } @@ -107,8 +107,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.toObject(opt_includeInstance, this); }; @@ -117,13 +117,13 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.toObject = funct * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.toObject = function(includeInstance, msg) { var f, obj = { - query: (f = msg.getQuery()) && proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.toObject(includeInstance, f), + query: (f = msg.getQuery()) && proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.toObject(includeInstance, f), expandMask: (f = msg.getExpandMask()) && google_protobuf_field_mask_pb.FieldMask.toObject(includeInstance, f), snaptoken: jspb.Message.getFieldWithDefault(msg, 3, ""), pageSize: jspb.Message.getFieldWithDefault(msg, 4, 0), @@ -141,23 +141,23 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.toObject = function(includ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest; - return proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest; + return proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -165,8 +165,8 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.deserializeBinaryFromReade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query; - reader.readMessage(value,proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.deserializeBinaryFromReader); + var value = new proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query; + reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.deserializeBinaryFromReader); msg.setQuery(value); break; case 2: @@ -199,9 +199,9 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.deserializeBinaryFromReade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -209,18 +209,18 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.serializeBinary /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getQuery(); if (f != null) { writer.writeMessage( 1, f, - proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.serializeBinaryToWriter + proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.serializeBinaryToWriter ); } f = message.getExpandMask(); @@ -271,8 +271,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.toObject(opt_includeInstance, this); }; @@ -281,16 +281,16 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.toObject = * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.toObject = function(includeInstance, msg) { var f, obj = { namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), object: jspb.Message.getFieldWithDefault(msg, 2, ""), relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subject: (f = msg.getSubject()) && ory_keto_acl_v1alpha1_acl_pb.Subject.toObject(includeInstance, f) + subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f) }; if (includeInstance) { @@ -304,23 +304,23 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.toObject = function( /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query; - return proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query; + return proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -340,8 +340,8 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.deserializeBinaryFro msg.setRelation(value); break; case 4: - var value = new ory_keto_acl_v1alpha1_acl_pb.Subject; - reader.readMessage(value,ory_keto_acl_v1alpha1_acl_pb.Subject.deserializeBinaryFromReader); + var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject; + reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.deserializeBinaryFromReader); msg.setSubject(value); break; default: @@ -357,9 +357,9 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.deserializeBinaryFro * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -367,11 +367,11 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.serializeB /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getNamespace(); if (f.length > 0) { @@ -399,7 +399,7 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.serializeBinaryToWri writer.writeMessage( 4, f, - ory_keto_acl_v1alpha1_acl_pb.Subject.serializeBinaryToWriter + ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.serializeBinaryToWriter ); } }; @@ -409,16 +409,16 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.serializeBinaryToWri * optional string namespace = 1; * @return {string} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.getNamespace = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.getNamespace = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} returns this */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.setNamespace = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.setNamespace = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -427,16 +427,16 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.setNamespa * optional string object = 2; * @return {string} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.getObject = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.getObject = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} returns this */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.setObject = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.setObject = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -445,44 +445,44 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.setObject * optional string relation = 3; * @return {string} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.getRelation = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.getRelation = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} returns this */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.setRelation = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.setRelation = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional Subject subject = 4; - * @return {?proto.ory.keto.acl.v1alpha1.Subject} + * @return {?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.getSubject = function() { - return /** @type{?proto.ory.keto.acl.v1alpha1.Subject} */ ( - jspb.Message.getWrapperField(this, ory_keto_acl_v1alpha1_acl_pb.Subject, 4)); +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.getSubject = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ ( + jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject, 4)); }; /** - * @param {?proto.ory.keto.acl.v1alpha1.Subject|undefined} value - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query} returns this + * @param {?proto.ory.keto.relation_tuples.v1alpha2.Subject|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} returns this */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.setSubject = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.setSubject = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} returns this */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.clearSubject = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.clearSubject = function() { return this.setSubject(undefined); }; @@ -491,35 +491,35 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.clearSubje * Returns whether this field is set. * @return {boolean} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query.prototype.hasSubject = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototype.hasSubject = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional Query query = 1; - * @return {?proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query} + * @return {?proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.getQuery = function() { - return /** @type{?proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query} */ ( - jspb.Message.getWrapperField(this, proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query, 1)); +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getQuery = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query} */ ( + jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query, 1)); }; /** - * @param {?proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query|undefined} value - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest} returns this + * @param {?proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.setQuery = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setQuery = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.clearQuery = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.clearQuery = function() { return this.setQuery(undefined); }; @@ -528,7 +528,7 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.clearQuery = fun * Returns whether this field is set. * @return {boolean} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.hasQuery = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.hasQuery = function() { return jspb.Message.getField(this, 1) != null; }; @@ -537,7 +537,7 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.hasQuery = funct * optional google.protobuf.FieldMask expand_mask = 2; * @return {?proto.google.protobuf.FieldMask} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.getExpandMask = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getExpandMask = function() { return /** @type{?proto.google.protobuf.FieldMask} */ ( jspb.Message.getWrapperField(this, google_protobuf_field_mask_pb.FieldMask, 2)); }; @@ -545,18 +545,18 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.getExpandMask = /** * @param {?proto.google.protobuf.FieldMask|undefined} value - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.setExpandMask = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setExpandMask = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.clearExpandMask = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.clearExpandMask = function() { return this.setExpandMask(undefined); }; @@ -565,7 +565,7 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.clearExpandMask * Returns whether this field is set. * @return {boolean} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.hasExpandMask = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.hasExpandMask = function() { return jspb.Message.getField(this, 2) != null; }; @@ -574,16 +574,16 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.hasExpandMask = * optional string snaptoken = 3; * @return {string} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.getSnaptoken = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getSnaptoken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.setSnaptoken = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setSnaptoken = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; @@ -592,16 +592,16 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.setSnaptoken = f * optional int32 page_size = 4; * @return {number} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.getPageSize = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getPageSize = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.setPageSize = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setPageSize = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; @@ -610,16 +610,16 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.setPageSize = fu * optional string page_token = 5; * @return {string} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.getPageToken = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getPageToken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.setPageToken = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setPageToken = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; @@ -630,7 +630,7 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesRequest.prototype.setPageToken = f * @private {!Array} * @const */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.repeatedFields_ = [1]; +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.repeatedFields_ = [1]; @@ -647,8 +647,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.toObject(opt_includeInstance, this); }; @@ -657,14 +657,14 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.prototype.toObject = func * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.toObject = function(includeInstance, msg) { var f, obj = { relationTuplesList: jspb.Message.toObjectList(msg.getRelationTuplesList(), - ory_keto_acl_v1alpha1_acl_pb.RelationTuple.toObject, includeInstance), + ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject, includeInstance), nextPageToken: jspb.Message.getFieldWithDefault(msg, 2, "") }; @@ -679,23 +679,23 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.toObject = function(inclu /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse; - return proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse; + return proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -703,8 +703,8 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.deserializeBinaryFromRead var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new ory_keto_acl_v1alpha1_acl_pb.RelationTuple; - reader.readMessage(value,ory_keto_acl_v1alpha1_acl_pb.RelationTuple.deserializeBinaryFromReader); + var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple; + reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.deserializeBinaryFromReader); msg.addRelationTuples(value); break; case 2: @@ -724,9 +724,9 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.deserializeBinaryFromRead * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -734,18 +734,18 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.prototype.serializeBinary /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getRelationTuplesList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - ory_keto_acl_v1alpha1_acl_pb.RelationTuple.serializeBinaryToWriter + ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.serializeBinaryToWriter ); } f = message.getNextPageToken(); @@ -760,38 +760,38 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.serializeBinaryToWriter = /** * repeated RelationTuple relation_tuples = 1; - * @return {!Array} + * @return {!Array} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.prototype.getRelationTuplesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, ory_keto_acl_v1alpha1_acl_pb.RelationTuple, 1)); +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.getRelationTuplesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple, 1)); }; /** - * @param {!Array} value - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse} returns this + * @param {!Array} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse} returns this */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.prototype.setRelationTuplesList = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.setRelationTuplesList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.ory.keto.acl.v1alpha1.RelationTuple=} opt_value + * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple=} opt_value * @param {number=} opt_index - * @return {!proto.ory.keto.acl.v1alpha1.RelationTuple} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.prototype.addRelationTuples = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ory.keto.acl.v1alpha1.RelationTuple, opt_index); +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.addRelationTuples = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ory.keto.relation_tuples.v1alpha2.RelationTuple, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse} returns this */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.prototype.clearRelationTuplesList = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.clearRelationTuplesList = function() { return this.setRelationTuplesList([]); }; @@ -800,18 +800,18 @@ proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.prototype.clearRelationTu * optional string next_page_token = 2; * @return {string} */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.prototype.getNextPageToken = function() { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.getNextPageToken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse} returns this */ -proto.ory.keto.acl.v1alpha1.ListRelationTuplesResponse.prototype.setNextPageToken = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.setNextPageToken = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; -goog.object.extend(exports, proto.ory.keto.acl.v1alpha1); +goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go new file mode 100644 index 000000000..48cc97939 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go @@ -0,0 +1,398 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.13.0 +// source: ory/keto/relation_tuples/v1alpha2/relation_tuples.proto + +package rts + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// RelationTuple defines a relation between an Object and a Subject. +type RelationTuple struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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"` +} + +func (x *RelationTuple) Reset() { + *x = RelationTuple{} + if protoimpl.UnsafeEnabled { + 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 protoimpl.UnsafeEnabled && 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 +} + +// Subject is either a concrete subject id or +// a `SubjectSet` expanding to more Subjects. +type Subject struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The reference of this abstract subject. + // + // Types that are assignable to Ref: + // *Subject_Id + // *Subject_Set + Ref isSubject_Ref `protobuf_oneof:"ref"` +} + +func (x *Subject) Reset() { + *x = Subject{} + if protoimpl.UnsafeEnabled { + mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[1] + 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[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Subject.ProtoReflect.Descriptor instead. +func (*Subject) Descriptor() ([]byte, []int) { + return file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescGZIP(), []int{1} +} + +func (m *Subject) GetRef() isSubject_Ref { + if m != nil { + return m.Ref + } + return nil +} + +func (x *Subject) GetId() string { + if x, ok := x.GetRef().(*Subject_Id); ok { + return x.Id + } + return "" +} + +func (x *Subject) GetSet() *SubjectSet { + if x, ok := x.GetRef().(*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/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 + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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"` +} + +func (x *SubjectSet) Reset() { + *x = SubjectSet{} + if protoimpl.UnsafeEnabled { + mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[2] + 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[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubjectSet.ProtoReflect.Descriptor instead. +func (*SubjectSet) Descriptor() ([]byte, []int) { + return file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescGZIP(), []int{2} +} + +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 + +var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDesc = []byte{ + 0x0a, 0x37, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x6f, 0x72, 0x79, 0x2e, 0x6b, + 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x22, 0xa7, 0x01, 0x0a, + 0x0d, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x65, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x41, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x48, + 0x00, 0x52, 0x03, 0x73, 0x65, 0x74, 0x42, 0x05, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x22, 0x5e, 0x0a, + 0x0a, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xc4, 0x01, + 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x13, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, + 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, + 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, + 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescOnce sync.Once + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescData = file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDesc +) + +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(file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescData) + }) + 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, 3) +var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_goTypes = []interface{}{ + (*RelationTuple)(nil), // 0: ory.keto.relation_tuples.v1alpha2.RelationTuple + (*Subject)(nil), // 1: ory.keto.relation_tuples.v1alpha2.Subject + (*SubjectSet)(nil), // 2: ory.keto.relation_tuples.v1alpha2.SubjectSet +} +var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_depIdxs = []int32{ + 1, // 0: ory.keto.relation_tuples.v1alpha2.RelationTuple.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject + 2, // 1: ory.keto.relation_tuples.v1alpha2.Subject.set:type_name -> ory.keto.relation_tuples.v1alpha2.SubjectSet + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_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 + } + if !protoimpl.UnsafeEnabled { + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RelationTuple); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Subject); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubjectSet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*Subject_Id)(nil), + (*Subject_Set)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + 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_rawDesc = nil + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_goTypes = nil + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_depIdxs = nil +} diff --git a/proto/ory/keto/acl/v1alpha1/acl.proto b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.proto similarity index 78% rename from proto/ory/keto/acl/v1alpha1/acl.proto rename to proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.proto index 8f169125e..cd4524835 100644 --- a/proto/ory/keto/acl/v1alpha1/acl.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.proto @@ -1,14 +1,13 @@ syntax = "proto3"; -package ory.keto.acl.v1alpha1; +package ory.keto.relation_tuples.v1alpha2; -option go_package = "github.com/ory/keto/proto/ory/keto/acl/v1alpha1;acl"; -option csharp_namespace = "Ory.Keto.Acl.V1Alpha1"; +option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; +option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; option java_multiple_files = true; -option java_outer_classname = "AclProto"; -option java_package = "sh.ory.keto.acl.v1alpha1"; -option php_namespace = "Ory\\Keto\\Acl\\V1alpha1"; - +option java_outer_classname = "RelationTuplesProto"; +option java_package = "sh.ory.keto.relation_tuples.v1alpha2"; +option php_namespace = "Ory\\Keto\\RelationTuples\\v1alpha2"; // RelationTuple defines a relation between an Object and a Subject. message RelationTuple { diff --git a/proto/ory/keto/acl/v1alpha1/acl_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_grpc_pb.js similarity index 100% rename from proto/ory/keto/acl/v1alpha1/acl_grpc_pb.js rename to proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_grpc_pb.js diff --git a/proto/ory/keto/acl/v1alpha1/acl_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.d.ts similarity index 96% rename from proto/ory/keto/acl/v1alpha1/acl_pb.d.ts rename to proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.d.ts index 039d6d894..7b24ac811 100644 --- a/proto/ory/keto/acl/v1alpha1/acl_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.d.ts @@ -1,5 +1,5 @@ -// package: ory.keto.acl.v1alpha1 -// file: ory/keto/acl/v1alpha1/acl.proto +// package: ory.keto.relation_tuples.v1alpha2 +// file: ory/keto/relation_tuples/v1alpha2/relation_tuples.proto /* tslint:disable */ /* eslint-disable */ diff --git a/proto/ory/keto/acl/v1alpha1/acl_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js similarity index 56% rename from proto/ory/keto/acl/v1alpha1/acl_pb.js rename to proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js index 3bb29e09d..cc75c8cab 100644 --- a/proto/ory/keto/acl/v1alpha1/acl_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js @@ -1,4 +1,4 @@ -// source: ory/keto/acl/v1alpha1/acl.proto +// source: ory/keto/relation_tuples/v1alpha2/relation_tuples.proto /** * @fileoverview * @enhanceable @@ -21,10 +21,10 @@ var global = (function() { return Function('return this')(); }.call(null)); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.RelationTuple', null, global); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.Subject', null, global); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.Subject.RefCase', null, global); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.SubjectSet', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationTuple', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.Subject', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.Subject.RefCase', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.SubjectSet', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -35,16 +35,16 @@ goog.exportSymbol('proto.ory.keto.acl.v1alpha1.SubjectSet', null, global); * @extends {jspb.Message} * @constructor */ -proto.ory.keto.acl.v1alpha1.RelationTuple = function(opt_data) { +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.ory.keto.acl.v1alpha1.RelationTuple, jspb.Message); +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.RelationTuple, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ory.keto.acl.v1alpha1.RelationTuple.displayName = 'proto.ory.keto.acl.v1alpha1.RelationTuple'; + proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.RelationTuple'; } /** * Generated by JsPbCodeGenerator. @@ -56,16 +56,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.ory.keto.acl.v1alpha1.Subject = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ory.keto.acl.v1alpha1.Subject.oneofGroups_); +proto.ory.keto.relation_tuples.v1alpha2.Subject = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ory.keto.relation_tuples.v1alpha2.Subject.oneofGroups_); }; -goog.inherits(proto.ory.keto.acl.v1alpha1.Subject, jspb.Message); +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.Subject, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ory.keto.acl.v1alpha1.Subject.displayName = 'proto.ory.keto.acl.v1alpha1.Subject'; + proto.ory.keto.relation_tuples.v1alpha2.Subject.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.Subject'; } /** * Generated by JsPbCodeGenerator. @@ -77,16 +77,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.ory.keto.acl.v1alpha1.SubjectSet = function(opt_data) { +proto.ory.keto.relation_tuples.v1alpha2.SubjectSet = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.ory.keto.acl.v1alpha1.SubjectSet, jspb.Message); +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.SubjectSet, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ory.keto.acl.v1alpha1.SubjectSet.displayName = 'proto.ory.keto.acl.v1alpha1.SubjectSet'; + proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.SubjectSet'; } @@ -104,8 +104,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.RelationTuple.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.toObject(opt_includeInstance, this); }; @@ -114,16 +114,16 @@ proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.toObject = function(opt_incl * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.RelationTuple} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.RelationTuple.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.toObject = function(includeInstance, msg) { var f, obj = { namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), object: jspb.Message.getFieldWithDefault(msg, 2, ""), relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subject: (f = msg.getSubject()) && proto.ory.keto.acl.v1alpha1.Subject.toObject(includeInstance, f) + subject: (f = msg.getSubject()) && proto.ory.keto.relation_tuples.v1alpha2.Subject.toObject(includeInstance, f) }; if (includeInstance) { @@ -137,23 +137,23 @@ proto.ory.keto.acl.v1alpha1.RelationTuple.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.RelationTuple} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} */ -proto.ory.keto.acl.v1alpha1.RelationTuple.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.RelationTuple; - return proto.ory.keto.acl.v1alpha1.RelationTuple.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.RelationTuple; + return proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.RelationTuple} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.RelationTuple} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} */ -proto.ory.keto.acl.v1alpha1.RelationTuple.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -173,8 +173,8 @@ proto.ory.keto.acl.v1alpha1.RelationTuple.deserializeBinaryFromReader = function msg.setRelation(value); break; case 4: - var value = new proto.ory.keto.acl.v1alpha1.Subject; - reader.readMessage(value,proto.ory.keto.acl.v1alpha1.Subject.deserializeBinaryFromReader); + var value = new proto.ory.keto.relation_tuples.v1alpha2.Subject; + reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.Subject.deserializeBinaryFromReader); msg.setSubject(value); break; default: @@ -190,9 +190,9 @@ proto.ory.keto.acl.v1alpha1.RelationTuple.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.RelationTuple.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -200,11 +200,11 @@ proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.RelationTuple} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.RelationTuple.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getNamespace(); if (f.length > 0) { @@ -232,7 +232,7 @@ proto.ory.keto.acl.v1alpha1.RelationTuple.serializeBinaryToWriter = function(mes writer.writeMessage( 4, f, - proto.ory.keto.acl.v1alpha1.Subject.serializeBinaryToWriter + proto.ory.keto.relation_tuples.v1alpha2.Subject.serializeBinaryToWriter ); } }; @@ -242,16 +242,16 @@ proto.ory.keto.acl.v1alpha1.RelationTuple.serializeBinaryToWriter = function(mes * optional string namespace = 1; * @return {string} */ -proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.getNamespace = function() { +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.getNamespace = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.RelationTuple} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} returns this */ -proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.setNamespace = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.setNamespace = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -260,16 +260,16 @@ proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.setNamespace = function(valu * optional string object = 2; * @return {string} */ -proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.getObject = function() { +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.getObject = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.RelationTuple} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} returns this */ -proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.setObject = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.setObject = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -278,44 +278,44 @@ proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.setObject = function(value) * optional string relation = 3; * @return {string} */ -proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.getRelation = function() { +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.getRelation = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.RelationTuple} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} returns this */ -proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.setRelation = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.setRelation = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional Subject subject = 4; - * @return {?proto.ory.keto.acl.v1alpha1.Subject} + * @return {?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ -proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.getSubject = function() { - return /** @type{?proto.ory.keto.acl.v1alpha1.Subject} */ ( - jspb.Message.getWrapperField(this, proto.ory.keto.acl.v1alpha1.Subject, 4)); +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.getSubject = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ ( + jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.Subject, 4)); }; /** - * @param {?proto.ory.keto.acl.v1alpha1.Subject|undefined} value - * @return {!proto.ory.keto.acl.v1alpha1.RelationTuple} returns this + * @param {?proto.ory.keto.relation_tuples.v1alpha2.Subject|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} returns this */ -proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.setSubject = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.setSubject = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.ory.keto.acl.v1alpha1.RelationTuple} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} returns this */ -proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.clearSubject = function() { +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.clearSubject = function() { return this.setSubject(undefined); }; @@ -324,7 +324,7 @@ proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.clearSubject = function() { * Returns whether this field is set. * @return {boolean} */ -proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.hasSubject = function() { +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.hasSubject = function() { return jspb.Message.getField(this, 4) != null; }; @@ -338,22 +338,22 @@ proto.ory.keto.acl.v1alpha1.RelationTuple.prototype.hasSubject = function() { * @private {!Array>} * @const */ -proto.ory.keto.acl.v1alpha1.Subject.oneofGroups_ = [[1,2]]; +proto.ory.keto.relation_tuples.v1alpha2.Subject.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.ory.keto.acl.v1alpha1.Subject.RefCase = { +proto.ory.keto.relation_tuples.v1alpha2.Subject.RefCase = { REF_NOT_SET: 0, ID: 1, SET: 2 }; /** - * @return {proto.ory.keto.acl.v1alpha1.Subject.RefCase} + * @return {proto.ory.keto.relation_tuples.v1alpha2.Subject.RefCase} */ -proto.ory.keto.acl.v1alpha1.Subject.prototype.getRefCase = function() { - return /** @type {proto.ory.keto.acl.v1alpha1.Subject.RefCase} */(jspb.Message.computeOneofCase(this, proto.ory.keto.acl.v1alpha1.Subject.oneofGroups_[0])); +proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.getRefCase = function() { + return /** @type {proto.ory.keto.relation_tuples.v1alpha2.Subject.RefCase} */(jspb.Message.computeOneofCase(this, proto.ory.keto.relation_tuples.v1alpha2.Subject.oneofGroups_[0])); }; @@ -371,8 +371,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.acl.v1alpha1.Subject.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.Subject.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.Subject.toObject(opt_includeInstance, this); }; @@ -381,14 +381,14 @@ proto.ory.keto.acl.v1alpha1.Subject.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.Subject} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.Subject} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.Subject.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.Subject.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), - set: (f = msg.getSet()) && proto.ory.keto.acl.v1alpha1.SubjectSet.toObject(includeInstance, f) + set: (f = msg.getSet()) && proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.toObject(includeInstance, f) }; if (includeInstance) { @@ -402,23 +402,23 @@ proto.ory.keto.acl.v1alpha1.Subject.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.Subject} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.Subject} */ -proto.ory.keto.acl.v1alpha1.Subject.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.Subject.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.Subject; - return proto.ory.keto.acl.v1alpha1.Subject.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.Subject; + return proto.ory.keto.relation_tuples.v1alpha2.Subject.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.Subject} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.Subject} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.Subject} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.Subject} */ -proto.ory.keto.acl.v1alpha1.Subject.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.Subject.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -430,8 +430,8 @@ proto.ory.keto.acl.v1alpha1.Subject.deserializeBinaryFromReader = function(msg, msg.setId(value); break; case 2: - var value = new proto.ory.keto.acl.v1alpha1.SubjectSet; - reader.readMessage(value,proto.ory.keto.acl.v1alpha1.SubjectSet.deserializeBinaryFromReader); + var value = new proto.ory.keto.relation_tuples.v1alpha2.SubjectSet; + reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.deserializeBinaryFromReader); msg.setSet(value); break; default: @@ -447,9 +447,9 @@ proto.ory.keto.acl.v1alpha1.Subject.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.acl.v1alpha1.Subject.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.Subject.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.Subject.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -457,11 +457,11 @@ proto.ory.keto.acl.v1alpha1.Subject.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.Subject} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.Subject} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.Subject.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.Subject.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = /** @type {string} */ (jspb.Message.getField(message, 1)); if (f != null) { @@ -475,7 +475,7 @@ proto.ory.keto.acl.v1alpha1.Subject.serializeBinaryToWriter = function(message, writer.writeMessage( 2, f, - proto.ory.keto.acl.v1alpha1.SubjectSet.serializeBinaryToWriter + proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.serializeBinaryToWriter ); } }; @@ -485,26 +485,26 @@ proto.ory.keto.acl.v1alpha1.Subject.serializeBinaryToWriter = function(message, * optional string id = 1; * @return {string} */ -proto.ory.keto.acl.v1alpha1.Subject.prototype.getId = function() { +proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.Subject} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.Subject} returns this */ -proto.ory.keto.acl.v1alpha1.Subject.prototype.setId = function(value) { - return jspb.Message.setOneofField(this, 1, proto.ory.keto.acl.v1alpha1.Subject.oneofGroups_[0], value); +proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.setId = function(value) { + return jspb.Message.setOneofField(this, 1, proto.ory.keto.relation_tuples.v1alpha2.Subject.oneofGroups_[0], value); }; /** * Clears the field making it undefined. - * @return {!proto.ory.keto.acl.v1alpha1.Subject} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.Subject} returns this */ -proto.ory.keto.acl.v1alpha1.Subject.prototype.clearId = function() { - return jspb.Message.setOneofField(this, 1, proto.ory.keto.acl.v1alpha1.Subject.oneofGroups_[0], undefined); +proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.clearId = function() { + return jspb.Message.setOneofField(this, 1, proto.ory.keto.relation_tuples.v1alpha2.Subject.oneofGroups_[0], undefined); }; @@ -512,35 +512,35 @@ proto.ory.keto.acl.v1alpha1.Subject.prototype.clearId = function() { * Returns whether this field is set. * @return {boolean} */ -proto.ory.keto.acl.v1alpha1.Subject.prototype.hasId = function() { +proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.hasId = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional SubjectSet set = 2; - * @return {?proto.ory.keto.acl.v1alpha1.SubjectSet} + * @return {?proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} */ -proto.ory.keto.acl.v1alpha1.Subject.prototype.getSet = function() { - return /** @type{?proto.ory.keto.acl.v1alpha1.SubjectSet} */ ( - jspb.Message.getWrapperField(this, proto.ory.keto.acl.v1alpha1.SubjectSet, 2)); +proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.getSet = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} */ ( + jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.SubjectSet, 2)); }; /** - * @param {?proto.ory.keto.acl.v1alpha1.SubjectSet|undefined} value - * @return {!proto.ory.keto.acl.v1alpha1.Subject} returns this + * @param {?proto.ory.keto.relation_tuples.v1alpha2.SubjectSet|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.Subject} returns this */ -proto.ory.keto.acl.v1alpha1.Subject.prototype.setSet = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.ory.keto.acl.v1alpha1.Subject.oneofGroups_[0], value); +proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.setSet = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.ory.keto.relation_tuples.v1alpha2.Subject.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.ory.keto.acl.v1alpha1.Subject} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.Subject} returns this */ -proto.ory.keto.acl.v1alpha1.Subject.prototype.clearSet = function() { +proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.clearSet = function() { return this.setSet(undefined); }; @@ -549,7 +549,7 @@ proto.ory.keto.acl.v1alpha1.Subject.prototype.clearSet = function() { * Returns whether this field is set. * @return {boolean} */ -proto.ory.keto.acl.v1alpha1.Subject.prototype.hasSet = function() { +proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.hasSet = function() { return jspb.Message.getField(this, 2) != null; }; @@ -570,8 +570,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.acl.v1alpha1.SubjectSet.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.SubjectSet.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.toObject(opt_includeInstance, this); }; @@ -580,11 +580,11 @@ proto.ory.keto.acl.v1alpha1.SubjectSet.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.SubjectSet} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.SubjectSet.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.toObject = function(includeInstance, msg) { var f, obj = { namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), object: jspb.Message.getFieldWithDefault(msg, 2, ""), @@ -602,23 +602,23 @@ proto.ory.keto.acl.v1alpha1.SubjectSet.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.SubjectSet} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} */ -proto.ory.keto.acl.v1alpha1.SubjectSet.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.SubjectSet; - return proto.ory.keto.acl.v1alpha1.SubjectSet.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.SubjectSet; + return proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.SubjectSet} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.SubjectSet} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} */ -proto.ory.keto.acl.v1alpha1.SubjectSet.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -650,9 +650,9 @@ proto.ory.keto.acl.v1alpha1.SubjectSet.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.acl.v1alpha1.SubjectSet.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.SubjectSet.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -660,11 +660,11 @@ proto.ory.keto.acl.v1alpha1.SubjectSet.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.SubjectSet} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.SubjectSet.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getNamespace(); if (f.length > 0) { @@ -694,16 +694,16 @@ proto.ory.keto.acl.v1alpha1.SubjectSet.serializeBinaryToWriter = function(messag * optional string namespace = 1; * @return {string} */ -proto.ory.keto.acl.v1alpha1.SubjectSet.prototype.getNamespace = function() { +proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.getNamespace = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.SubjectSet} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} returns this */ -proto.ory.keto.acl.v1alpha1.SubjectSet.prototype.setNamespace = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.setNamespace = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -712,16 +712,16 @@ proto.ory.keto.acl.v1alpha1.SubjectSet.prototype.setNamespace = function(value) * optional string object = 2; * @return {string} */ -proto.ory.keto.acl.v1alpha1.SubjectSet.prototype.getObject = function() { +proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.getObject = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.SubjectSet} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} returns this */ -proto.ory.keto.acl.v1alpha1.SubjectSet.prototype.setObject = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.setObject = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -730,18 +730,18 @@ proto.ory.keto.acl.v1alpha1.SubjectSet.prototype.setObject = function(value) { * optional string relation = 3; * @return {string} */ -proto.ory.keto.acl.v1alpha1.SubjectSet.prototype.getRelation = function() { +proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.getRelation = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.SubjectSet} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} returns this */ -proto.ory.keto.acl.v1alpha1.SubjectSet.prototype.setRelation = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.setRelation = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; -goog.object.extend(exports, proto.ory.keto.acl.v1alpha1); +goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/proto/ory/keto/acl/v1alpha1/utils.go b/proto/ory/keto/relation_tuples/v1alpha2/utils.go similarity index 79% rename from proto/ory/keto/acl/v1alpha1/utils.go rename to proto/ory/keto/relation_tuples/v1alpha2/utils.go index 5fbf94ee4..75cf85ecd 100644 --- a/proto/ory/keto/acl/v1alpha1/utils.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/utils.go @@ -1,12 +1,12 @@ -package acl +package rts // 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(), &acl.TransactRelationTuplesRequest{ -// RelationTupleDeltas: append(acl.RelationTupleToDeltas(insertTuples, acl.RelationTupleDelta_INSERT), acl.RelationTupleToDeltas(deleteTuples, acl.RelationTupleDelta_DELETE)...), +// c.TransactRelationTuples(context.Background(), &rts.TransactRelationTuplesRequest{ +// RelationTupleDeltas: append(rts.RelationTupleToDeltas(insertTuples, rts.RelationTupleDelta_INSERT), rts.RelationTupleToDeltas(deleteTuples, rts.RelationTupleDelta_DELETE)...), // }) func RelationTupleToDeltas(rs []*RelationTuple, action RelationTupleDelta_Action) []*RelationTupleDelta { deltas := make([]*RelationTupleDelta, len(rs)) diff --git a/proto/ory/keto/acl/v1alpha1/utils_test.go b/proto/ory/keto/relation_tuples/v1alpha2/utils_test.go similarity index 85% rename from proto/ory/keto/acl/v1alpha1/utils_test.go rename to proto/ory/keto/relation_tuples/v1alpha2/utils_test.go index 14e122c55..a17827707 100644 --- a/proto/ory/keto/acl/v1alpha1/utils_test.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/utils_test.go @@ -1,4 +1,4 @@ -package acl +package rts import ( "testing" @@ -16,7 +16,7 @@ func TestRelationTupleToDeltas(t *testing.T) { { desc: "empty list", rts: nil, - action: RelationTupleDelta_INSERT, + action: RelationTupleDelta_ACTION_INSERT, expected: []*RelationTupleDelta{}, }, { @@ -34,7 +34,7 @@ func TestRelationTupleToDeltas(t *testing.T) { Subject: NewSubjectSet("sn", "so", "sr"), }, }, - action: RelationTupleDelta_DELETE, + action: RelationTupleDelta_ACTION_DELETE, expected: []*RelationTupleDelta{ { RelationTuple: &RelationTuple{ @@ -43,7 +43,7 @@ func TestRelationTupleToDeltas(t *testing.T) { Relation: "r", Subject: NewSubjectID("s"), }, - Action: RelationTupleDelta_DELETE, + Action: RelationTupleDelta_ACTION_DELETE, }, { RelationTuple: &RelationTuple{ @@ -52,7 +52,7 @@ func TestRelationTupleToDeltas(t *testing.T) { Relation: "r", Subject: NewSubjectSet("sn", "so", "sr"), }, - Action: RelationTupleDelta_DELETE, + Action: RelationTupleDelta_ACTION_DELETE, }, }, }, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go new file mode 100644 index 000000000..75009bdd6 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go @@ -0,0 +1,224 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.13.0 +// source: ory/keto/relation_tuples/v1alpha2/version.proto + +package rts + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Request for the VersionService.GetVersion RPC. +type GetVersionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetVersionRequest) Reset() { + *x = GetVersionRequest{} + if protoimpl.UnsafeEnabled { + 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 protoimpl.UnsafeEnabled && 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 + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The version string of the Ory Keto instance. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *GetVersionResponse) Reset() { + *x = GetVersionResponse{} + if protoimpl.UnsafeEnabled { + 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 protoimpl.UnsafeEnabled && 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 + +var file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDesc = []byte{ + 0x0a, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x21, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x22, 0x13, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2e, 0x0a, 0x12, 0x47, 0x65, 0x74, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x8b, 0x01, 0x0a, 0x0e, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x79, 0x0a, 0x0a, + 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x47, + 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x35, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc4, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, + 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x42, 0x13, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, + 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, + 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDescOnce sync.Once + file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDescData = file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDesc +) + +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(file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDescData) + }) + 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 = []interface{}{ + (*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 + } + if !protoimpl.UnsafeEnabled { + file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVersionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVersionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_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_rawDesc = nil + file_ory_keto_relation_tuples_v1alpha2_version_proto_goTypes = nil + file_ory_keto_relation_tuples_v1alpha2_version_proto_depIdxs = nil +} diff --git a/proto/ory/keto/acl/v1alpha1/version.proto b/proto/ory/keto/relation_tuples/v1alpha2/version.proto similarity index 68% rename from proto/ory/keto/acl/v1alpha1/version.proto rename to proto/ory/keto/relation_tuples/v1alpha2/version.proto index 456df2161..5afa45d9b 100644 --- a/proto/ory/keto/acl/v1alpha1/version.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/version.proto @@ -1,13 +1,13 @@ syntax = "proto3"; -package ory.keto.acl.v1alpha1; +package ory.keto.relation_tuples.v1alpha2; -option go_package = "github.com/ory/keto/proto/ory/keto/acl/v1alpha1;acl"; -option csharp_namespace = "Ory.Keto.Acl.V1Alpha1"; +option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; +option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; option java_multiple_files = true; option java_outer_classname = "VersionServiceProto"; -option java_package = "sh.ory.keto.acl.v1alpha1"; -option php_namespace = "Ory\\Keto\\Acl\\V1alpha1"; +option java_package = "sh.ory.keto.relation_tuples.v1alpha2"; +option php_namespace = "Ory\\Keto\\RelationTuples\\v1alpha2"; // The service returning the specific Ory Keto instance version. // diff --git a/proto/ory/keto/acl/v1alpha1/version_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go similarity index 91% rename from proto/ory/keto/acl/v1alpha1/version_grpc.pb.go rename to proto/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go index abb39c39a..0cbb26735 100644 --- a/proto/ory/keto/acl/v1alpha1/version_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -package acl +package rts import ( context "context" @@ -32,7 +32,7 @@ func NewVersionServiceClient(cc grpc.ClientConnInterface) VersionServiceClient { func (c *versionServiceClient) GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error) { out := new(GetVersionResponse) - err := c.cc.Invoke(ctx, "/ory.keto.acl.v1alpha1.VersionService/GetVersion", in, out, opts...) + err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion", in, out, opts...) if err != nil { return nil, err } @@ -76,7 +76,7 @@ func _VersionService_GetVersion_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ory.keto.acl.v1alpha1.VersionService/GetVersion", + FullMethod: "/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VersionServiceServer).GetVersion(ctx, req.(*GetVersionRequest)) @@ -88,7 +88,7 @@ func _VersionService_GetVersion_Handler(srv interface{}, ctx context.Context, de // 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.acl.v1alpha1.VersionService", + ServiceName: "ory.keto.relation_tuples.v1alpha2.VersionService", HandlerType: (*VersionServiceServer)(nil), Methods: []grpc.MethodDesc{ { @@ -97,5 +97,5 @@ var VersionService_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "ory/keto/acl/v1alpha1/version.proto", + Metadata: "ory/keto/relation_tuples/v1alpha2/version.proto", } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.d.ts new file mode 100644 index 000000000..e99b28cc7 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.d.ts @@ -0,0 +1,41 @@ +// package: ory.keto.relation_tuples.v1alpha2 +// file: ory/keto/relation_tuples/v1alpha2/version.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "grpc"; +import * as ory_keto_relation_tuples_v1alpha2_version_pb from "../../../../ory/keto/relation_tuples/v1alpha2/version_pb"; + +interface IVersionServiceService extends grpc.ServiceDefinition { + getVersion: IVersionServiceService_IGetVersion; +} + +interface IVersionServiceService_IGetVersion extends grpc.MethodDefinition { + path: "/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const VersionServiceService: IVersionServiceService; + +export interface IVersionServiceServer { + getVersion: grpc.handleUnaryCall; +} + +export interface IVersionServiceClient { + getVersion(request: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; + getVersion(request: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; + getVersion(request: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; +} + +export class VersionServiceClient extends grpc.Client implements IVersionServiceClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public getVersion(request: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; + public getVersion(request: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; + public getVersion(request: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse) => void): grpc.ClientUnaryCall; +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.js new file mode 100644 index 000000000..8099d1e7e --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.js @@ -0,0 +1,48 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('@grpc/grpc-js'); +var ory_keto_relation_tuples_v1alpha2_version_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/version_pb.js'); + +function serialize_ory_keto_relation_tuples_v1alpha2_GetVersionRequest(arg) { + if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest)) { + throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.GetVersionRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_ory_keto_relation_tuples_v1alpha2_GetVersionRequest(buffer_arg) { + return ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_ory_keto_relation_tuples_v1alpha2_GetVersionResponse(arg) { + if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse)) { + throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.GetVersionResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_ory_keto_relation_tuples_v1alpha2_GetVersionResponse(buffer_arg) { + return ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// The service returning the specific Ory Keto instance version. +// +// This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis) and [write-APIs](../concepts/api-overview.mdx#write-apis). +var VersionServiceService = exports.VersionServiceService = { + // Returns the version of the Ory Keto instance. +getVersion: { + path: '/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion', + requestStream: false, + responseStream: false, + requestType: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest, + responseType: ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionResponse, + requestSerialize: serialize_ory_keto_relation_tuples_v1alpha2_GetVersionRequest, + requestDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_GetVersionRequest, + responseSerialize: serialize_ory_keto_relation_tuples_v1alpha2_GetVersionResponse, + responseDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_GetVersionResponse, + }, +}; + +exports.VersionServiceClient = grpc.makeGenericClientConstructor(VersionServiceService); diff --git a/proto/ory/keto/acl/v1alpha1/version_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/version_pb.d.ts similarity index 94% rename from proto/ory/keto/acl/v1alpha1/version_pb.d.ts rename to proto/ory/keto/relation_tuples/v1alpha2/version_pb.d.ts index 6f1cbd671..bf91795fe 100644 --- a/proto/ory/keto/acl/v1alpha1/version_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/version_pb.d.ts @@ -1,5 +1,5 @@ -// package: ory.keto.acl.v1alpha1 -// file: ory/keto/acl/v1alpha1/version.proto +// package: ory.keto.relation_tuples.v1alpha2 +// file: ory/keto/relation_tuples/v1alpha2/version.proto /* tslint:disable */ /* eslint-disable */ diff --git a/proto/ory/keto/acl/v1alpha1/version_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js similarity index 60% rename from proto/ory/keto/acl/v1alpha1/version_pb.js rename to proto/ory/keto/relation_tuples/v1alpha2/version_pb.js index 23e0edf44..92c1b0f59 100644 --- a/proto/ory/keto/acl/v1alpha1/version_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js @@ -1,4 +1,4 @@ -// source: ory/keto/acl/v1alpha1/version.proto +// source: ory/keto/relation_tuples/v1alpha2/version.proto /** * @fileoverview * @enhanceable @@ -21,8 +21,8 @@ var global = (function() { return Function('return this')(); }.call(null)); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.GetVersionRequest', null, global); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.GetVersionResponse', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -33,16 +33,16 @@ goog.exportSymbol('proto.ory.keto.acl.v1alpha1.GetVersionResponse', null, global * @extends {jspb.Message} * @constructor */ -proto.ory.keto.acl.v1alpha1.GetVersionRequest = function(opt_data) { +proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.ory.keto.acl.v1alpha1.GetVersionRequest, jspb.Message); +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ory.keto.acl.v1alpha1.GetVersionRequest.displayName = 'proto.ory.keto.acl.v1alpha1.GetVersionRequest'; + proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest'; } /** * Generated by JsPbCodeGenerator. @@ -54,16 +54,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.ory.keto.acl.v1alpha1.GetVersionResponse = function(opt_data) { +proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.ory.keto.acl.v1alpha1.GetVersionResponse, jspb.Message); +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ory.keto.acl.v1alpha1.GetVersionResponse.displayName = 'proto.ory.keto.acl.v1alpha1.GetVersionResponse'; + proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse'; } @@ -81,8 +81,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.acl.v1alpha1.GetVersionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.GetVersionRequest.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.toObject(opt_includeInstance, this); }; @@ -91,11 +91,11 @@ proto.ory.keto.acl.v1alpha1.GetVersionRequest.prototype.toObject = function(opt_ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.GetVersionRequest} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.GetVersionRequest.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -111,23 +111,23 @@ proto.ory.keto.acl.v1alpha1.GetVersionRequest.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.GetVersionRequest} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest} */ -proto.ory.keto.acl.v1alpha1.GetVersionRequest.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.GetVersionRequest; - return proto.ory.keto.acl.v1alpha1.GetVersionRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest; + return proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.GetVersionRequest} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.GetVersionRequest} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest} */ -proto.ory.keto.acl.v1alpha1.GetVersionRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -147,9 +147,9 @@ proto.ory.keto.acl.v1alpha1.GetVersionRequest.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.acl.v1alpha1.GetVersionRequest.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.GetVersionRequest.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -157,11 +157,11 @@ proto.ory.keto.acl.v1alpha1.GetVersionRequest.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.GetVersionRequest} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.GetVersionRequest.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; @@ -182,8 +182,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.acl.v1alpha1.GetVersionResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.GetVersionResponse.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.toObject(opt_includeInstance, this); }; @@ -192,11 +192,11 @@ proto.ory.keto.acl.v1alpha1.GetVersionResponse.prototype.toObject = function(opt * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.GetVersionResponse} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.GetVersionResponse.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.toObject = function(includeInstance, msg) { var f, obj = { version: jspb.Message.getFieldWithDefault(msg, 1, "") }; @@ -212,23 +212,23 @@ proto.ory.keto.acl.v1alpha1.GetVersionResponse.toObject = function(includeInstan /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.GetVersionResponse} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse} */ -proto.ory.keto.acl.v1alpha1.GetVersionResponse.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.GetVersionResponse; - return proto.ory.keto.acl.v1alpha1.GetVersionResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse; + return proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.GetVersionResponse} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.GetVersionResponse} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse} */ -proto.ory.keto.acl.v1alpha1.GetVersionResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -252,9 +252,9 @@ proto.ory.keto.acl.v1alpha1.GetVersionResponse.deserializeBinaryFromReader = fun * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.acl.v1alpha1.GetVersionResponse.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.GetVersionResponse.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -262,11 +262,11 @@ proto.ory.keto.acl.v1alpha1.GetVersionResponse.prototype.serializeBinary = funct /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.GetVersionResponse} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.GetVersionResponse.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getVersion(); if (f.length > 0) { @@ -282,18 +282,18 @@ proto.ory.keto.acl.v1alpha1.GetVersionResponse.serializeBinaryToWriter = functio * optional string version = 1; * @return {string} */ -proto.ory.keto.acl.v1alpha1.GetVersionResponse.prototype.getVersion = function() { +proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.prototype.getVersion = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.GetVersionResponse} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse} returns this */ -proto.ory.keto.acl.v1alpha1.GetVersionResponse.prototype.setVersion = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.prototype.setVersion = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; -goog.object.extend(exports, proto.ory.keto.acl.v1alpha1); +goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go new file mode 100644 index 000000000..339096bcf --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go @@ -0,0 +1,644 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.13.0 +// source: ory/keto/relation_tuples/v1alpha2/write_service.proto + +package rts + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +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. + // It is ignored if already existing. + 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 + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The write delta for the relation tuples 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"` +} + +func (x *TransactRelationTuplesRequest) Reset() { + *x = TransactRelationTuplesRequest{} + if protoimpl.UnsafeEnabled { + 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 protoimpl.UnsafeEnabled && 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 + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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"` +} + +func (x *RelationTupleDelta) Reset() { + *x = RelationTupleDelta{} + if protoimpl.UnsafeEnabled { + 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 protoimpl.UnsafeEnabled && 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 + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This field is not implemented yet and has no effect. + // + Snaptokens []string `protobuf:"bytes,1,rep,name=snaptokens,proto3" json:"snaptokens,omitempty"` +} + +func (x *TransactRelationTuplesResponse) Reset() { + *x = TransactRelationTuplesResponse{} + if protoimpl.UnsafeEnabled { + 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 protoimpl.UnsafeEnabled && 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 + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Query *DeleteRelationTuplesRequest_Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` +} + +func (x *DeleteRelationTuplesRequest) Reset() { + *x = DeleteRelationTuplesRequest{} + if protoimpl.UnsafeEnabled { + 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 protoimpl.UnsafeEnabled && 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} +} + +func (x *DeleteRelationTuplesRequest) GetQuery() *DeleteRelationTuplesRequest_Query { + if x != nil { + return x.Query + } + return nil +} + +type DeleteRelationTuplesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteRelationTuplesResponse) Reset() { + *x = DeleteRelationTuplesResponse{} + if protoimpl.UnsafeEnabled { + 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 protoimpl.UnsafeEnabled && 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 relation tuples +type DeleteRelationTuplesRequest_Query struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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"` +} + +func (x *DeleteRelationTuplesRequest_Query) Reset() { + *x = DeleteRelationTuplesRequest_Query{} + if protoimpl.UnsafeEnabled { + 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 protoimpl.UnsafeEnabled && 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 + +var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, + 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, + 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x01, 0x0a, 0x1d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x69, 0x0a, 0x15, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x13, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x73, + 0x22, 0x8b, 0x02, 0x0a, 0x12, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x54, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x2e, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, + 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x46, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x43, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, 0x22, 0x40, + 0x0a, 0x1e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, + 0x22, 0x9b, 0x02, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x5a, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x44, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x1a, 0x9f, 0x01, 0x0a, + 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, + 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x1e, + 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc8, + 0x02, 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x9d, 0x01, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x40, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x6f, + 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x97, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, + 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, + 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc2, 0x01, 0x0a, 0x24, 0x73, 0x68, + 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x42, 0x11, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, + 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, + 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescOnce sync.Once + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescData = file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDesc +) + +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(file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescData) + }) + 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 = []interface{}{ + (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 + (*Subject)(nil), // 8: 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.Query.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject + 1, // 5: ory.keto.relation_tuples.v1alpha2.WriteService.TransactRelationTuples:input_type -> ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest + 4, // 6: ory.keto.relation_tuples.v1alpha2.WriteService.DeleteRelationTuples:input_type -> ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest + 3, // 7: ory.keto.relation_tuples.v1alpha2.WriteService.TransactRelationTuples:output_type -> ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse + 5, // 8: ory.keto.relation_tuples.v1alpha2.WriteService.DeleteRelationTuples:output_type -> ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse + 7, // [7:9] is the sub-list for method output_type + 5, // [5:7] 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_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() + if !protoimpl.UnsafeEnabled { + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransactRelationTuplesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RelationTupleDelta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransactRelationTuplesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRelationTuplesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRelationTuplesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRelationTuplesRequest_Query); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_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_rawDesc = nil + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_goTypes = nil + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_depIdxs = nil +} diff --git a/proto/ory/keto/acl/v1alpha1/write_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto similarity index 83% rename from proto/ory/keto/acl/v1alpha1/write_service.proto rename to proto/ory/keto/relation_tuples/v1alpha2/write_service.proto index a39ad5aaa..1a80dba10 100644 --- a/proto/ory/keto/acl/v1alpha1/write_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto @@ -1,15 +1,15 @@ syntax = "proto3"; -package ory.keto.acl.v1alpha1; +package ory.keto.relation_tuples.v1alpha2; -import "ory/keto/acl/v1alpha1/acl.proto"; +import "ory/keto/relation_tuples/v1alpha2/relation_tuples.proto"; -option go_package = "github.com/ory/keto/proto/ory/keto/acl/v1alpha1;acl"; -option csharp_namespace = "Ory.Keto.Acl.V1Alpha1"; +option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; +option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; option java_multiple_files = true; -option java_outer_classname = "WatchServiceProto"; -option java_package = "sh.ory.keto.acl.v1alpha1"; -option php_namespace = "Ory\\Keto\\Acl\\V1alpha1"; +option java_outer_classname = "WriteServiceProto"; +option java_package = "sh.ory.keto.relation_tuples.v1alpha2"; +option php_namespace = "Ory\\Keto\\RelationTuples\\v1alpha2"; // The write service to create and delete Access Control Lists. // @@ -38,11 +38,11 @@ message RelationTupleDelta { // Insertion of a new RelationTuple. // It is ignored if already existing. - INSERT = 1; + ACTION_INSERT = 1; // Deletion of the RelationTuple. // It is ignored if it does not exist. - DELETE = 2; + ACTION_DELETE = 2; } // The action to do on the RelationTuple. Action action = 1; diff --git a/proto/ory/keto/acl/v1alpha1/write_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go similarity index 90% rename from proto/ory/keto/acl/v1alpha1/write_service_grpc.pb.go rename to proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go index 06ba6d8bf..dc8502823 100644 --- a/proto/ory/keto/acl/v1alpha1/write_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -package acl +package rts import ( context "context" @@ -34,7 +34,7 @@ func NewWriteServiceClient(cc grpc.ClientConnInterface) WriteServiceClient { func (c *writeServiceClient) TransactRelationTuples(ctx context.Context, in *TransactRelationTuplesRequest, opts ...grpc.CallOption) (*TransactRelationTuplesResponse, error) { out := new(TransactRelationTuplesResponse) - err := c.cc.Invoke(ctx, "/ory.keto.acl.v1alpha1.WriteService/TransactRelationTuples", in, out, opts...) + err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples", in, out, opts...) if err != nil { return nil, err } @@ -43,7 +43,7 @@ func (c *writeServiceClient) TransactRelationTuples(ctx context.Context, in *Tra func (c *writeServiceClient) DeleteRelationTuples(ctx context.Context, in *DeleteRelationTuplesRequest, opts ...grpc.CallOption) (*DeleteRelationTuplesResponse, error) { out := new(DeleteRelationTuplesResponse) - err := c.cc.Invoke(ctx, "/ory.keto.acl.v1alpha1.WriteService/DeleteRelationTuples", in, out, opts...) + err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples", in, out, opts...) if err != nil { return nil, err } @@ -92,7 +92,7 @@ func _WriteService_TransactRelationTuples_Handler(srv interface{}, ctx context.C } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ory.keto.acl.v1alpha1.WriteService/TransactRelationTuples", + FullMethod: "/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WriteServiceServer).TransactRelationTuples(ctx, req.(*TransactRelationTuplesRequest)) @@ -110,7 +110,7 @@ func _WriteService_DeleteRelationTuples_Handler(srv interface{}, ctx context.Con } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ory.keto.acl.v1alpha1.WriteService/DeleteRelationTuples", + FullMethod: "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WriteServiceServer).DeleteRelationTuples(ctx, req.(*DeleteRelationTuplesRequest)) @@ -122,7 +122,7 @@ func _WriteService_DeleteRelationTuples_Handler(srv interface{}, ctx context.Con // 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.acl.v1alpha1.WriteService", + ServiceName: "ory.keto.relation_tuples.v1alpha2.WriteService", HandlerType: (*WriteServiceServer)(nil), Methods: []grpc.MethodDesc{ { @@ -135,5 +135,5 @@ var WriteService_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "ory/keto/acl/v1alpha1/write_service.proto", + Metadata: "ory/keto/relation_tuples/v1alpha2/write_service.proto", } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts new file mode 100644 index 000000000..4e9f29615 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts @@ -0,0 +1,59 @@ +// package: ory.keto.relation_tuples.v1alpha2 +// file: ory/keto/relation_tuples/v1alpha2/write_service.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "grpc"; +import * as ory_keto_relation_tuples_v1alpha2_write_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/write_service_pb"; +import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; + +interface IWriteServiceService extends grpc.ServiceDefinition { + transactRelationTuples: IWriteServiceService_ITransactRelationTuples; + deleteRelationTuples: IWriteServiceService_IDeleteRelationTuples; +} + +interface IWriteServiceService_ITransactRelationTuples extends grpc.MethodDefinition { + path: "/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IWriteServiceService_IDeleteRelationTuples extends grpc.MethodDefinition { + path: "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const WriteServiceService: IWriteServiceService; + +export interface IWriteServiceServer { + transactRelationTuples: grpc.handleUnaryCall; + deleteRelationTuples: grpc.handleUnaryCall; +} + +export interface IWriteServiceClient { + transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; + transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; + transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; + deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; + deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; + deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; +} + +export class WriteServiceClient extends grpc.Client implements IWriteServiceClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; + public transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; + public transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; + public deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; + public deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; + public deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js new file mode 100644 index 000000000..fc1785c12 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js @@ -0,0 +1,83 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('@grpc/grpc-js'); +var ory_keto_relation_tuples_v1alpha2_write_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/write_service_pb.js'); +var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); + +function serialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesRequest(arg) { + if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest)) { + throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesRequest(buffer_arg) { + return ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesResponse(arg) { + if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse)) { + throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesResponse(buffer_arg) { + return ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesRequest(arg) { + if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest)) { + throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesRequest(buffer_arg) { + return ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesResponse(arg) { + if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse)) { + throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesResponse(buffer_arg) { + return ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// The write service to create and delete Access Control Lists. +// +// This service is part of the [write-APIs](../concepts/api-overview.mdx#write-apis). +var WriteServiceService = exports.WriteServiceService = { + // Writes one or more relation tuples in a single transaction. +transactRelationTuples: { + path: '/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples', + requestStream: false, + responseStream: false, + requestType: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, + responseType: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse, + requestSerialize: serialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesRequest, + requestDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesRequest, + responseSerialize: serialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesResponse, + responseDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesResponse, + }, + // Deletes relation tuples based on relation query +deleteRelationTuples: { + path: '/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples', + requestStream: false, + responseStream: false, + requestType: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, + responseType: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse, + requestSerialize: serialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesRequest, + requestDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesRequest, + responseSerialize: serialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesResponse, + responseDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesResponse, + }, +}; + +exports.WriteServiceClient = grpc.makeGenericClientConstructor(WriteServiceService); diff --git a/proto/ory/keto/acl/v1alpha1/write_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts similarity index 88% rename from proto/ory/keto/acl/v1alpha1/write_service_pb.d.ts rename to proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts index 5bca91b2f..7b6918de3 100644 --- a/proto/ory/keto/acl/v1alpha1/write_service_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts @@ -1,11 +1,11 @@ -// package: ory.keto.acl.v1alpha1 -// file: ory/keto/acl/v1alpha1/write_service.proto +// package: ory.keto.relation_tuples.v1alpha2 +// file: ory/keto/relation_tuples/v1alpha2/write_service.proto /* tslint:disable */ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as ory_keto_acl_v1alpha1_acl_pb from "../../../../ory/keto/acl/v1alpha1/acl_pb"; +import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; export class TransactRelationTuplesRequest extends jspb.Message { clearRelationTupleDeltasList(): void; @@ -35,8 +35,8 @@ export class RelationTupleDelta extends jspb.Message { hasRelationTuple(): boolean; clearRelationTuple(): void; - getRelationTuple(): ory_keto_acl_v1alpha1_acl_pb.RelationTuple | undefined; - setRelationTuple(value?: ory_keto_acl_v1alpha1_acl_pb.RelationTuple): RelationTupleDelta; + getRelationTuple(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple | undefined; + setRelationTuple(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple): RelationTupleDelta; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): RelationTupleDelta.AsObject; @@ -51,13 +51,13 @@ export class RelationTupleDelta extends jspb.Message { export namespace RelationTupleDelta { export type AsObject = { action: RelationTupleDelta.Action, - relationTuple?: ory_keto_acl_v1alpha1_acl_pb.RelationTuple.AsObject, + relationTuple?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.AsObject, } export enum Action { ACTION_UNSPECIFIED = 0, - INSERT = 1, - DELETE = 2, + ACTION_INSERT = 1, + ACTION_DELETE = 2, } } @@ -117,8 +117,8 @@ export namespace DeleteRelationTuplesRequest { hasSubject(): boolean; clearSubject(): void; - getSubject(): ory_keto_acl_v1alpha1_acl_pb.Subject | undefined; - setSubject(value?: ory_keto_acl_v1alpha1_acl_pb.Subject): Query; + getSubject(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject | undefined; + setSubject(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject): Query; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Query.AsObject; @@ -135,7 +135,7 @@ export namespace DeleteRelationTuplesRequest { namespace: string, object: string, relation: string, - subject?: ory_keto_acl_v1alpha1_acl_pb.Subject.AsObject, + subject?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.AsObject, } } diff --git a/proto/ory/keto/acl/v1alpha1/write_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js similarity index 50% rename from proto/ory/keto/acl/v1alpha1/write_service_pb.js rename to proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js index a458f0fe7..bc467bd44 100644 --- a/proto/ory/keto/acl/v1alpha1/write_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js @@ -1,4 +1,4 @@ -// source: ory/keto/acl/v1alpha1/write_service.proto +// source: ory/keto/relation_tuples/v1alpha2/write_service.proto /** * @fileoverview * @enhanceable @@ -21,15 +21,15 @@ var global = (function() { return Function('return this')(); }.call(null)); -var ory_keto_acl_v1alpha1_acl_pb = require('../../../../ory/keto/acl/v1alpha1/acl_pb.js'); -goog.object.extend(proto, ory_keto_acl_v1alpha1_acl_pb); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest', null, global); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query', null, global); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse', null, global); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.RelationTupleDelta', null, global); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.RelationTupleDelta.Action', null, global); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest', null, global); -goog.exportSymbol('proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse', null, global); +var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); +goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -40,16 +40,16 @@ goog.exportSymbol('proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse', * @extends {jspb.Message} * @constructor */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.repeatedFields_, null); +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.repeatedFields_, null); }; -goog.inherits(proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest, jspb.Message); +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.displayName = 'proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest'; + proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest'; } /** * Generated by JsPbCodeGenerator. @@ -61,16 +61,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.ory.keto.acl.v1alpha1.RelationTupleDelta = function(opt_data) { +proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.ory.keto.acl.v1alpha1.RelationTupleDelta, jspb.Message); +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ory.keto.acl.v1alpha1.RelationTupleDelta.displayName = 'proto.ory.keto.acl.v1alpha1.RelationTupleDelta'; + proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta'; } /** * Generated by JsPbCodeGenerator. @@ -82,16 +82,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.repeatedFields_, null); +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.repeatedFields_, null); }; -goog.inherits(proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse, jspb.Message); +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.displayName = 'proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse'; + proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse'; } /** * Generated by JsPbCodeGenerator. @@ -103,16 +103,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest = function(opt_data) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest, jspb.Message); +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.displayName = 'proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest'; + proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest'; } /** * Generated by JsPbCodeGenerator. @@ -124,16 +124,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query = function(opt_data) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query, jspb.Message); +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.displayName = 'proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query'; + proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query'; } /** * Generated by JsPbCodeGenerator. @@ -145,16 +145,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse = function(opt_data) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse, jspb.Message); +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse.displayName = 'proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse'; + proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse'; } /** @@ -162,7 +162,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.repeatedFields_ = [1]; +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.repeatedFields_ = [1]; @@ -179,8 +179,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.toObject(opt_includeInstance, this); }; @@ -189,14 +189,14 @@ proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.prototype.toObject = f * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.toObject = function(includeInstance, msg) { var f, obj = { relationTupleDeltasList: jspb.Message.toObjectList(msg.getRelationTupleDeltasList(), - proto.ory.keto.acl.v1alpha1.RelationTupleDelta.toObject, includeInstance) + proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.toObject, includeInstance) }; if (includeInstance) { @@ -210,23 +210,23 @@ proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.toObject = function(in /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest} */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest; - return proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest; + return proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest} */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -234,8 +234,8 @@ proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.deserializeBinaryFromR var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.ory.keto.acl.v1alpha1.RelationTupleDelta; - reader.readMessage(value,proto.ory.keto.acl.v1alpha1.RelationTupleDelta.deserializeBinaryFromReader); + var value = new proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta; + reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.deserializeBinaryFromReader); msg.addRelationTupleDeltas(value); break; default: @@ -251,9 +251,9 @@ proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.deserializeBinaryFromR * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -261,18 +261,18 @@ proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.prototype.serializeBin /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getRelationTupleDeltasList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - proto.ory.keto.acl.v1alpha1.RelationTupleDelta.serializeBinaryToWriter + proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.serializeBinaryToWriter ); } }; @@ -280,38 +280,38 @@ proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.serializeBinaryToWrite /** * repeated RelationTupleDelta relation_tuple_deltas = 1; - * @return {!Array} + * @return {!Array} */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.prototype.getRelationTupleDeltasList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.ory.keto.acl.v1alpha1.RelationTupleDelta, 1)); +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.prototype.getRelationTupleDeltasList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta, 1)); }; /** - * @param {!Array} value - * @return {!proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest} returns this + * @param {!Array} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest} returns this */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.prototype.setRelationTupleDeltasList = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.prototype.setRelationTupleDeltasList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.ory.keto.acl.v1alpha1.RelationTupleDelta=} opt_value + * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta=} opt_value * @param {number=} opt_index - * @return {!proto.ory.keto.acl.v1alpha1.RelationTupleDelta} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.prototype.addRelationTupleDeltas = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ory.keto.acl.v1alpha1.RelationTupleDelta, opt_index); +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.prototype.addRelationTupleDeltas = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest} returns this */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesRequest.prototype.clearRelationTupleDeltasList = function() { +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.prototype.clearRelationTupleDeltasList = function() { return this.setRelationTupleDeltasList([]); }; @@ -332,8 +332,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.acl.v1alpha1.RelationTupleDelta.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.RelationTupleDelta.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.toObject(opt_includeInstance, this); }; @@ -342,14 +342,14 @@ proto.ory.keto.acl.v1alpha1.RelationTupleDelta.prototype.toObject = function(opt * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.RelationTupleDelta} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.RelationTupleDelta.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.toObject = function(includeInstance, msg) { var f, obj = { action: jspb.Message.getFieldWithDefault(msg, 1, 0), - relationTuple: (f = msg.getRelationTuple()) && ory_keto_acl_v1alpha1_acl_pb.RelationTuple.toObject(includeInstance, f) + relationTuple: (f = msg.getRelationTuple()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject(includeInstance, f) }; if (includeInstance) { @@ -363,23 +363,23 @@ proto.ory.keto.acl.v1alpha1.RelationTupleDelta.toObject = function(includeInstan /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.RelationTupleDelta} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} */ -proto.ory.keto.acl.v1alpha1.RelationTupleDelta.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.RelationTupleDelta; - return proto.ory.keto.acl.v1alpha1.RelationTupleDelta.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta; + return proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.RelationTupleDelta} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.RelationTupleDelta} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} */ -proto.ory.keto.acl.v1alpha1.RelationTupleDelta.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -387,12 +387,12 @@ proto.ory.keto.acl.v1alpha1.RelationTupleDelta.deserializeBinaryFromReader = fun var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.ory.keto.acl.v1alpha1.RelationTupleDelta.Action} */ (reader.readEnum()); + var value = /** @type {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action} */ (reader.readEnum()); msg.setAction(value); break; case 2: - var value = new ory_keto_acl_v1alpha1_acl_pb.RelationTuple; - reader.readMessage(value,ory_keto_acl_v1alpha1_acl_pb.RelationTuple.deserializeBinaryFromReader); + var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple; + reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.deserializeBinaryFromReader); msg.setRelationTuple(value); break; default: @@ -408,9 +408,9 @@ proto.ory.keto.acl.v1alpha1.RelationTupleDelta.deserializeBinaryFromReader = fun * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.acl.v1alpha1.RelationTupleDelta.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.RelationTupleDelta.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -418,11 +418,11 @@ proto.ory.keto.acl.v1alpha1.RelationTupleDelta.prototype.serializeBinary = funct /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.RelationTupleDelta} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.RelationTupleDelta.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAction(); if (f !== 0.0) { @@ -436,7 +436,7 @@ proto.ory.keto.acl.v1alpha1.RelationTupleDelta.serializeBinaryToWriter = functio writer.writeMessage( 2, f, - ory_keto_acl_v1alpha1_acl_pb.RelationTuple.serializeBinaryToWriter + ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.serializeBinaryToWriter ); } }; @@ -445,54 +445,54 @@ proto.ory.keto.acl.v1alpha1.RelationTupleDelta.serializeBinaryToWriter = functio /** * @enum {number} */ -proto.ory.keto.acl.v1alpha1.RelationTupleDelta.Action = { +proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action = { ACTION_UNSPECIFIED: 0, - INSERT: 1, - DELETE: 2 + ACTION_INSERT: 1, + ACTION_DELETE: 2 }; /** * optional Action action = 1; - * @return {!proto.ory.keto.acl.v1alpha1.RelationTupleDelta.Action} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action} */ -proto.ory.keto.acl.v1alpha1.RelationTupleDelta.prototype.getAction = function() { - return /** @type {!proto.ory.keto.acl.v1alpha1.RelationTupleDelta.Action} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.getAction = function() { + return /** @type {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {!proto.ory.keto.acl.v1alpha1.RelationTupleDelta.Action} value - * @return {!proto.ory.keto.acl.v1alpha1.RelationTupleDelta} returns this + * @param {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} returns this */ -proto.ory.keto.acl.v1alpha1.RelationTupleDelta.prototype.setAction = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.setAction = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional RelationTuple relation_tuple = 2; - * @return {?proto.ory.keto.acl.v1alpha1.RelationTuple} + * @return {?proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} */ -proto.ory.keto.acl.v1alpha1.RelationTupleDelta.prototype.getRelationTuple = function() { - return /** @type{?proto.ory.keto.acl.v1alpha1.RelationTuple} */ ( - jspb.Message.getWrapperField(this, ory_keto_acl_v1alpha1_acl_pb.RelationTuple, 2)); +proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.getRelationTuple = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} */ ( + jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple, 2)); }; /** - * @param {?proto.ory.keto.acl.v1alpha1.RelationTuple|undefined} value - * @return {!proto.ory.keto.acl.v1alpha1.RelationTupleDelta} returns this + * @param {?proto.ory.keto.relation_tuples.v1alpha2.RelationTuple|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} returns this */ -proto.ory.keto.acl.v1alpha1.RelationTupleDelta.prototype.setRelationTuple = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.setRelationTuple = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.ory.keto.acl.v1alpha1.RelationTupleDelta} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta} returns this */ -proto.ory.keto.acl.v1alpha1.RelationTupleDelta.prototype.clearRelationTuple = function() { +proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.clearRelationTuple = function() { return this.setRelationTuple(undefined); }; @@ -501,7 +501,7 @@ proto.ory.keto.acl.v1alpha1.RelationTupleDelta.prototype.clearRelationTuple = fu * Returns whether this field is set. * @return {boolean} */ -proto.ory.keto.acl.v1alpha1.RelationTupleDelta.prototype.hasRelationTuple = function() { +proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.hasRelationTuple = function() { return jspb.Message.getField(this, 2) != null; }; @@ -512,7 +512,7 @@ proto.ory.keto.acl.v1alpha1.RelationTupleDelta.prototype.hasRelationTuple = func * @private {!Array} * @const */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.repeatedFields_ = [1]; +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.repeatedFields_ = [1]; @@ -529,8 +529,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.toObject(opt_includeInstance, this); }; @@ -539,11 +539,11 @@ proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.prototype.toObject = * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.toObject = function(includeInstance, msg) { var f, obj = { snaptokensList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; @@ -559,23 +559,23 @@ proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.toObject = function(i /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse} */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse; - return proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse; + return proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse} */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -599,9 +599,9 @@ proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.deserializeBinaryFrom * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -609,11 +609,11 @@ proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.prototype.serializeBi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSnaptokensList(); if (f.length > 0) { @@ -629,16 +629,16 @@ proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.serializeBinaryToWrit * repeated string snaptokens = 1; * @return {!Array} */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.prototype.getSnaptokensList = function() { +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.prototype.getSnaptokensList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** * @param {!Array} value - * @return {!proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse} returns this */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.prototype.setSnaptokensList = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.prototype.setSnaptokensList = function(value) { return jspb.Message.setField(this, 1, value || []); }; @@ -646,18 +646,18 @@ proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.prototype.setSnaptoke /** * @param {string} value * @param {number=} opt_index - * @return {!proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse} returns this */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.prototype.addSnaptokens = function(value, opt_index) { +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.prototype.addSnaptokens = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse} returns this */ -proto.ory.keto.acl.v1alpha1.TransactRelationTuplesResponse.prototype.clearSnaptokensList = function() { +proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.prototype.clearSnaptokensList = function() { return this.setSnaptokensList([]); }; @@ -678,8 +678,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.toObject(opt_includeInstance, this); }; @@ -688,13 +688,13 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.prototype.toObject = fun * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.toObject = function(includeInstance, msg) { var f, obj = { - query: (f = msg.getQuery()) && proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.toObject(includeInstance, f) + query: (f = msg.getQuery()) && proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.toObject(includeInstance, f) }; if (includeInstance) { @@ -708,23 +708,23 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.toObject = function(incl /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest; - return proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest; + return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -732,8 +732,8 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.deserializeBinaryFromRea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query; - reader.readMessage(value,proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.deserializeBinaryFromReader); + var value = new proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query; + reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deserializeBinaryFromReader); msg.setQuery(value); break; default: @@ -749,9 +749,9 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.deserializeBinaryFromRea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -759,18 +759,18 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.prototype.serializeBinar /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getQuery(); if (f != null) { writer.writeMessage( 1, f, - proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.serializeBinaryToWriter + proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.serializeBinaryToWriter ); } }; @@ -792,8 +792,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.toObject(opt_includeInstance, this); }; @@ -802,16 +802,16 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.toObject * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.toObject = function(includeInstance, msg) { var f, obj = { namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), object: jspb.Message.getFieldWithDefault(msg, 2, ""), relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subject: (f = msg.getSubject()) && ory_keto_acl_v1alpha1_acl_pb.Subject.toObject(includeInstance, f) + subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f) }; if (includeInstance) { @@ -825,23 +825,23 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.toObject = functio /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query; - return proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query; + return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -861,8 +861,8 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.deserializeBinaryF msg.setRelation(value); break; case 4: - var value = new ory_keto_acl_v1alpha1_acl_pb.Subject; - reader.readMessage(value,ory_keto_acl_v1alpha1_acl_pb.Subject.deserializeBinaryFromReader); + var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject; + reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.deserializeBinaryFromReader); msg.setSubject(value); break; default: @@ -878,9 +878,9 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.deserializeBinaryF * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -888,11 +888,11 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.serializ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getNamespace(); if (f.length > 0) { @@ -920,7 +920,7 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.serializeBinaryToW writer.writeMessage( 4, f, - ory_keto_acl_v1alpha1_acl_pb.Subject.serializeBinaryToWriter + ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.serializeBinaryToWriter ); } }; @@ -930,16 +930,16 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.serializeBinaryToW * optional string namespace = 1; * @return {string} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.getNamespace = function() { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.getNamespace = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.setNamespace = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.setNamespace = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -948,16 +948,16 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.setNames * optional string object = 2; * @return {string} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.getObject = function() { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.getObject = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.setObject = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.setObject = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -966,44 +966,44 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.setObjec * optional string relation = 3; * @return {string} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.getRelation = function() { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.getRelation = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.setRelation = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.setRelation = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional Subject subject = 4; - * @return {?proto.ory.keto.acl.v1alpha1.Subject} + * @return {?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.getSubject = function() { - return /** @type{?proto.ory.keto.acl.v1alpha1.Subject} */ ( - jspb.Message.getWrapperField(this, ory_keto_acl_v1alpha1_acl_pb.Subject, 4)); +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.getSubject = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ ( + jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject, 4)); }; /** - * @param {?proto.ory.keto.acl.v1alpha1.Subject|undefined} value - * @return {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query} returns this + * @param {?proto.ory.keto.relation_tuples.v1alpha2.Subject|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.setSubject = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.setSubject = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.clearSubject = function() { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.clearSubject = function() { return this.setSubject(undefined); }; @@ -1012,35 +1012,35 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.clearSub * Returns whether this field is set. * @return {boolean} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query.prototype.hasSubject = function() { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.hasSubject = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional Query query = 1; - * @return {?proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query} + * @return {?proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.prototype.getQuery = function() { - return /** @type{?proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query} */ ( - jspb.Message.getWrapperField(this, proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query, 1)); +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.getQuery = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} */ ( + jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query, 1)); }; /** - * @param {?proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.Query|undefined} value - * @return {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest} returns this + * @param {?proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.prototype.setQuery = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.setQuery = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.prototype.clearQuery = function() { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.clearQuery = function() { return this.setQuery(undefined); }; @@ -1049,7 +1049,7 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.prototype.clearQuery = f * Returns whether this field is set. * @return {boolean} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesRequest.prototype.hasQuery = function() { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.hasQuery = function() { return jspb.Message.getField(this, 1) != null; }; @@ -1070,8 +1070,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.toObject(opt_includeInstance, this); }; @@ -1080,11 +1080,11 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse.prototype.toObject = fu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -1100,23 +1100,23 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse.toObject = function(inc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse; - return proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse; + return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1136,9 +1136,9 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse.deserializeBinaryFromRe * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1146,13 +1146,13 @@ proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse.prototype.serializeBina /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.acl.v1alpha1.DeleteRelationTuplesResponse.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; -goog.object.extend(exports, proto.ory.keto.acl.v1alpha1); +goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/spec/api.json b/spec/api.json index d5ccfd718..1414fe435 100755 --- a/spec/api.json +++ b/spec/api.json @@ -149,7 +149,7 @@ } }, "required": ["allowed"], - "title": "Represents the response for a check request.", + "title": "RESTResponse is the response for a check request.", "type": "object" }, "getRelationTuplesResponse": { @@ -215,10 +215,10 @@ }, "openapi": "3.0.3", "paths": { - "/acl/check": { - "get": { - "description": "To learn how relation tuples and the check works, head over to [the documentation](../concepts/relation-tuples.mdx).", - "operationId": "getCheck", + "/admin/relation-tuples": { + "delete": { + "description": "Use this endpoint to delete relation tuples", + "operationId": "deleteRelationTuples", "parameters": [ { "description": "Namespace of the Relation Tuple", @@ -275,26 +275,55 @@ "schema": { "type": "string" } - }, - { - "in": "query", - "name": "max-depth", - "schema": { - "format": "int64", - "type": "integer" - } } ], "responses": { - "200": { + "204": { + "$ref": "#/components/responses/emptyResponse" + }, + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/getCheckResponse" + "$ref": "#/components/schemas/genericError" } } }, - "description": "getCheckResponse" + "description": "genericError" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genericError" + } + } + }, + "description": "genericError" + } + }, + "summary": "Delete Relation Tuples", + "tags": ["write"] + }, + "patch": { + "description": "Use this endpoint to patch one or more relation tuples.", + "operationId": "patchRelationTuples", + "requestBody": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PatchDelta" + }, + "type": "array" + } + } + }, + "x-originalParamName": "Payload" + }, + "responses": { + "204": { + "$ref": "#/components/responses/emptyResponse" }, "400": { "content": { @@ -306,15 +335,15 @@ }, "description": "genericError" }, - "403": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/getCheckResponse" + "$ref": "#/components/schemas/genericError" } } }, - "description": "getCheckResponse" + "description": "genericError" }, "500": { "content": { @@ -327,22 +356,12 @@ "description": "genericError" } }, - "summary": "Check a relation tuple", - "tags": ["read"] + "summary": "Patch Multiple Relation Tuples", + "tags": ["write"] }, - "post": { - "description": "To learn how relation tuples and the check works, head over to [the documentation](../concepts/relation-tuples.mdx).", - "operationId": "postCheck", - "parameters": [ - { - "in": "query", - "name": "max-depth", - "schema": { - "format": "int64", - "type": "integer" - } - } - ], + "put": { + "description": "Use this endpoint to create a relation tuple.", + "operationId": "createRelationTuple", "requestBody": { "content": { "application/json": { @@ -354,15 +373,15 @@ "x-originalParamName": "Payload" }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/getCheckResponse" + "$ref": "#/components/schemas/RelationQuery" } } }, - "description": "getCheckResponse" + "description": "RelationQuery" }, "400": { "content": { @@ -374,15 +393,42 @@ }, "description": "genericError" }, - "403": { + "500": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/getCheckResponse" + "$ref": "#/components/schemas/genericError" } } }, - "description": "getCheckResponse" + "description": "genericError" + } + }, + "summary": "Create a Relation Tuple", + "tags": ["write"] + } + }, + "/health/alive": { + "get": { + "description": "This endpoint returns a HTTP 200 status code when Ory Keto is accepting incoming\nHTTP requests. This status does currently not include checks whether the database connection is working.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.", + "operationId": "isAlive", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "description": "Always \"ok\".", + "type": "string" + } + }, + "required": ["status"], + "type": "object" + } + } + }, + "description": "Ory Keto is ready to accept connections." }, "500": { "content": { @@ -395,48 +441,131 @@ "description": "genericError" } }, - "summary": "Check a relation tuple", - "tags": ["read"] + "summary": "Check HTTP Server Status", + "tags": ["metadata"] } }, - "/acl/expand": { + "/health/ready": { "get": { - "description": "Use this endpoint to expand a relation tuple.", - "operationId": "getExpand", + "description": "This endpoint returns a HTTP 200 status code when Ory Keto is up running and the environment dependencies (e.g.\nthe database) are responsive as well.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of Ory Keto, the health status will never\nrefer to the cluster state, only to a single instance.", + "operationId": "isReady", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "description": "Always \"ok\".", + "type": "string" + } + }, + "required": ["status"], + "type": "object" + } + } + }, + "description": "Ory Keto is ready to accept requests." + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "errors": { + "additionalProperties": { + "type": "string" + }, + "description": "Errors contains a list of errors that caused the not ready status.", + "type": "object" + } + }, + "required": ["errors"], + "type": "object" + } + } + }, + "description": "Ory Kratos is not yet ready to accept requests." + } + }, + "summary": "Check HTTP Server and Database Status", + "tags": ["metadata"] + } + }, + "/relation-tuples": { + "get": { + "description": "Get all relation tuples that match the query. Only the namespace field is required.", + "operationId": "getRelationTuples", "parameters": [ { - "description": "Namespace of the Subject Set", + "in": "query", + "name": "page_token", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page_size", + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "description": "Namespace of the Relation Tuple", "in": "query", "name": "namespace", - "required": true, "schema": { "type": "string" } }, { - "description": "Object of the Subject Set", + "description": "Object of the Relation Tuple", "in": "query", "name": "object", - "required": true, "schema": { "type": "string" } }, { - "description": "Relation of the Subject Set", + "description": "Relation of the Relation Tuple", "in": "query", "name": "relation", - "required": true, "schema": { "type": "string" } }, { + "description": "SubjectID of the Relation Tuple", "in": "query", - "name": "max-depth", + "name": "subject_id", "schema": { - "format": "int64", - "type": "integer" + "type": "string" + } + }, + { + "description": "Namespace of the Subject Set", + "in": "query", + "name": "subject_set.namespace", + "schema": { + "type": "string" + } + }, + { + "description": "Object of the Subject Set", + "in": "query", + "name": "subject_set.object", + "schema": { + "type": "string" + } + }, + { + "description": "Relation of the Subject Set", + "in": "query", + "name": "subject_set.relation", + "schema": { + "type": "string" } } ], @@ -445,21 +574,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/expandTree" - } - } - }, - "description": "expandTree" - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/genericError" + "$ref": "#/components/schemas/getRelationTuplesResponse" } } }, - "description": "genericError" + "description": "getRelationTuplesResponse" }, "404": { "content": { @@ -482,14 +601,14 @@ "description": "genericError" } }, - "summary": "Expand a Relation Tuple", + "summary": "Query relation tuples", "tags": ["read"] } }, - "/admin/relation-tuples": { - "delete": { - "description": "Use this endpoint to delete relation tuples", - "operationId": "deleteRelationTuples", + "/relation-tuples/check": { + "get": { + "description": "To learn how relation tuples and the check works, head over to [the documentation](../concepts/relation-tuples.mdx).", + "operationId": "getCheck", "parameters": [ { "description": "Namespace of the Relation Tuple", @@ -546,55 +665,26 @@ "schema": { "type": "string" } + }, + { + "in": "query", + "name": "max-depth", + "schema": { + "format": "int64", + "type": "integer" + } } ], "responses": { - "204": { - "$ref": "#/components/responses/emptyResponse" - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/genericError" - } - } - }, - "description": "genericError" - }, - "500": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/genericError" + "$ref": "#/components/schemas/getCheckResponse" } } }, - "description": "genericError" - } - }, - "summary": "Delete Relation Tuples", - "tags": ["write"] - }, - "patch": { - "description": "Use this endpoint to patch one or more relation tuples.", - "operationId": "patchRelationTuples", - "requestBody": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/PatchDelta" - }, - "type": "array" - } - } - }, - "x-originalParamName": "Payload" - }, - "responses": { - "204": { - "$ref": "#/components/responses/emptyResponse" + "description": "getCheckResponse" }, "400": { "content": { @@ -606,15 +696,15 @@ }, "description": "genericError" }, - "404": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/genericError" + "$ref": "#/components/schemas/getCheckResponse" } } }, - "description": "genericError" + "description": "getCheckResponse" }, "500": { "content": { @@ -627,12 +717,22 @@ "description": "genericError" } }, - "summary": "Patch Multiple Relation Tuples", - "tags": ["write"] + "summary": "Check a relation tuple", + "tags": ["read"] }, - "put": { - "description": "Use this endpoint to create a relation tuple.", - "operationId": "createRelationTuple", + "post": { + "description": "To learn how relation tuples and the check works, head over to [the documentation](../concepts/relation-tuples.mdx).", + "operationId": "postCheck", + "parameters": [ + { + "in": "query", + "name": "max-depth", + "schema": { + "format": "int64", + "type": "integer" + } + } + ], "requestBody": { "content": { "application/json": { @@ -644,15 +744,15 @@ "x-originalParamName": "Payload" }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RelationQuery" + "$ref": "#/components/schemas/getCheckResponse" } } }, - "description": "RelationQuery" + "description": "getCheckResponse" }, "400": { "content": { @@ -664,42 +764,15 @@ }, "description": "genericError" }, - "500": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/genericError" - } - } - }, - "description": "genericError" - } - }, - "summary": "Create a Relation Tuple", - "tags": ["write"] - } - }, - "/health/alive": { - "get": { - "description": "This endpoint returns a HTTP 200 status code when Ory Keto is accepting incoming\nHTTP requests. This status does currently not include checks whether the database connection is working.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.", - "operationId": "isAlive", - "responses": { - "200": { + "403": { "content": { "application/json": { "schema": { - "properties": { - "status": { - "description": "Always \"ok\".", - "type": "string" - } - }, - "required": ["status"], - "type": "object" + "$ref": "#/components/schemas/getCheckResponse" } } }, - "description": "Ory Keto is ready to accept connections." + "description": "getCheckResponse" }, "500": { "content": { @@ -712,131 +785,48 @@ "description": "genericError" } }, - "summary": "Check HTTP Server Status", - "tags": ["metadata"] - } - }, - "/health/ready": { - "get": { - "description": "This endpoint returns a HTTP 200 status code when Ory Keto is up running and the environment dependencies (e.g.\nthe database) are responsive as well.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of Ory Keto, the health status will never\nrefer to the cluster state, only to a single instance.", - "operationId": "isReady", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "description": "Always \"ok\".", - "type": "string" - } - }, - "required": ["status"], - "type": "object" - } - } - }, - "description": "Ory Keto is ready to accept requests." - }, - "503": { - "content": { - "application/json": { - "schema": { - "properties": { - "errors": { - "additionalProperties": { - "type": "string" - }, - "description": "Errors contains a list of errors that caused the not ready status.", - "type": "object" - } - }, - "required": ["errors"], - "type": "object" - } - } - }, - "description": "Ory Kratos is not yet ready to accept requests." - } - }, - "summary": "Check HTTP Server and Database Status", - "tags": ["metadata"] + "summary": "Check a relation tuple", + "tags": ["read"] } }, - "/relation-tuples": { + "/relation-tuples/expand": { "get": { - "description": "Get all relation tuples that match the query. Only the namespace field is required.", - "operationId": "getRelationTuples", + "description": "Use this endpoint to expand a relation tuple.", + "operationId": "getExpand", "parameters": [ { - "in": "query", - "name": "page_token", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "page_size", - "schema": { - "format": "int64", - "type": "integer" - } - }, - { - "description": "Namespace of the Relation Tuple", + "description": "Namespace of the Subject Set", "in": "query", "name": "namespace", + "required": true, "schema": { "type": "string" } }, { - "description": "Object of the Relation Tuple", + "description": "Object of the Subject Set", "in": "query", "name": "object", + "required": true, "schema": { "type": "string" } }, { - "description": "Relation of the Relation Tuple", + "description": "Relation of the Subject Set", "in": "query", "name": "relation", + "required": true, "schema": { "type": "string" } }, { - "description": "SubjectID of the Relation Tuple", - "in": "query", - "name": "subject_id", - "schema": { - "type": "string" - } - }, - { - "description": "Namespace of the Subject Set", - "in": "query", - "name": "subject_set.namespace", - "schema": { - "type": "string" - } - }, - { - "description": "Object of the Subject Set", - "in": "query", - "name": "subject_set.object", - "schema": { - "type": "string" - } - }, - { - "description": "Relation of the Subject Set", "in": "query", - "name": "subject_set.relation", + "name": "max-depth", "schema": { - "type": "string" + "format": "int64", + "type": "integer" } } ], @@ -845,11 +835,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/getRelationTuplesResponse" + "$ref": "#/components/schemas/expandTree" } } }, - "description": "getRelationTuplesResponse" + "description": "expandTree" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genericError" + } + } + }, + "description": "genericError" }, "404": { "content": { @@ -872,7 +872,7 @@ "description": "genericError" } }, - "summary": "Query relation tuples", + "summary": "Expand a Relation Tuple", "tags": ["read"] } }, diff --git a/spec/swagger.json b/spec/swagger.json index 4810ae72a..c9543f9e6 100755 --- a/spec/swagger.json +++ b/spec/swagger.json @@ -19,209 +19,6 @@ }, "basePath": "/", "paths": { - "/acl/check": { - "get": { - "description": "To learn how relation tuples and the check works, head over to [the documentation](../concepts/relation-tuples.mdx).", - "consumes": ["application/x-www-form-urlencoded"], - "produces": ["application/json"], - "schemes": ["http", "https"], - "tags": ["read"], - "summary": "Check a relation tuple", - "operationId": "getCheck", - "parameters": [ - { - "type": "string", - "description": "Namespace of the Relation Tuple", - "name": "namespace", - "in": "query" - }, - { - "type": "string", - "description": "Object of the Relation Tuple", - "name": "object", - "in": "query" - }, - { - "type": "string", - "description": "Relation of the Relation Tuple", - "name": "relation", - "in": "query" - }, - { - "type": "string", - "description": "SubjectID of the Relation Tuple", - "name": "subject_id", - "in": "query" - }, - { - "type": "string", - "description": "Namespace of the Subject Set", - "name": "subject_set.namespace", - "in": "query" - }, - { - "type": "string", - "description": "Object of the Subject Set", - "name": "subject_set.object", - "in": "query" - }, - { - "type": "string", - "description": "Relation of the Subject Set", - "name": "subject_set.relation", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "name": "max-depth", - "in": "query" - } - ], - "responses": { - "200": { - "description": "getCheckResponse", - "schema": { - "$ref": "#/definitions/getCheckResponse" - } - }, - "400": { - "description": "genericError", - "schema": { - "$ref": "#/definitions/genericError" - } - }, - "403": { - "description": "getCheckResponse", - "schema": { - "$ref": "#/definitions/getCheckResponse" - } - }, - "500": { - "description": "genericError", - "schema": { - "$ref": "#/definitions/genericError" - } - } - } - }, - "post": { - "description": "To learn how relation tuples and the check works, head over to [the documentation](../concepts/relation-tuples.mdx).", - "consumes": ["application/json"], - "produces": ["application/json"], - "schemes": ["http", "https"], - "tags": ["read"], - "summary": "Check a relation tuple", - "operationId": "postCheck", - "parameters": [ - { - "name": "Payload", - "in": "body", - "schema": { - "$ref": "#/definitions/RelationQuery" - } - }, - { - "type": "integer", - "format": "int64", - "name": "max-depth", - "in": "query" - } - ], - "responses": { - "200": { - "description": "getCheckResponse", - "schema": { - "$ref": "#/definitions/getCheckResponse" - } - }, - "400": { - "description": "genericError", - "schema": { - "$ref": "#/definitions/genericError" - } - }, - "403": { - "description": "getCheckResponse", - "schema": { - "$ref": "#/definitions/getCheckResponse" - } - }, - "500": { - "description": "genericError", - "schema": { - "$ref": "#/definitions/genericError" - } - } - } - } - }, - "/acl/expand": { - "get": { - "description": "Use this endpoint to expand a relation tuple.", - "consumes": ["application/x-www-form-urlencoded"], - "produces": ["application/json"], - "schemes": ["http", "https"], - "tags": ["read"], - "summary": "Expand a Relation Tuple", - "operationId": "getExpand", - "parameters": [ - { - "type": "string", - "description": "Namespace of the Subject Set", - "name": "namespace", - "in": "query", - "required": true - }, - { - "type": "string", - "description": "Object of the Subject Set", - "name": "object", - "in": "query", - "required": true - }, - { - "type": "string", - "description": "Relation of the Subject Set", - "name": "relation", - "in": "query", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "max-depth", - "in": "query" - } - ], - "responses": { - "200": { - "description": "expandTree", - "schema": { - "$ref": "#/definitions/expandTree" - } - }, - "400": { - "description": "genericError", - "schema": { - "$ref": "#/definitions/genericError" - } - }, - "404": { - "description": "genericError", - "schema": { - "$ref": "#/definitions/genericError" - } - }, - "500": { - "description": "genericError", - "schema": { - "$ref": "#/definitions/genericError" - } - } - } - } - }, "/admin/relation-tuples": { "put": { "description": "Use this endpoint to create a relation tuple.", @@ -508,6 +305,209 @@ } } }, + "/relation-tuples/check": { + "get": { + "description": "To learn how relation tuples and the check works, head over to [the documentation](../concepts/relation-tuples.mdx).", + "consumes": ["application/x-www-form-urlencoded"], + "produces": ["application/json"], + "schemes": ["http", "https"], + "tags": ["read"], + "summary": "Check a relation tuple", + "operationId": "getCheck", + "parameters": [ + { + "type": "string", + "description": "Namespace of the Relation Tuple", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "description": "Object of the Relation Tuple", + "name": "object", + "in": "query" + }, + { + "type": "string", + "description": "Relation of the Relation Tuple", + "name": "relation", + "in": "query" + }, + { + "type": "string", + "description": "SubjectID of the Relation Tuple", + "name": "subject_id", + "in": "query" + }, + { + "type": "string", + "description": "Namespace of the Subject Set", + "name": "subject_set.namespace", + "in": "query" + }, + { + "type": "string", + "description": "Object of the Subject Set", + "name": "subject_set.object", + "in": "query" + }, + { + "type": "string", + "description": "Relation of the Subject Set", + "name": "subject_set.relation", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "name": "max-depth", + "in": "query" + } + ], + "responses": { + "200": { + "description": "getCheckResponse", + "schema": { + "$ref": "#/definitions/getCheckResponse" + } + }, + "400": { + "description": "genericError", + "schema": { + "$ref": "#/definitions/genericError" + } + }, + "403": { + "description": "getCheckResponse", + "schema": { + "$ref": "#/definitions/getCheckResponse" + } + }, + "500": { + "description": "genericError", + "schema": { + "$ref": "#/definitions/genericError" + } + } + } + }, + "post": { + "description": "To learn how relation tuples and the check works, head over to [the documentation](../concepts/relation-tuples.mdx).", + "consumes": ["application/json"], + "produces": ["application/json"], + "schemes": ["http", "https"], + "tags": ["read"], + "summary": "Check a relation tuple", + "operationId": "postCheck", + "parameters": [ + { + "name": "Payload", + "in": "body", + "schema": { + "$ref": "#/definitions/RelationQuery" + } + }, + { + "type": "integer", + "format": "int64", + "name": "max-depth", + "in": "query" + } + ], + "responses": { + "200": { + "description": "getCheckResponse", + "schema": { + "$ref": "#/definitions/getCheckResponse" + } + }, + "400": { + "description": "genericError", + "schema": { + "$ref": "#/definitions/genericError" + } + }, + "403": { + "description": "getCheckResponse", + "schema": { + "$ref": "#/definitions/getCheckResponse" + } + }, + "500": { + "description": "genericError", + "schema": { + "$ref": "#/definitions/genericError" + } + } + } + } + }, + "/relation-tuples/expand": { + "get": { + "description": "Use this endpoint to expand a relation tuple.", + "consumes": ["application/x-www-form-urlencoded"], + "produces": ["application/json"], + "schemes": ["http", "https"], + "tags": ["read"], + "summary": "Expand a Relation Tuple", + "operationId": "getExpand", + "parameters": [ + { + "type": "string", + "description": "Namespace of the Subject Set", + "name": "namespace", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Object of the Subject Set", + "name": "object", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Relation of the Subject Set", + "name": "relation", + "in": "query", + "required": true + }, + { + "type": "integer", + "format": "int64", + "name": "max-depth", + "in": "query" + } + ], + "responses": { + "200": { + "description": "expandTree", + "schema": { + "$ref": "#/definitions/expandTree" + } + }, + "400": { + "description": "genericError", + "schema": { + "$ref": "#/definitions/genericError" + } + }, + "404": { + "description": "genericError", + "schema": { + "$ref": "#/definitions/genericError" + } + }, + "500": { + "description": "genericError", + "schema": { + "$ref": "#/definitions/genericError" + } + } + } + } + }, "/version": { "get": { "description": "This endpoint returns the service version typically notated using semantic versioning.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.", @@ -660,7 +660,7 @@ "getCheckResponse": { "description": "The content of the allowed field is mirrored in the HTTP status code.", "type": "object", - "title": "Represents the response for a check request.", + "title": "RESTResponse is the response for a check request.", "required": ["allowed"], "properties": { "allowed": {