SimpleVSC/sync_proto.binc

43 lines
750 B
Plaintext
Raw Normal View History

2021-08-11 15:19:57 +00:00
type SyncInitRequest {
clientCommit: string = 0;
}
type SyncInitResponse {
remoteCommit: string = 0;
needPull : boolean = 1;
needPush : boolean = 2;
}
type Commit {
id : string = 0;
root : string = 1;
before: string = 2;
merge : string = 3;
date : uint64 = 4;
}
type PullGetLogRequest {
limit: uint32 = 0;
start: string = 1;
}
type PullGetLogResponse {
commits: Commit[] = 0;
}
type PullObjectRequest {
id : string = 0;
type: string = 1;
}
type PullObjectResponse {
found: boolean = 0;
data : bytes = 1;
}
service Sync {
SyncInit(SyncInitRequest): SyncInitResponse;
PullGetLog(PullGetLogRequest): PullGetLogResponse;
PullObject(PullObjectRequest): PullObjectResponse;
}