mirror of
https://github.com/hexedtech/codemp-proto.git
synced 2024-12-24 14:24:52 +01:00
25 lines
593 B
Protocol Buffer
25 lines
593 B
Protocol Buffer
syntax = "proto2";
|
|
|
|
import "common.proto";
|
|
|
|
package buffer;
|
|
|
|
// Handles buffer changes and keeps users in sync.
|
|
service Buffer {
|
|
// Attach to a buffer and receive operations.
|
|
rpc Attach (stream Operation) returns (stream BufferEvent);
|
|
}
|
|
|
|
// Message representing an operation that has occurred.
|
|
message Operation {
|
|
// The data of this operation.
|
|
required bytes data = 1;
|
|
}
|
|
|
|
// Message representing an event that happened in a buffer.
|
|
message BufferEvent {
|
|
// The operation that occurred.
|
|
required Operation op = 1;
|
|
// The user that sent this event.
|
|
required common.Identity user = 2;
|
|
}
|