hyperlog/crates/hyperlog-protos/proto/hyperlog.proto
kjuulh 9bb5bc9e87
All checks were successful
continuous-integration/drone/push Build is passing
feat: with async commands instead of inline mutations phew.
Signed-off-by: kjuulh <contact@kjuulh.io>
2024-05-12 21:07:21 +02:00

53 lines
910 B
Protocol Buffer

syntax = "proto3";
package hyperlog;
service Graph {
rpc GetAvailableRoots(GetAvailableRootsRequest) returns (GetAvailableRootsResponse);
rpc Get(GetRequest) returns (GetReply);
}
message GetAvailableRootsRequest {}
message GetAvailableRootsResponse {
repeated string roots = 1;
}
message UserGraphItem {
map<string, GraphItem> items = 1;
}
message SectionGraphItem {
map<string, GraphItem> items = 1;
}
message ItemStateNotDone {}
message ItemStateDone {}
message ItemGraphItem {
string title = 1;
string description = 2;
oneof item_state {
ItemStateNotDone not_done = 3;
ItemStateDone done = 4;
}
}
message GraphItem {
string path = 1;
oneof contents {
UserGraphItem user = 2;
SectionGraphItem section = 3;
ItemGraphItem item = 4;
}
}
message GetRequest {
string root = 1;
repeated string paths = 2;
}
message GetReply {
GraphItem item = 1;
}