codemp-vscode/proto/buffer.proto

36 lines
666 B
Protocol Buffer
Raw Normal View History

syntax = "proto3";
2023-08-16 17:08:31 +02:00
package codemp.buffer;
service Buffer {
rpc Attach (BufferPayload) returns (stream RawOp);
2023-08-16 17:08:31 +02:00
rpc Edit (OperationRequest) returns (BufferEditResponse);
rpc Create (BufferPayload) returns (BufferCreateResponse);
2023-04-11 22:35:10 +02:00
rpc Sync (BufferPayload) returns (BufferResponse);
}
2023-08-16 17:08:31 +02:00
message BufferCreateResponse {}
message BufferEditResponse {}
message RawOp {
string opseq = 1;
string user = 2;
2023-04-12 03:29:42 +02:00
}
message OperationRequest {
string path = 1;
string hash = 2;
string opseq = 3;
string user = 4;
}
message BufferPayload {
string path = 1;
string user = 2;
optional string content = 3;
}
message BufferResponse {
2023-08-16 17:08:31 +02:00
string content = 2;
}