[#1902] tree: Extend grpc service with ListTrees method

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-10-18 16:03:03 +03:00 committed by Pavel Karpy
parent 24e9e3f3bf
commit 6d4beea187
5 changed files with 841 additions and 283 deletions

View file

@ -39,6 +39,8 @@ service TreeService {
rpc GetNodeByPath (GetNodeByPathRequest) returns (GetNodeByPathResponse);
// GetSubTree returns tree corresponding to a specific node.
rpc GetSubTree (GetSubTreeRequest) returns (stream GetSubTreeResponse);
// TreeList return list of the existing trees in the container.
rpc TreeList (TreeListRequest) returns (TreeListResponse);
/* Synchronization API */
@ -273,6 +275,29 @@ message GetSubTreeResponse {
Signature signature = 2;
};
message TreeListRequest {
message Body {
// Container ID in V2 format.
bytes container_id = 1;
}
// Request body.
Body body = 1;
// Request signature.
Signature signature = 2;
}
message TreeListResponse {
message Body {
// Tree IDs.
repeated string ids = 1;
}
// Response body.
Body body = 1;
Signature signature = 2;
}
message ApplyRequest {
message Body {