47 lines
1.1 KiB
Protocol Buffer
47 lines
1.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
package sync;
|
|
option go_package = "syncpb";
|
|
|
|
import "pkg/acl/aclchanges/aclpb/protos/aclchanges.proto";
|
|
import "pkg/acl/treestorage/treepb/protos/tree.proto";
|
|
|
|
message Sync {
|
|
message Content {
|
|
ContentValue message = 1;
|
|
}
|
|
|
|
message ContentValue {
|
|
oneof value {
|
|
HeadUpdate headUpdate = 1;
|
|
Full.Request fullSyncRequest = 2;
|
|
Full.Response fullSyncResponse = 3;
|
|
}
|
|
}
|
|
|
|
message HeadUpdate {
|
|
repeated string heads = 1;
|
|
repeated acl.RawChange changes = 2;
|
|
string treeId = 3;
|
|
repeated string snapshotPath = 4;
|
|
tree.TreeHeader treeHeader = 5;
|
|
}
|
|
|
|
message Full {
|
|
// here with send the request with all changes we have (we already know sender's snapshot path)
|
|
message Request {
|
|
repeated string heads = 1;
|
|
repeated acl.RawChange changes = 2;
|
|
string treeId = 3;
|
|
repeated string snapshotPath = 4;
|
|
tree.TreeHeader treeHeader = 5;
|
|
}
|
|
|
|
message Response {
|
|
repeated string heads = 1;
|
|
repeated acl.RawChange changes = 2;
|
|
string treeId = 3;
|
|
repeated string snapshotPath = 4;
|
|
tree.TreeHeader treeHeader = 5;
|
|
}
|
|
}
|
|
} |