|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- syntax = "proto3";
- package pb;
- option go_package = "egg-im/pkg/pb/";
-
- enum PackageType {
- PT_UNKNOWN = 0;
- PT_SIGN_IN = 1;
- PT_SYNC = 2;
- PT_HEARTBEAT = 3;
- PT_MESSAGE = 4;
- PT_SUBSCRIBE_ROOM = 5;
- }
-
-
-
- message Message {
- Sender sender = 1;
- ReceiverType receiver_type = 2;
- int64 receiver_id = 3;
- repeated int64 to_user_ids = 4;
- MessageType message_type = 5;
- bytes message_content = 6;
- int64 seq = 7;
- int64 send_time = 8;
- MessageStatus status = 9;
- }
-
- message Sender {
- SenderType sender_type = 1;
- int64 sender_id = 2;
- int64 device_id = 3;
- string avatar_url = 4;
- string nickname = 5;
- string extra = 6;
- }
-
-
- enum MessageType {
- MT_UNKNOWN = 0;
- MT_TEXT = 1;
- MT_FACE = 2;
- MT_VOICE = 3;
- MT_IMAGE = 4;
- MT_FILE = 5;
- MT_LOCATION = 6;
- MT_COMMAND = 7;
- MT_CUSTOM = 8;
- MT_RECALL = 9;
- MT_RED_PACKAGE = 10;
- }
-
-
- enum RedPacketType {
- RPT_UNKNOWN = 0;
- RPT_FRIEND = 1;
- RPT_GROUP_NORMAL = 2;
- RPT_GROUP_LUCK = 3;
- RPT_GROUP_SPECIALLY = 4;
- RPT_SYSTEM_FOR = 5;
- }
-
-
- enum RedPacketMessageType {
- RMT_UNKNOWN = 0;
- RMT_SEND = 1;
- RMT_GRAB = 2;
- }
-
-
- enum RedPacketStatusType {
- RPS_NOT_DRAW = 0;
- RPS_DRAWING = 1;
- RPS_DRAW_OVER = 2;
- RPS_EXPIRE = 3;
- }
-
-
- message Text {
- string text = 1;
- }
-
-
- message Face {
- int64 face_id = 1;
- string face_url = 2;
- }
-
-
- message Voice {
- string id = 1;
- int32 size = 2;
- int32 duration = 3;
- string url = 4;
- }
-
-
- message Image {
- string id = 1;
- int32 width = 2;
- int32 height = 3;
- string url = 4;
- string thumbnail_url = 5;
- }
-
-
- message File {
- int64 id = 12;
- string name = 13;
- int64 size = 14;
- string url = 15;
- int32 width = 16;
- int32 height = 17;
- string thumbnail_url = 18;
- }
-
-
- message Location {
- string desc = 1;
- double latitude = 2;
- double longitude = 3;
- }
-
-
- message Command {
- int32 code = 1;
- bytes data = 2;
- }
-
-
- message Custom {
- string data = 1;
- }
-
-
- message RECALL {
- int64 recall_seq = 1;
- }
-
-
-
- message RED_PACKAGE {
- RedPacketMessageType red_message_type = 1;
- RedPacketType red_packet_type = 2;
- string red_packet_content = 3;
- float red_packet_amount = 6;
- int32 red_packet_nums = 5;
- float red_packet_balance_amount = 7;
- int64 received_user_id = 8;
- float received_user_amount = 9;
- string received_user_nickname = 10;
- RedPacketStatusType red_packet_status_type = 11;
- int64 red_packet_id = 12;
- int64 send_red_packet_uid = 13;
- string send_red_packet_nickname = 14;
- string send_red_packet_avatar_url = 15;
- string red_packet_small_content = 16;
- string red_packet_cover = 17;
- }
-
-
-
-
- message Input {
- PackageType type = 1;
- int64 request_id = 2;
- bytes data = 3;
- }
-
-
- message Output {
- PackageType type = 1;
- int64 request_id = 2;
- int32 code = 3;
- string message = 4;
- bytes data = 5;
- }
-
-
- message SignInInput {
- int64 device_id = 1;
- int64 user_id = 2;
- string token = 3;
- }
-
-
- message SyncInput {
- int64 seq = 1;
- }
-
- message SyncOutput {
- repeated Message messages = 1;
- bool has_more = 2;
- }
-
-
- message SubscribeRoomInput {
- int64 room_id = 1;
- int64 seq = 2;
- }
-
- enum ReceiverType {
- RT_UNKNOWN = 0;
- RT_USER = 1;
- RT_GROUP = 2;
- RT_ROOM = 3;
- }
-
-
- message MessageSend {
- Message message = 1;
- }
-
- enum SenderType {
- ST_UNKNOWN = 0;
- ST_SYSTEM = 1;
- ST_USER = 2;
- ST_BUSINESS = 3;
- }
-
- enum MessageStatus {
- MS_UNKNOWN = 0;
- MS_NORMAL = 1;
- MS_RECALL = 2;
- }
-
-
- message MessageACK {
- int64 device_ack = 2;
- int64 receive_time = 3;
- }
-
-
- enum GroupUserStatusType {
- GROUP_USER_STATUS_NORMAL = 0;
- GROUP_USER_STATUS_Banned = 1;
- }
|