mirror of https://github.com/kone-net/go-chat.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
862 B
16 lines
862 B
syntax = "proto3"; |
|
package protocol; |
|
|
|
message Message { |
|
string avatar = 1; //头像 |
|
string fromUsername = 2; // 发送消息用户的用户名 |
|
string from = 3; // 发送消息用户uuid |
|
string to = 4; // 发送给对端用户的uuid |
|
string content = 5; // 文本消息内容 |
|
int32 contentType = 6; // 消息内容类型:1.文字 2.普通文件 3.图片 4.音频 5.视频 6.语音聊天 7.视频聊天 |
|
string type = 7; // 如果是心跳消息,该内容为heatbeat |
|
int32 messageType = 8; // 消息类型,1.单聊 2.群聊 |
|
string url = 9; // 图片,视频,语音的路径 |
|
string fileSuffix = 10; // 文件后缀,如果通过二进制头不能解析文件后缀,使用该后缀 |
|
bytes file = 11; // 如果是图片,文件,视频等的二进制 |
|
} |