54 lines
949 B
Plaintext
54 lines
949 B
Plaintext
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;
|
|
}
|
|
|
|
type PushObjectRequest {
|
|
id : string = 0;
|
|
type: string = 1;
|
|
data: bytes = 2;
|
|
}
|
|
|
|
type PushObjectResponse {
|
|
success: boolean = 0;
|
|
}
|
|
|
|
service Sync {
|
|
SyncInit(SyncInitRequest): SyncInitResponse;
|
|
PullGetLog(PullGetLogRequest): PullGetLogResponse;
|
|
PullObject(PullObjectRequest): PullObjectResponse;
|
|
PushObject(PushObjectRequest): PushObjectResponse;
|
|
} |