You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
synctv/proto/message/message.proto

44 lines
690 B
Protocol Buffer

syntax = "proto3";
option go_package = ".;pb";
package proto;
enum MessageType {
UNKNOWN = 0;
ERROR = 1;
CHAT = 2;
STATUS = 3;
CHECK_STATUS = 4;
EXPIRED = 5;
CURRENT = 6;
MOVIES = 7;
VIEWER_COUNT = 8;
SYNC = 9;
MY_STATUS = 10;
}
message Sender {
string user_id = 1;
string username = 2;
}
message Status {
bool is_playing = 1;
double current_time = 2;
double playback_rate = 3;
}
message Message {
MessageType type = 1;
sfixed64 timestamp = 2;
optional Sender sender = 3;
oneof payload {
string error_message = 4;
string chat_content = 5;
Status playback_status = 6;
fixed64 expiration_id = 7;
int64 viewer_count = 8;
}
}