diff options
| author | benj <benj@rse8.com> | 2022-12-30 15:57:36 -0800 |
|---|---|---|
| committer | benj <benj@rse8.com> | 2022-12-30 15:57:36 -0800 |
| commit | 8ca3433b2a4a82723e00e64b1e5aff0b1bed95b3 (patch) | |
| tree | 1ff85fd9fbd94a5559f9dbac755973fd58b31f28 /crates/secd/proto/authzed/api/v1/watch_service.proto | |
| parent | f0ea9ecd17b03605d747044874a26e1bd52c0ee1 (diff) | |
| download | secdiam-8ca3433b2a4a82723e00e64b1e5aff0b1bed95b3.tar secdiam-8ca3433b2a4a82723e00e64b1e5aff0b1bed95b3.tar.gz secdiam-8ca3433b2a4a82723e00e64b1e5aff0b1bed95b3.tar.bz2 secdiam-8ca3433b2a4a82723e00e64b1e5aff0b1bed95b3.tar.lz secdiam-8ca3433b2a4a82723e00e64b1e5aff0b1bed95b3.tar.xz secdiam-8ca3433b2a4a82723e00e64b1e5aff0b1bed95b3.tar.zst secdiam-8ca3433b2a4a82723e00e64b1e5aff0b1bed95b3.zip | |
impl authZ write and check (depends on spicedb for now)
Diffstat (limited to '')
| -rw-r--r-- | crates/secd/proto/authzed/api/v1/watch_service.proto | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/crates/secd/proto/authzed/api/v1/watch_service.proto b/crates/secd/proto/authzed/api/v1/watch_service.proto new file mode 100644 index 0000000..21aaccd --- /dev/null +++ b/crates/secd/proto/authzed/api/v1/watch_service.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; +package authzed.api.v1; + +option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1"; +option java_package = "com.authzed.api.v1"; + +import "google/api/annotations.proto"; +import "validate/validate.proto"; + +import "authzed/api/v1/core.proto"; + +service WatchService { + rpc Watch(WatchRequest) returns (stream WatchResponse) { + option (google.api.http) = { + post: "/v1/watch" + body: "*" + }; + } +} + +// WatchRequest specifies the object definitions for which we want to start +// watching mutations, and an optional start snapshot for when to start +// watching. +message WatchRequest { + repeated string optional_object_types = 1 [ + (validate.rules).repeated .min_items = 0, + (validate.rules).repeated .items.string = { + pattern : "^([a-z][a-z0-9_]{1,62}[a-z0-9]/" + ")?[a-z][a-z0-9_]{1,62}[a-z0-9]$", + max_bytes : 128, + } + ]; + + ZedToken optional_start_cursor = 2; +} + +// WatchResponse contains all tuple modification events in ascending +// timestamp order, from the requested start snapshot to a snapshot +// encoded in the watch response. The client can use the snapshot to resume +// watching where the previous watch response left off. +message WatchResponse { + repeated RelationshipUpdate updates = 1; + ZedToken changes_through = 2; +} |
