SimpleVSC/sync_proto.binc

54 lines
949 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;
}
2021-08-26 13:13:36 +00:00
type PushObjectRequest {
id : string = 0;
type: string = 1;
data: bytes = 2;
}
type PushObjectResponse {
success: boolean = 0;
}
2021-08-11 15:19:57 +00:00
service Sync {
SyncInit(SyncInitRequest): SyncInitResponse;
PullGetLog(PullGetLogRequest): PullGetLogResponse;
PullObject(PullObjectRequest): PullObjectResponse;
2021-08-26 13:13:36 +00:00
PushObject(PushObjectRequest): PushObjectResponse;
2021-08-11 15:19:57 +00:00
}