|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- syntax = "proto3";
- package pb;
- option go_package = "egg-im/pkg/pb/";
-
- import "business.ext.proto";
- import "common.ext.proto";
- import "connect.ext.proto";
-
- service LogicExt {
-
- rpc RegisterDevice (RegisterDeviceReq) returns (RegisterDeviceResp);
-
-
- rpc SendMessage (SendMessageReq) returns (SendMessageResp);
-
- rpc RecallMessage (RecallMessageReq) returns (RecallMessageResp);
-
- rpc PushRoom(PushRoomReq)returns(Empty);
-
-
- rpc SendRedPacket (SendRedPacketReq) returns (SendRedPacketResp);
-
-
- rpc AddFriend (AddFriendReq) returns (Empty);
-
- rpc AgreeAddFriend (AgreeAddFriendReq) returns (Empty);
-
- rpc DeleteFriend (DeleteFriendReq) returns (Empty);
-
- rpc SetFriend (SetFriendReq) returns (SetFriendResp);
-
- rpc GetFriends (Empty) returns (GetFriendsResp);
-
-
- rpc CreateGroup (CreateGroupReq) returns (CreateGroupResp);
-
- rpc UpdateGroup (UpdateGroupReq) returns (Empty);
-
- rpc GetGroup (GetGroupReq) returns (GetGroupResp);
-
- rpc GetGroups (Empty) returns (GetGroupsResp);
-
-
- rpc AddGroupMembers (AddGroupMembersReq) returns (AddGroupMembersResp);
-
- rpc UpdateGroupMember (UpdateGroupMemberReq) returns (Empty);
-
- rpc DeleteGroupMember (DeleteGroupMemberReq) returns (Empty);
-
- rpc GetGroupMembers (GetGroupMembersReq) returns (GetGroupMembersResp);
-
- rpc SetGroupBannedMembers (SetGroupMemberBannedReq) returns (SetGroupMemberBannedResp);
-
- rpc SetGroupRemoveBannedMembers (SetGroupMemberRemoveBannedReq) returns (Empty);
-
- rpc GetGroupBannedMembers (GetGroupBannedMembersReq) returns (GetGroupBannedMembersResp);
-
- rpc SetGroupAddFriend (SetGroupAddFriendReq) returns (Empty);
- }
-
- message RegisterDeviceReq {
- int32 type = 2;
- string brand = 3;
- string model = 4;
- string system_version = 5;
- string sdk_version = 6;
- }
- message RegisterDeviceResp {
- int64 device_id = 1;
- }
-
- message SendMessageReq {
- ReceiverType receiver_type = 1;
- int64 receiver_id = 2;
- repeated int64 to_user_ids = 3;
- MessageType message_type = 4;
- bytes message_content = 5;
- int64 send_time = 6;
- bool is_persist = 7;
- string message_content_back = 8;
- }
- message SendMessageResp {
- int64 seq = 1;
- }
-
- message RecallMessageReq {
- ReceiverType receiver_type = 1;
- int64 receiver_id = 2;
- repeated int64 to_user_ids = 3;
- MessageType message_type = 4;
- bytes message_content = 5;
- int64 send_time = 6;
- bool is_persist = 7;
- string message_content_back = 8;
- }
- message RecallMessageResp {
- int64 seq = 1;
- }
-
-
- message SendRedPacketReq {
- ReceiverType receiver_type = 1;
- int64 receiver_id = 2;
- MessageType message_type = 3;
- bytes message_content = 4;
- int64 send_time = 5;
- repeated int64 to_user_ids = 6;
- string message_content_back = 7;
- }
- message SendRedPacketResp {
- int64 seq = 1;
- }
-
- message PushRoomReq{
- int64 room_id = 1;
- MessageType message_type = 2;
- bytes message_content = 3;
- int64 send_time = 4;
- bool is_persist = 5;
- bool is_priority = 6;
- }
-
- message AddFriendReq {
- int64 friend_id = 1;
- string remarks = 2;
- string description = 3;
- }
-
- message DeleteFriendReq {
- int64 user_id = 1;
- }
-
-
- message AgreeAddFriendReq {
- int64 user_id = 1;
- string remarks = 2;
- }
-
- message SetFriendReq {
- int64 friend_id = 1;
- string remarks = 2;
- string extra = 8;
- }
- message SetFriendResp {
- int64 friend_id = 1;
- string remarks = 2;
- string extra = 8;
- }
-
- message Friend {
- int64 user_id = 1;
- string phone_number = 2;
- string nickname = 3;
- int32 sex = 4;
- string avatar_url = 5;
- string user_extra = 6;
- string remarks = 7;
- string extra = 8;
- }
- message GetFriendsResp {
- repeated Friend friends = 1;
- }
-
- message CreateGroupReq {
- string name = 1;
- string avatar_url = 2;
- string introduction = 3;
- string extra = 4;
- repeated int64 member_ids = 5;
- }
- message CreateGroupResp {
- int64 group_id = 1;
- }
-
- message UpdateGroupReq {
- int64 group_id = 1;
- string avatar_url = 2;
- string name = 3;
- string introduction = 4;
- string extra = 5;
- }
-
- message GetGroupReq {
- int64 group_id = 1;
- }
- message GetGroupResp {
- Group group = 1;
- MemberType member_type = 2;
- GroupUserStatusType group_user_status_type = 3;
- GroupNotice group_notice = 4;
- }
-
- message GroupNotice {
- string content = 1;
- GroupNoticePublishType publish_type = 2;
- string publish_time = 3;
- }
-
-
- message Group {
- int64 group_id = 1;
- string name = 2;
- string avatar_url = 3;
- string introduction = 4;
- int32 user_mum = 5;
- int32 is_all_member_banned = 6;
- int32 is_all_add_friend = 10;
- string extra = 7;
- int64 create_time = 8;
- int64 update_time = 9;
- }
-
- message GetGroupsResp {
- repeated Group groups = 1;
- }
-
- message AddGroupMembersReq {
- int64 group_id = 1;
- repeated int64 user_ids = 2;
- }
- message AddGroupMembersResp {
- repeated int64 user_ids = 1;
- }
-
- enum MemberType {
- GMT_UNKNOWN = 0;
- GMT_ADMIN = 1;
- GMT_MEMBER = 2;
- GMT_MANAGE = 3;
- }
-
- message UpdateGroupMemberReq {
- int64 group_id = 1;
- int64 user_id = 2;
- MemberType member_type = 3;
- string remarks = 4;
- string extra = 5;
- }
-
- message DeleteGroupMemberReq {
- int64 group_id = 1;
- int64 user_id = 2;
- }
-
- message GetGroupMembersReq {
- int64 group_id = 1;
- int64 limit = 2;
- }
- message GetGroupMembersResp {
- repeated GroupMember members = 1;
- }
- message GroupMember {
- int64 user_id = 1;
- string nickname = 2;
- int32 sex = 3;
- string avatar_url = 4;
- string user_extra = 5;
- MemberType member_type = 6;
- string remarks = 7;
- string extra = 8;
- int32 status = 9;
- }
-
- message SetGroupMemberBannedReq {
- int64 group_id = 1;
- repeated int64 user_ids = 2;
- AllMemberBannedType is_all_member_banned = 3;
- }
-
- message SetGroupMemberRemoveBannedReq {
- int64 group_id = 1;
- repeated int64 remove_user_ids = 2;
- }
-
- enum AllMemberBannedType {
- UNKNOWN_All_Member_Banned = 0;
- YES_All_Member_Banned = 1;
- NOT_All_Member_Banned = 2;
- }
-
- message SetGroupMemberBannedResp {
- AllMemberBannedType is_all_member_banned = 3;
- repeated GroupMember members = 1;
- }
-
- message GetGroupBannedMembersReq {
- int64 group_id = 1;
- }
-
- message GetGroupBannedMembersResp {
- repeated GroupMember members = 1;
- }
-
- enum AllAddFriendType {
- UNKNOWN_All_Add_Friend = 0;
- YES_All_Add_Friend = 1;
- NOT_All_Add_Friend = 2;
- }
- message SetGroupAddFriendReq {
- int64 group_id = 1;
- AllAddFriendType is_all_add_friend = 2;
- }
-
|