Skip to content

Commit 8eef93a

Browse files
committed
adds experimental materialize stats service
1 parent d5fc38f commit 8eef93a

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
syntax = "proto3";
2+
package authzed.api.materialize.v0;
3+
4+
import "authzed/api/v1/core.proto";
5+
import "authzed/api/v1/permission_service.proto";
6+
7+
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/materialize/v0";
8+
option java_multiple_files = true;
9+
option java_package = "com.authzed.api.materialize.v0";
10+
11+
service StatsService {
12+
rpc ExperimentalCountLookupResources(ExperimentalCountLookupResourcesRequest) returns (ExperimentalCountLookupResourcesResponse) {}
13+
rpc ExperimentalCountLookupSubjects(ExperimentalCountLookupResourcesRequest) returns (ExperimentalCountLookupResourcesResponse) {}
14+
}
15+
16+
message ExperimentalCountLookupResourcesRequest {
17+
string resource_object_type = 1;
18+
string permission = 2;
19+
authzed.api.v1.SubjectReference subject = 3;
20+
}
21+
22+
message ExperimentalCountLookupResourcesResponse {
23+
uint64 resource_count = 1;
24+
authzed.api.v1.ZedToken read_at = 2;
25+
}
26+
27+
message ExperimentalCountLookupSubjectsRequest {
28+
authzed.api.v1.ObjectReference resource = 1;
29+
string permission = 2;
30+
string subject_object_type = 3;
31+
string optional_subject_relation = 4;
32+
}
33+
34+
message ExperimentalCountLookupSubjectsResponse {
35+
uint64 subject_count = 1;
36+
authzed.api.v1.ZedToken read_at = 2;
37+
}

0 commit comments

Comments
 (0)