Browse Source

first commit

tags/v0.0.1
dengbiao 1 month ago
commit
acf9e2d360
20 changed files with 13263 additions and 0 deletions
  1. +65
    -0
      README.md
  2. +124
    -0
      gim/business.ext.proto
  3. +28
    -0
      gim/business.int.proto
  4. +5
    -0
      gim/common.ext.proto
  5. +236
    -0
      gim/connect.ext.proto
  6. +28
    -0
      gim/connect.int.proto
  7. +294
    -0
      gim/logic.ext.proto
  8. +102
    -0
      gim/logic.int.proto
  9. +1814
    -0
      gim/pb/business.ext.pb.go
  10. +491
    -0
      gim/pb/business.int.pb.go
  11. +131
    -0
      gim/pb/common.ext.pb.go
  12. +2490
    -0
      gim/pb/connect.ext.pb.go
  13. +404
    -0
      gim/pb/connect.int.pb.go
  14. +20
    -0
      gim/pb/go.mod
  15. +21
    -0
      gim/pb/go.sum
  16. +4403
    -0
      gim/pb/logic.ext.pb.go
  17. +1556
    -0
      gim/pb/logic.int.pb.go
  18. +956
    -0
      gim/pb/push.ext.pb.go
  19. +95
    -0
      gim/push.ext.proto
  20. BIN
     

+ 65
- 0
README.md View File

@@ -0,0 +1,65 @@
## 简要介绍
### 什么是 grpc ?
```azure
gRPC是rpc框架中的一种,是一个高性能,开源和通用的RPC框架,基于Protobuf序列化协议开发,且支持众多开发语言。

gRPC可以通俗的理解为google对于RPC的一种实现形式。
```

### grpc 特性
```azure
grpc可以跨语言使用。支持多种语言 支持C++、Java、Go、Python、Ruby、C#、Node.js、Android Java、Objective-C、PHP等编程语言
基于 IDL ( 接口定义语言(Interface Define Language))文件定义服务,通过 proto3 工具生成指定语言的数据结构、服务端接口以及客户端 Stub;
通信协议基于标准的 HTTP/2 设计,支持·双向流、消息头压缩、单 TCP 的多路复用、服务端推送等特性,这些特性使得 gRPC 在移动端设备上更加省电和节省网络流量;
序列化支持 PB(Protocol Buffer)和 JSON,PB 是一种语言无关的高性能序列化框架,基于 HTTP/2 + PB, 保障了 RPC 调用的高性能。
安装简单,扩展方便(用该框架每秒可达到百万个RPC)
```

### 什么是 Protocol Buffers ?
```azure
gRPC默认使用protocl buffers(简称 Protobuf),Protobuf 是谷歌成熟的开源的用于结构化数据序列化的机制存储方案,类似于XML、Json。
```
![image-20220113153420444](static/images/protocol.webp)


### 使用Protocol Buffers

- 第一步:使用 .proto文件(以.proto为后缀的二进制文本文件)定义待序列化数据的结构
```azure
message Person {
string name = 1;
int32 id = 2;
bool has_ponycopter = 3;
}
```
- 第二步:使用 protocol buffer 的编译器protoc从proto定义生成选择语言的数据接入层类。
```azure
// greeter 服务定义.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
}

// 客户端请求消息包含用户名.
message HelloRequest {
string name = 1;
}

// 服务端响应包含一条greeting消息
message HelloReply {
string message = 1;
}
```

gRPC使用带有特殊gRPC插件的protoc来生成proto文件中的代码。 但是,使用gRPC插件,您可以生成gRPC客户端和服务器代码,以及用于填充,序列化和检索消息类型的常规protocol buffer 代码。你可以从Protocol Buffers文档中获取到更多有关protocol buffer的信息,并能够获取到如何获取安装和你选定语言相关的protoc。

### Protocol buffer 版本

```
虽然protocol buffer 被开源用户使用已经有一段时间,但我们的示例使用了一种新的protocol buffer,称为proto3,它具有略微简化的语法,一些有用的新功能,并支持更多语言。
proto3目前已经支持Java,C++,Python,Objective-C,C#,Ruby和JavaScript,也实现了对Go语言的支持。
通常,虽然也可以使用proto2(当前默认protocol buffer版本),但建议将proto3与gRPC一起使用,因为它允许您使用全系列gRPC支持的语言,
并避免使用proto2客户端与使用proto3服务端通信时的兼容性问题,反之亦然。
```


+ 124
- 0
gim/business.ext.proto View File

@@ -0,0 +1,124 @@
syntax = "proto3";
package pb;
option go_package = "gim/pkg/pb/";

import "common.ext.proto";

service BusinessExt {
// 登录
rpc SignIn (SignInReq) returns (SignInResp);
// 获取用户信息
rpc GetUser (GetUserReq) returns (GetUserResp);
// 更新用户信息
rpc UpdateUser (UpdateUserReq) returns (Empty);
// 搜索用户(这里简单数据库实现,生产环境建议使用ES)
rpc SearchUser (SearchUserReq) returns (SearchUserResp);
// 上传文件至云端
rpc CloudUploadFile (CloudUploadFileReq) returns (CloudUploadFileResp);
// 获取表情
rpc EmoticonList (Empty) returns (EmoticonListResp);
// 判断是否为好友关系
rpc IsFriends (IsFriendsReq) returns (IsFriendsResp);
// 投诉群
rpc ComplainGroup (ComplainGroupReq) returns (Empty);
}


message ComplainGroupReq {
int64 group_id = 1;
ComplainType complain_type = 2; // 投诉类型
string text = 3; // 投诉内容
repeated string image_list = 4; // 图片
}

// 消息类型
enum ComplainType {
CT_UNKNOWN = 0; // 未知
CT_GAMBLE = 1; // 存在赌博行为
MT_DEFRAUD = 2; // 存在骗钱行为
MT_HARASS = 3; // 不当信息骚扰
MT_RUMOUR = 4; // 传播谣言
MT_COUNTERFEIT_GOODS_INFO = 5; // 发布假冒商品信息
MT_VIOLATION_OF_MINORS = 6; // 侵犯未成年人权益
MT_OTHER = 7; // 其他
}


message IsFriendsReq {
string user_phone = 1;
string friend_phone = 2;
}

message IsFriendsResp {
int64 is_friend = 1;
User user = 2; // 用户信息
}

message Emoticon {
string name = 1; // 名称
string img_url = 2; // 图片地址
string memo = 3; // 备注
int32 sort = 4; // 排序
}
message EmoticonListResp {
repeated Emoticon emoticons = 1;
}
message SignInReq {
string phone_number = 1; // 手机号
string code = 2; // 验证码
int64 device_id = 3; // 设备id
string push_alia = 4; // 极光推送-别名
string nickname = 5; // 昵称
string avatar_url = 6; // 头像地址
}
message SignInResp {
bool is_new = 1; // 是否是新用户
int64 user_id = 2; // 用户id
string token = 3; // token
}
message CloudUploadFileReq {
string dir = 1; // 目录名
string file_name = 2; // 上传原文件名称
string file_size = 3; // 文件大小
}
message CloudUploadFileResp {
string method = 1; // 请求方式
string host = 2; // 域名
string key = 3; // key
string token = 4; // token
}

message User {
int64 user_id = 1; // 用户id
string nickname = 2; // 昵称
int32 sex = 3; // 性别
string avatar_url = 4; // 头像地址
string extra = 5; // 附加字段
int64 create_time = 6; // 创建时间
int64 update_time = 7; // 更新时间
int64 is_auto_added_friends = 8; // 是否自动被添加好友
string phone_number = 9; // 手机号
}

message GetUserReq {
int64 user_id = 1; // 用户id
string phone = 2; // 用户手机号
}
message GetUserResp {
User user = 1; // 用户信息
}

message UpdateUserReq {
string nickname = 1; // 昵称
int32 sex = 2; // 性别
string avatar_url = 3; // 头像地址
string extra = 4; // 附加字段
}

message SearchUserReq{
string key = 1;
}
message SearchUserResp{
repeated User users = 1;
}


+ 28
- 0
gim/business.int.proto View File

@@ -0,0 +1,28 @@
syntax = "proto3";
package pb;
option go_package = "gim/pkg/pb/";

import "common.ext.proto";
import "business.ext.proto";

service BusinessInt {
// 权限校验
rpc Auth (AuthReq) returns (Empty);
// 批量获取用户信息
rpc GetUser (GetUserReq) returns (GetUserResp);
// 批量获取用户信息
rpc GetUsers (GetUsersReq) returns (GetUsersResp);
}

message AuthReq {
int64 user_id = 1;
int64 device_id = 2;
string token = 3;
}

message GetUsersReq {
map<int64, int32> user_ids = 1; // 用户id
}
message GetUsersResp {
map<int64, User> users = 1; // 用户信息
}

+ 5
- 0
gim/common.ext.proto View File

@@ -0,0 +1,5 @@
syntax = "proto3";
package pb;
option go_package = "gim/pkg/pb/";

message Empty{}

+ 236
- 0
gim/connect.ext.proto View File

@@ -0,0 +1,236 @@
syntax = "proto3";
package pb;
option go_package = "gim/pkg/pb/";

enum PackageType {
PT_UNKNOWN = 0; // 未知
PT_SIGN_IN = 1; // 设备登录请求
PT_SYNC = 2; // 消息同步触发
PT_HEARTBEAT = 3; // 心跳
PT_MESSAGE = 4; // 消息投递
PT_SUBSCRIBE_ROOM = 5; // 订阅房间
}

/************************************消息体定义开始************************************/
// 单条消息投递内容(估算大约100个字节),todo 通知栏提醒
message Message {
Sender sender = 1; // 发送者
ReceiverType receiver_type = 2; // 接收者类型,1:user;2:group
int64 receiver_id = 3; // 用户id或者群组id
repeated int64 to_user_ids = 4; // 需要@的用户id列表
MessageType message_type = 5; // 消息类型
bytes message_content = 6; // 消息内容
int64 seq = 7; // 用户消息发送序列号
int64 send_time = 8; // 消息发送时间戳,精确到毫秒
MessageStatus status = 9; // 消息状态
}

message Sender {
SenderType sender_type = 1; // 发送者类型,1:系统,2:用户,3:第三方业务系统
int64 sender_id = 2; // 发送者id
int64 device_id = 3; // 发送者设备id
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; // 语音包id
int32 size = 2; // 语音包大小
int32 duration = 3; // 语音时长
string url = 4; // 语音文件URL
}

// 图片消息
message Image {
string id = 1; // 图片id
int32 width = 2; // 图片宽度
int32 height = 3; // 图片长度
string url = 4; // 图片URL
string thumbnail_url = 5; // 图片缩略图url
}

// 文件消息
message File {
int64 id = 12; // 文件id
string name = 13; // 文件名
int64 size = 14; // 文件大小
string url = 15; // 文件url
int32 width = 16; // 文件宽度
int32 height = 17; // 文件长度
string thumbnail_url = 18; // 文件缩略图url
}

// 地理位置消息
message Location {
string desc = 1; // 描述
double latitude = 2; // 经度
double longitude = 3; // 纬度
}

// Command 指令推送,1000以下,IM内部用,1000以上,留给业务用
message Command {
int32 code = 1; // 指令码
bytes data = 2; // 数据内容
}

// 自定义消息
message Custom {
string data = 1; // 自定义数据
}

// 撤回消息
message RECALL {
int64 recall_seq = 1; // 撤回消息seq
}


// 红包消息
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; // 领取用户id
float received_user_amount = 9; // 领取用户金额
string received_user_nickname = 10; // 领取用户昵称
RedPacketStatusType red_packet_status_type = 11; // 领取状态
int64 red_packet_id = 12; // 红包id
int64 send_red_packet_uid = 13; // 红包发送者uid
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; // 请求id
bytes data = 3; // 数据
}

// 下行数据
message Output {
PackageType type = 1; // 包的类型
int64 request_id = 2; // 请求id
int32 code = 3; // 错误码
string message = 4; // 错误信息
bytes data = 5; // 数据
}

// 设备登录,package_type:1
message SignInInput {
int64 device_id = 1; // 设备id
int64 user_id = 2; // 用户id
string token = 3; // 秘钥
}

// 消息同步请求,package_type:2
message SyncInput {
int64 seq = 1; // 客户端已经同步的序列号
}
// 消息同步响应,package_type:2
message SyncOutput {
repeated Message messages = 1; // 消息列表
bool has_more = 2; // 是否有更多数据
}

// 订阅房间请求
message SubscribeRoomInput {
int64 room_id = 1; // 房间ID,如果为0,取消房间订阅
int64 seq = 2; // 消息消息序列号,
}

enum ReceiverType {
RT_UNKNOWN = 0; // 未知
RT_USER = 1; // 用户
RT_GROUP = 2; // 群组
RT_ROOM = 3; // 房间
}

// 消息投递,package_type:4
message MessageSend {
Message message = 1; // 消息
}

enum SenderType {
ST_UNKNOWN = 0; // 未知的
ST_SYSTEM = 1; // IM系统
ST_USER = 2; // 用户
ST_BUSINESS = 3; // 业务方
}

enum MessageStatus {
MS_UNKNOWN = 0; // 未知的
MS_NORMAL = 1; // 正常的
MS_RECALL = 2; // 撤回
}

// 投递消息回执,package_type:4
message MessageACK {
int64 device_ack = 2; // 设备收到消息的确认号
int64 receive_time = 3; // 消息接收时间戳,精确到毫秒
}

// 群组用户状态
enum GroupUserStatusType {
GROUP_USER_STATUS_NORMAL = 0; // 正常
GROUP_USER_STATUS_Banned = 1; // 禁言
}

+ 28
- 0
gim/connect.int.proto View File

@@ -0,0 +1,28 @@
syntax = "proto3";
package pb;
option go_package = "gim/pkg/pb/";

import "common.ext.proto";
import "connect.ext.proto";

service ConnectInt {
// 消息投递
rpc DeliverMessage (DeliverMessageReq) returns (Empty);
}

message DeliverMessageReq {
int64 device_id = 1; // 设备id
MessageSend message_send = 2; // 数据
}

// 房间推送
message PushRoomMsg{
int64 room_id = 1; // 设备id
MessageSend message_send = 2; // 数据
}

// 房间推送
message PushAllMsg{
MessageSend message_send = 2; // 数据
}


+ 294
- 0
gim/logic.ext.proto View File

@@ -0,0 +1,294 @@
syntax = "proto3";
package pb;
option go_package = "gim/pkg/pb/";

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; // sdk版本号
}
message RegisterDeviceResp {
int64 device_id = 1; // 设备id
}

message SendMessageReq {
ReceiverType receiver_type = 1; // 接收者类型,1:user;2:group
int64 receiver_id = 2; // 用户id或者群组id
repeated int64 to_user_ids = 3; // 需要@的用户id列表
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; // 接收者类型,1:user;2:group
int64 receiver_id = 2; // 用户id或者群组id
repeated int64 to_user_ids = 3; // 需要@的用户id列表
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; // 接收者类型,1:user;2:group
int64 receiver_id = 2; // 用户id或者群组id
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; // 房间id
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; // 用户id
string remarks = 2; // 备注
string description = 3; // 描述
}

message DeleteFriendReq {
int64 user_id = 1; // 用户id
}


message AgreeAddFriendReq {
int64 user_id = 1; // 用户id
string remarks = 2; // 备注
}

message SetFriendReq {
int64 friend_id = 1; // 好友id
string remarks = 2; // 备注
string extra = 8; // 附加字段
}
message SetFriendResp {
int64 friend_id = 1; // 好友id
string remarks = 2; // 备注
string extra = 8; // 附加字段
}

message Friend {
int64 user_id = 1; // 用户id
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; // 群组成员ID列表
}
message CreateGroupResp {
int64 group_id = 1; // 群组id
}

message UpdateGroupReq {
int64 group_id = 1; // 群组id
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;
}

message Group {
int64 group_id = 1; // 群组id
string name = 2; // 名称
string avatar_url = 3; // 头像
string introduction = 4; // 简介
int32 user_mum = 5; // 用户数
int32 is_all_member_banned = 6; // 是否全员禁言(1:是 2:否)
int32 is_all_add_friend = 10; // 是否允许加好友(1:是 2:否)
string extra = 7; // 附加字段
int64 create_time = 8; // 创建时间
int64 update_time = 9; // 更新时间
}

message GetGroupsResp {
repeated Group groups = 1;
}

message AddGroupMembersReq {
int64 group_id = 1; // 群组id
repeated int64 user_ids = 2; // 用户id列表
}
message AddGroupMembersResp {
repeated int64 user_ids = 1; // 已经在群组的用户id列表
}

enum MemberType {
GMT_UNKNOWN = 0; // 未知
GMT_ADMIN = 1; // 群主
GMT_MEMBER = 2; // 成员
GMT_MANAGE = 3; // 管理员
}

message UpdateGroupMemberReq {
int64 group_id = 1; // 群组id
int64 user_id = 2; // 用户id
MemberType member_type = 3; // 成员类型
string remarks = 4; // 备注
string extra = 5; // 附加字段
}

message DeleteGroupMemberReq {
int64 group_id = 1; // 群组id
int64 user_id = 2; // 用户id
}

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; // 群组id
repeated int64 user_ids = 2; // 用户id列表
AllMemberBannedType is_all_member_banned = 3; // 全员禁言(1:是 2:否)
}

message SetGroupMemberRemoveBannedReq {
int64 group_id = 1; // 群组id
repeated int64 remove_user_ids = 2; // 解除用户id列表
}

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; // 全员禁言(1:是 2:否)
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; // 群组id
AllAddFriendType is_all_add_friend = 2; // 是否允许加好友(1:是 2:否)
}


+ 102
- 0
gim/logic.int.proto View File

@@ -0,0 +1,102 @@
syntax = "proto3";
package pb;
option go_package = "gim/pkg/pb/";

import "common.ext.proto";
import "connect.ext.proto";
import "logic.ext.proto";

service LogicInt {
// 登录
rpc ConnSignIn (ConnSignInReq) returns (Empty);
// 消息同步
rpc Sync (SyncReq) returns (SyncResp);
// 设备收到消息回执
rpc MessageACK (MessageACKReq) returns (Empty);
// 设备离线
rpc Offline (OfflineReq) returns (Empty);
// 订阅房间
rpc SubscribeRoom(SubscribeRoomReq)returns(Empty);
// 发送消息
rpc SendMessage (SendMessageReq) returns (SendMessageResp);
// 推送消息到房间
rpc PushRoom(PushRoomReq)returns(Empty);
// 全服推送
rpc PushAll(PushAllReq)returns(Empty);

// 获取设备信息
rpc GetDevice (GetDeviceReq) returns (GetDeviceResp);
// 服务停止
rpc ServerStop (ServerStopReq) returns (Empty);
}

message ConnSignInReq {
int64 device_id = 1; // 设备id
int64 user_id = 2; // 用户id
string token = 3; // 秘钥
string conn_addr = 4; // 服务器地址
string client_addr = 5; // 客户端地址
}

message SyncReq {
int64 user_id = 1; // 用户id
int64 device_id = 2; // 设备id
int64 seq = 3; // 客户端已经同步的序列号
}
message SyncResp {
repeated Message messages = 1; // 消息列表
bool has_more = 2; // 是否有更多数据
}

message MessageACKReq {
int64 user_id = 1; // 用户id
int64 device_id = 2; // 设备id
int64 device_ack = 3; // 设备收到消息的确认号
int64 receive_time = 4; // 消息接收时间戳,精确到毫秒
}

message OfflineReq {
int64 user_id = 1; // 用户id
int64 device_id = 2; // 设备id
string client_addr = 3; // 客户端地址
}

message SubscribeRoomReq{
int64 user_id = 1; // 用户id
int64 device_id = 2; // 设备id
int64 room_id = 3; // 房间id
int64 seq = 4; // 消息序列号
string conn_addr = 5; // 服务器地址
}

message PushAllReq{
MessageType message_type = 1; // 消息类型
bytes message_content = 2; // 消息内容
int64 send_time = 3; // 消息发送时间戳,精确到毫秒
}

message GetDeviceReq {
int64 device_id = 1;
}
message GetDeviceResp {
Device device = 1;
}

message Device {
int64 device_id = 1; // 设备id
int64 user_id = 2; // 用户id
int32 type = 3; // 设备类型,1:Android;2:IOS;3:Windows; 4:MacOS;5:Web
string brand = 4; // 手机厂商
string model = 5; // 机型
string system_version = 6; // 系统版本
string sdk_version = 7; // SDK版本
int32 status = 8; // 在线状态,0:不在线;1:在线
string conn_addr = 9; // 服务端连接地址
string client_addr = 10; // 客户端地址
int64 create_time = 11; // 创建时间
int64 update_time = 12; // 更新时间
}

message ServerStopReq {
string conn_addr = 1;
}

+ 1814
- 0
gim/pb/business.ext.pb.go
File diff suppressed because it is too large
View File


+ 491
- 0
gim/pb/business.int.pb.go View File

@@ -0,0 +1,491 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.20.0--rc2
// source: business.int.proto

package pb

import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)

const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type AuthReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
DeviceId int64 `protobuf:"varint,2,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
}

func (x *AuthReq) Reset() {
*x = AuthReq{}
if protoimpl.UnsafeEnabled {
mi := &file_business_int_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *AuthReq) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*AuthReq) ProtoMessage() {}

func (x *AuthReq) ProtoReflect() protoreflect.Message {
mi := &file_business_int_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}

// Deprecated: Use AuthReq.ProtoReflect.Descriptor instead.
func (*AuthReq) Descriptor() ([]byte, []int) {
return file_business_int_proto_rawDescGZIP(), []int{0}
}

func (x *AuthReq) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}

func (x *AuthReq) GetDeviceId() int64 {
if x != nil {
return x.DeviceId
}
return 0
}

func (x *AuthReq) GetToken() string {
if x != nil {
return x.Token
}
return ""
}

type GetUsersReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

UserIds map[int64]int32 `protobuf:"bytes,1,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 用户id
}

func (x *GetUsersReq) Reset() {
*x = GetUsersReq{}
if protoimpl.UnsafeEnabled {
mi := &file_business_int_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *GetUsersReq) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*GetUsersReq) ProtoMessage() {}

func (x *GetUsersReq) ProtoReflect() protoreflect.Message {
mi := &file_business_int_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}

// Deprecated: Use GetUsersReq.ProtoReflect.Descriptor instead.
func (*GetUsersReq) Descriptor() ([]byte, []int) {
return file_business_int_proto_rawDescGZIP(), []int{1}
}

func (x *GetUsersReq) GetUserIds() map[int64]int32 {
if x != nil {
return x.UserIds
}
return nil
}

type GetUsersResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

Users map[int64]*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 用户信息
}

func (x *GetUsersResp) Reset() {
*x = GetUsersResp{}
if protoimpl.UnsafeEnabled {
mi := &file_business_int_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *GetUsersResp) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*GetUsersResp) ProtoMessage() {}

func (x *GetUsersResp) ProtoReflect() protoreflect.Message {
mi := &file_business_int_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}

// Deprecated: Use GetUsersResp.ProtoReflect.Descriptor instead.
func (*GetUsersResp) Descriptor() ([]byte, []int) {
return file_business_int_proto_rawDescGZIP(), []int{2}
}

func (x *GetUsersResp) GetUsers() map[int64]*User {
if x != nil {
return x.Users
}
return nil
}

var File_business_int_proto protoreflect.FileDescriptor

var file_business_int_proto_rawDesc = []byte{
0x0a, 0x12, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x2e, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x62, 0x75, 0x73, 0x69,
0x6e, 0x65, 0x73, 0x73, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x55,
0x0a, 0x07, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65,
0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72,
0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12,
0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x82, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65,
0x72, 0x73, 0x52, 0x65, 0x71, 0x12, 0x37, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64,
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74,
0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x73,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x73, 0x1a, 0x3a,
0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x85, 0x01, 0x0a, 0x0c, 0x47,
0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x31, 0x0a, 0x05, 0x75,
0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x62, 0x2e,
0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x55, 0x73, 0x65,
0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x1a, 0x42,
0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1e,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e,
0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
0x38, 0x01, 0x32, 0x88, 0x01, 0x0a, 0x0b, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x49,
0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x04, 0x41, 0x75, 0x74, 0x68, 0x12, 0x0b, 0x2e, 0x70, 0x62, 0x2e,
0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x12, 0x2a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x2e,
0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e,
0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d,
0x0a, 0x08, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x0f, 0x2e, 0x70, 0x62, 0x2e,
0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62,
0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0d, 0x5a,
0x0b, 0x67, 0x69, 0x6d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}

var (
file_business_int_proto_rawDescOnce sync.Once
file_business_int_proto_rawDescData = file_business_int_proto_rawDesc
)

func file_business_int_proto_rawDescGZIP() []byte {
file_business_int_proto_rawDescOnce.Do(func() {
file_business_int_proto_rawDescData = protoimpl.X.CompressGZIP(file_business_int_proto_rawDescData)
})
return file_business_int_proto_rawDescData
}

var file_business_int_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_business_int_proto_goTypes = []interface{}{
(*AuthReq)(nil), // 0: pb.AuthReq
(*GetUsersReq)(nil), // 1: pb.GetUsersReq
(*GetUsersResp)(nil), // 2: pb.GetUsersResp
nil, // 3: pb.GetUsersReq.UserIdsEntry
nil, // 4: pb.GetUsersResp.UsersEntry
(*User)(nil), // 5: pb.User
(*GetUserReq)(nil), // 6: pb.GetUserReq
(*Empty)(nil), // 7: pb.Empty
(*GetUserResp)(nil), // 8: pb.GetUserResp
}
var file_business_int_proto_depIdxs = []int32{
3, // 0: pb.GetUsersReq.user_ids:type_name -> pb.GetUsersReq.UserIdsEntry
4, // 1: pb.GetUsersResp.users:type_name -> pb.GetUsersResp.UsersEntry
5, // 2: pb.GetUsersResp.UsersEntry.value:type_name -> pb.User
0, // 3: pb.BusinessInt.Auth:input_type -> pb.AuthReq
6, // 4: pb.BusinessInt.GetUser:input_type -> pb.GetUserReq
1, // 5: pb.BusinessInt.GetUsers:input_type -> pb.GetUsersReq
7, // 6: pb.BusinessInt.Auth:output_type -> pb.Empty
8, // 7: pb.BusinessInt.GetUser:output_type -> pb.GetUserResp
2, // 8: pb.BusinessInt.GetUsers:output_type -> pb.GetUsersResp
6, // [6:9] is the sub-list for method output_type
3, // [3:6] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}

func init() { file_business_int_proto_init() }
func file_business_int_proto_init() {
if File_business_int_proto != nil {
return
}
file_common_ext_proto_init()
file_business_ext_proto_init()
if !protoimpl.UnsafeEnabled {
file_business_int_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AuthReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_business_int_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUsersReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_business_int_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUsersResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_business_int_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_business_int_proto_goTypes,
DependencyIndexes: file_business_int_proto_depIdxs,
MessageInfos: file_business_int_proto_msgTypes,
}.Build()
File_business_int_proto = out.File
file_business_int_proto_rawDesc = nil
file_business_int_proto_goTypes = nil
file_business_int_proto_depIdxs = nil
}


// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// BusinessIntClient is the client API for BusinessInt service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type BusinessIntClient interface {
// 权限校验
Auth(ctx context.Context, in *AuthReq, opts ...grpc.CallOption) (*Empty, error)
// 批量获取用户信息
GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*GetUserResp, error)
// 批量获取用户信息
GetUsers(ctx context.Context, in *GetUsersReq, opts ...grpc.CallOption) (*GetUsersResp, error)
}

type businessIntClient struct {
cc grpc.ClientConnInterface
}

func NewBusinessIntClient(cc grpc.ClientConnInterface) BusinessIntClient {
return &businessIntClient{cc}
}

func (c *businessIntClient) Auth(ctx context.Context, in *AuthReq, opts ...grpc.CallOption) (*Empty, error) {
out := new(Empty)
err := c.cc.Invoke(ctx, "/pb.BusinessInt/Auth", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}

func (c *businessIntClient) GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*GetUserResp, error) {
out := new(GetUserResp)
err := c.cc.Invoke(ctx, "/pb.BusinessInt/GetUser", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}

func (c *businessIntClient) GetUsers(ctx context.Context, in *GetUsersReq, opts ...grpc.CallOption) (*GetUsersResp, error) {
out := new(GetUsersResp)
err := c.cc.Invoke(ctx, "/pb.BusinessInt/GetUsers", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}

// BusinessIntServer is the server API for BusinessInt service.
// All implementations must embed UnimplementedBusinessIntServer
// for forward compatibility
type BusinessIntServer interface {
// 权限校验
Auth(context.Context, *AuthReq) (*Empty, error)
// 批量获取用户信息
GetUser(context.Context, *GetUserReq) (*GetUserResp, error)
// 批量获取用户信息
GetUsers(context.Context, *GetUsersReq) (*GetUsersResp, error)
}

// UnimplementedBusinessIntServer must be embedded to have forward compatible implementations.
type UnimplementedBusinessIntServer struct {
}

func (UnimplementedBusinessIntServer) Auth(context.Context, *AuthReq) (*Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Auth not implemented")
}
func (UnimplementedBusinessIntServer) GetUser(context.Context, *GetUserReq) (*GetUserResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
}
func (UnimplementedBusinessIntServer) GetUsers(context.Context, *GetUsersReq) (*GetUsersResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUsers not implemented")
}

func RegisterBusinessIntServer(s grpc.ServiceRegistrar, srv BusinessIntServer) {
s.RegisterService(&BusinessInt_ServiceDesc, srv)
}

func _BusinessInt_Auth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AuthReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BusinessIntServer).Auth(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.BusinessInt/Auth",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BusinessIntServer).Auth(ctx, req.(*AuthReq))
}
return interceptor(ctx, in, info, handler)
}

func _BusinessInt_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BusinessIntServer).GetUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.BusinessInt/GetUser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BusinessIntServer).GetUser(ctx, req.(*GetUserReq))
}
return interceptor(ctx, in, info, handler)
}

func _BusinessInt_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUsersReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BusinessIntServer).GetUsers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.BusinessInt/GetUsers",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BusinessIntServer).GetUsers(ctx, req.(*GetUsersReq))
}
return interceptor(ctx, in, info, handler)
}

// BusinessInt_ServiceDesc is the grpc.ServiceDesc for BusinessInt service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BusinessInt_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pb.BusinessInt",
HandlerType: (*BusinessIntServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Auth",
Handler: _BusinessInt_Auth_Handler,
},
{
MethodName: "GetUser",
Handler: _BusinessInt_GetUser_Handler,
},
{
MethodName: "GetUsers",
Handler: _BusinessInt_GetUsers_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "business.int.proto",
}

+ 131
- 0
gim/pb/common.ext.pb.go View File

@@ -0,0 +1,131 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.14.0
// source: common.ext.proto_back

package pb

import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)

const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type Empty struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}

func (x *Empty) Reset() {
*x = Empty{}
if protoimpl.UnsafeEnabled {
mi := &file_common_ext_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *Empty) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*Empty) ProtoMessage() {}

func (x *Empty) ProtoReflect() protoreflect.Message {
mi := &file_common_ext_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}

// Deprecated: Use Empty.ProtoReflect.Descriptor instead.
func (*Empty) Descriptor() ([]byte, []int) {
return file_common_ext_proto_rawDescGZIP(), []int{0}
}

var File_common_ext_proto protoreflect.FileDescriptor

var file_common_ext_proto_rawDesc = []byte{
0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42,
0x0d, 0x5a, 0x0b, 0x67, 0x69, 0x6d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}

var (
file_common_ext_proto_rawDescOnce sync.Once
file_common_ext_proto_rawDescData = file_common_ext_proto_rawDesc
)

func file_common_ext_proto_rawDescGZIP() []byte {
file_common_ext_proto_rawDescOnce.Do(func() {
file_common_ext_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_ext_proto_rawDescData)
})
return file_common_ext_proto_rawDescData
}

var file_common_ext_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_common_ext_proto_goTypes = []interface{}{
(*Empty)(nil), // 0: pb.Empty
}
var file_common_ext_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}

func init() { file_common_ext_proto_init() }
func file_common_ext_proto_init() {
if File_common_ext_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_common_ext_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Empty); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_common_ext_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_common_ext_proto_goTypes,
DependencyIndexes: file_common_ext_proto_depIdxs,
MessageInfos: file_common_ext_proto_msgTypes,
}.Build()
File_common_ext_proto = out.File
file_common_ext_proto_rawDesc = nil
file_common_ext_proto_goTypes = nil
file_common_ext_proto_depIdxs = nil
}

+ 2490
- 0
gim/pb/connect.ext.pb.go
File diff suppressed because it is too large
View File


+ 404
- 0
gim/pb/connect.int.pb.go View File

@@ -0,0 +1,404 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.20.0--rc2
// source: connect.int.proto

package pb

import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)

const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type DeliverMessageReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

DeviceId int64 `protobuf:"varint,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` // 设备id
MessageSend *MessageSend `protobuf:"bytes,2,opt,name=message_send,json=messageSend,proto3" json:"message_send,omitempty"` // 数据
}

func (x *DeliverMessageReq) Reset() {
*x = DeliverMessageReq{}
if protoimpl.UnsafeEnabled {
mi := &file_connect_int_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *DeliverMessageReq) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*DeliverMessageReq) ProtoMessage() {}

func (x *DeliverMessageReq) ProtoReflect() protoreflect.Message {
mi := &file_connect_int_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}

// Deprecated: Use DeliverMessageReq.ProtoReflect.Descriptor instead.
func (*DeliverMessageReq) Descriptor() ([]byte, []int) {
return file_connect_int_proto_rawDescGZIP(), []int{0}
}

func (x *DeliverMessageReq) GetDeviceId() int64 {
if x != nil {
return x.DeviceId
}
return 0
}

func (x *DeliverMessageReq) GetMessageSend() *MessageSend {
if x != nil {
return x.MessageSend
}
return nil
}

// 房间推送
type PushRoomMsg struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

RoomId int64 `protobuf:"varint,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"` // 设备id
MessageSend *MessageSend `protobuf:"bytes,2,opt,name=message_send,json=messageSend,proto3" json:"message_send,omitempty"` // 数据
}

func (x *PushRoomMsg) Reset() {
*x = PushRoomMsg{}
if protoimpl.UnsafeEnabled {
mi := &file_connect_int_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *PushRoomMsg) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*PushRoomMsg) ProtoMessage() {}

func (x *PushRoomMsg) ProtoReflect() protoreflect.Message {
mi := &file_connect_int_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}

// Deprecated: Use PushRoomMsg.ProtoReflect.Descriptor instead.
func (*PushRoomMsg) Descriptor() ([]byte, []int) {
return file_connect_int_proto_rawDescGZIP(), []int{1}
}

func (x *PushRoomMsg) GetRoomId() int64 {
if x != nil {
return x.RoomId
}
return 0
}

func (x *PushRoomMsg) GetMessageSend() *MessageSend {
if x != nil {
return x.MessageSend
}
return nil
}

// 房间推送
type PushAllMsg struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

MessageSend *MessageSend `protobuf:"bytes,2,opt,name=message_send,json=messageSend,proto3" json:"message_send,omitempty"` // 数据
}

func (x *PushAllMsg) Reset() {
*x = PushAllMsg{}
if protoimpl.UnsafeEnabled {
mi := &file_connect_int_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *PushAllMsg) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*PushAllMsg) ProtoMessage() {}

func (x *PushAllMsg) ProtoReflect() protoreflect.Message {
mi := &file_connect_int_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}

// Deprecated: Use PushAllMsg.ProtoReflect.Descriptor instead.
func (*PushAllMsg) Descriptor() ([]byte, []int) {
return file_connect_int_proto_rawDescGZIP(), []int{2}
}

func (x *PushAllMsg) GetMessageSend() *MessageSend {
if x != nil {
return x.MessageSend
}
return nil
}

var File_connect_int_proto protoreflect.FileDescriptor

var file_connect_int_proto_rawDesc = []byte{
0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
0x63, 0x74, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x64, 0x0a, 0x11,
0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65,
0x71, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x32,
0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65,
0x6e, 0x64, 0x22, 0x5a, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x73,
0x67, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x0c, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e,
0x64, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x22, 0x40,
0x0a, 0x0a, 0x50, 0x75, 0x73, 0x68, 0x41, 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x32, 0x0a, 0x0c,
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53,
0x65, 0x6e, 0x64, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e, 0x64,
0x32, 0x40, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x49, 0x6e, 0x74, 0x12, 0x32,
0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x42, 0x0d, 0x5a, 0x0b, 0x67, 0x69, 0x6d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62,
0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}

var (
file_connect_int_proto_rawDescOnce sync.Once
file_connect_int_proto_rawDescData = file_connect_int_proto_rawDesc
)

func file_connect_int_proto_rawDescGZIP() []byte {
file_connect_int_proto_rawDescOnce.Do(func() {
file_connect_int_proto_rawDescData = protoimpl.X.CompressGZIP(file_connect_int_proto_rawDescData)
})
return file_connect_int_proto_rawDescData
}

var file_connect_int_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_connect_int_proto_goTypes = []interface{}{
(*DeliverMessageReq)(nil), // 0: pb.DeliverMessageReq
(*PushRoomMsg)(nil), // 1: pb.PushRoomMsg
(*PushAllMsg)(nil), // 2: pb.PushAllMsg
(*MessageSend)(nil), // 3: pb.MessageSend
(*Empty)(nil), // 4: pb.Empty
}
var file_connect_int_proto_depIdxs = []int32{
3, // 0: pb.DeliverMessageReq.message_send:type_name -> pb.MessageSend
3, // 1: pb.PushRoomMsg.message_send:type_name -> pb.MessageSend
3, // 2: pb.PushAllMsg.message_send:type_name -> pb.MessageSend
0, // 3: pb.ConnectInt.DeliverMessage:input_type -> pb.DeliverMessageReq
4, // 4: pb.ConnectInt.DeliverMessage:output_type -> pb.Empty
4, // [4:5] is the sub-list for method output_type
3, // [3:4] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}

func init() { file_connect_int_proto_init() }
func file_connect_int_proto_init() {
if File_connect_int_proto != nil {
return
}
file_common_ext_proto_init()
file_connect_ext_proto_init()
if !protoimpl.UnsafeEnabled {
file_connect_int_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeliverMessageReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_connect_int_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PushRoomMsg); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_connect_int_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PushAllMsg); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_connect_int_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_connect_int_proto_goTypes,
DependencyIndexes: file_connect_int_proto_depIdxs,
MessageInfos: file_connect_int_proto_msgTypes,
}.Build()
File_connect_int_proto = out.File
file_connect_int_proto_rawDesc = nil
file_connect_int_proto_goTypes = nil
file_connect_int_proto_depIdxs = nil
}


// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// ConnectIntClient is the client API for ConnectInt service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ConnectIntClient interface {
// 消息投递
DeliverMessage(ctx context.Context, in *DeliverMessageReq, opts ...grpc.CallOption) (*Empty, error)
}

type connectIntClient struct {
cc grpc.ClientConnInterface
}

func NewConnectIntClient(cc grpc.ClientConnInterface) ConnectIntClient {
return &connectIntClient{cc}
}

func (c *connectIntClient) DeliverMessage(ctx context.Context, in *DeliverMessageReq, opts ...grpc.CallOption) (*Empty, error) {
out := new(Empty)
err := c.cc.Invoke(ctx, "/pb.ConnectInt/DeliverMessage", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}

// ConnectIntServer is the server API for ConnectInt service.
// All implementations must embed UnimplementedConnectIntServer
// for forward compatibility
type ConnectIntServer interface {
// 消息投递
DeliverMessage(context.Context, *DeliverMessageReq) (*Empty, error)
}

// UnimplementedConnectIntServer must be embedded to have forward compatible implementations.
type UnimplementedConnectIntServer struct {
}

func (UnimplementedConnectIntServer) DeliverMessage(context.Context, *DeliverMessageReq) (*Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeliverMessage not implemented")
}

// UnsafeConnectIntServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ConnectIntServer will
// result in compilation errors.
type UnsafeConnectIntServer interface {
}

func RegisterConnectIntServer(s grpc.ServiceRegistrar, srv ConnectIntServer) {
s.RegisterService(&ConnectInt_ServiceDesc, srv)
}

func _ConnectInt_DeliverMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeliverMessageReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ConnectIntServer).DeliverMessage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.ConnectInt/DeliverMessage",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ConnectIntServer).DeliverMessage(ctx, req.(*DeliverMessageReq))
}
return interceptor(ctx, in, info, handler)
}

// ConnectInt_ServiceDesc is the grpc.ServiceDesc for ConnectInt service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ConnectInt_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pb.ConnectInt",
HandlerType: (*ConnectIntServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "DeliverMessage",
Handler: _ConnectInt_DeliverMessage_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "connect.int.proto",
}

+ 20
- 0
gim/pb/go.mod View File

@@ -0,0 +1,20 @@
module egg_im

go 1.18

require (
google.golang.org/grpc v1.50.1
google.golang.org/protobuf v1.28.1
)

require (
github.com/golang/protobuf v1.5.2 // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/text v0.4.0 // indirect
google.golang.org/genproto v0.0.0-20221018160656-63c7b68cfc55 // indirect
)

require (
github.com/google/go-cmp v0.5.9 // indirect
golang.org/x/net v0.1.0 // indirect
)

+ 21
- 0
gim/pb/go.sum View File

@@ -0,0 +1,21 @@
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto v0.0.0-20221018160656-63c7b68cfc55 h1:U1u4KB2kx6KR/aJDjQ97hZ15wQs8ZPvDcGcRynBhkvg=
google.golang.org/genproto v0.0.0-20221018160656-63c7b68cfc55/go.mod h1:45EK0dUbEZ2NHjCeAd2LXmyjAgGUGrpGROgjhC3ADck=
google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY=
google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=

+ 4403
- 0
gim/pb/logic.ext.pb.go
File diff suppressed because it is too large
View File


+ 1556
- 0
gim/pb/logic.int.pb.go
File diff suppressed because it is too large
View File


+ 956
- 0
gim/pb/push.ext.pb.go View File

@@ -0,0 +1,956 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.20.0--rc2
// source: push.ext.proto

package pb

import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)

const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type PushCode int32

const (
PushCode_PC_ADD_DEFAULT PushCode = 0
PushCode_PC_ADD_FRIEND PushCode = 100 // 添加好友请求
PushCode_PC_AGREE_ADD_FRIEND PushCode = 101 // 同意添加好友
PushCode_PC_UPDATE_GROUP PushCode = 110 // 更新群组
PushCode_PC_ADD_GROUP_MEMBERS PushCode = 120 // 添加群组成员
PushCode_PC_REMOVE_GROUP_MEMBER PushCode = 121 // 移除群组成员
PushCode_PC_BANNED_GROUP_MEMBER PushCode = 122 // 禁言群组成员
PushCode_PC_REMOVE_BANNED_GROUP_MEMBER PushCode = 123 // 取消禁言群组成员
PushCode_PC_UPDATE_GROUP_MEMBER PushCode = 124 // 更新群组成员信息
)

// Enum value maps for PushCode.
var (
PushCode_name = map[int32]string{
0: "PC_ADD_DEFAULT",
100: "PC_ADD_FRIEND",
101: "PC_AGREE_ADD_FRIEND",
110: "PC_UPDATE_GROUP",
120: "PC_ADD_GROUP_MEMBERS",
121: "PC_REMOVE_GROUP_MEMBER",
122: "PC_BANNED_GROUP_MEMBER",
123: "PC_REMOVE_BANNED_GROUP_MEMBER",
124: "PC_UPDATE_GROUP_MEMBER",
}
PushCode_value = map[string]int32{
"PC_ADD_DEFAULT": 0,
"PC_ADD_FRIEND": 100,
"PC_AGREE_ADD_FRIEND": 101,
"PC_UPDATE_GROUP": 110,
"PC_ADD_GROUP_MEMBERS": 120,
"PC_REMOVE_GROUP_MEMBER": 121,
"PC_BANNED_GROUP_MEMBER": 122,
"PC_REMOVE_BANNED_GROUP_MEMBER": 123,
"PC_UPDATE_GROUP_MEMBER": 124,
}
)

func (x PushCode) Enum() *PushCode {
p := new(PushCode)
*p = x
return p
}

func (x PushCode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (PushCode) Descriptor() protoreflect.EnumDescriptor {
return file_push_ext_proto_enumTypes[0].Descriptor()
}

func (PushCode) Type() protoreflect.EnumType {
return &file_push_ext_proto_enumTypes[0]
}

func (x PushCode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}

// Deprecated: Use PushCode.Descriptor instead.
func (PushCode) EnumDescriptor() ([]byte, []int) {
return file_push_ext_proto_rawDescGZIP(), []int{0}
}

// 推送码 PC_ADD_FRIEND = 100
type AddFriendPush struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

FriendId int64 `protobuf:"varint,1,opt,name=friend_id,json=friendId,proto3" json:"friend_id,omitempty"` // 好友id
Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"` // 昵称
AvatarUrl string `protobuf:"bytes,3,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` // 头像
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // 描述
}

func (x *AddFriendPush) Reset() {
*x = AddFriendPush{}
if protoimpl.UnsafeEnabled {
mi := &file_push_ext_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *AddFriendPush) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*AddFriendPush) ProtoMessage() {}

func (x *AddFriendPush) ProtoReflect() protoreflect.Message {
mi := &file_push_ext_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}

// Deprecated: Use AddFriendPush.ProtoReflect.Descriptor instead.
func (*AddFriendPush) Descriptor() ([]byte, []int) {
return file_push_ext_proto_rawDescGZIP(), []int{0}
}

func (x *AddFriendPush) GetFriendId() int64 {
if x != nil {
return x.FriendId
}
return 0
}

func (x *AddFriendPush) GetNickname() string {
if x != nil {
return x.Nickname
}
return ""
}

func (x *AddFriendPush) GetAvatarUrl() string {
if x != nil {
return x.AvatarUrl
}
return ""
}

func (x *AddFriendPush) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}

// 推送码 PC_AGREE_ADD_FRIEND = 101
type AgreeAddFriendPush struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

FriendId int64 `protobuf:"varint,1,opt,name=friend_id,json=friendId,proto3" json:"friend_id,omitempty"` // 好友id
Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"` // 昵称
AvatarUrl string `protobuf:"bytes,3,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` // 头像
}

func (x *AgreeAddFriendPush) Reset() {
*x = AgreeAddFriendPush{}
if protoimpl.UnsafeEnabled {
mi := &file_push_ext_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *AgreeAddFriendPush) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*AgreeAddFriendPush) ProtoMessage() {}

func (x *AgreeAddFriendPush) ProtoReflect() protoreflect.Message {
mi := &file_push_ext_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}

// Deprecated: Use AgreeAddFriendPush.ProtoReflect.Descriptor instead.
func (*AgreeAddFriendPush) Descriptor() ([]byte, []int) {
return file_push_ext_proto_rawDescGZIP(), []int{1}
}

func (x *AgreeAddFriendPush) GetFriendId() int64 {
if x != nil {
return x.FriendId
}
return 0
}

func (x *AgreeAddFriendPush) GetNickname() string {
if x != nil {
return x.Nickname
}
return ""
}

func (x *AgreeAddFriendPush) GetAvatarUrl() string {
if x != nil {
return x.AvatarUrl
}
return ""
}

// 更新群组 PC_UPDATE_GROUP = 110
type UpdateGroupPush struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

OptId int64 `protobuf:"varint,1,opt,name=opt_id,json=optId,proto3" json:"opt_id,omitempty"` // 操作人用户id
OptName string `protobuf:"bytes,2,opt,name=opt_name,json=optName,proto3" json:"opt_name,omitempty"` // 操作人昵称
OptAvatarUrl string `protobuf:"bytes,3,opt,name=opt_avatar_url,json=optAvatarUrl,proto3" json:"opt_avatar_url,omitempty"` // 操作人头像
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // 群组名称
AvatarUrl string `protobuf:"bytes,5,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` // 群组头像
Introduction string `protobuf:"bytes,6,opt,name=introduction,proto3" json:"introduction,omitempty"` // 群组简介
IsUpdateIntroduction bool `protobuf:"varint,7,opt,name=isUpdateIntroduction,proto3" json:"isUpdateIntroduction,omitempty"` // 是否更新群组简介
Extra string `protobuf:"bytes,8,opt,name=extra,proto3" json:"extra,omitempty"` // 附加字段
}

func (x *UpdateGroupPush) Reset() {
*x = UpdateGroupPush{}
if protoimpl.UnsafeEnabled {
mi := &file_push_ext_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *UpdateGroupPush) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*UpdateGroupPush) ProtoMessage() {}

func (x *UpdateGroupPush) ProtoReflect() protoreflect.Message {
mi := &file_push_ext_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}

// Deprecated: Use UpdateGroupPush.ProtoReflect.Descriptor instead.
func (*UpdateGroupPush) Descriptor() ([]byte, []int) {
return file_push_ext_proto_rawDescGZIP(), []int{2}
}

func (x *UpdateGroupPush) GetOptId() int64 {
if x != nil {
return x.OptId
}
return 0
}

func (x *UpdateGroupPush) GetOptName() string {
if x != nil {
return x.OptName
}
return ""
}

func (x *UpdateGroupPush) GetOptAvatarUrl() string {
if x != nil {
return x.OptAvatarUrl
}
return ""
}

func (x *UpdateGroupPush) GetName() string {
if x != nil {
return x.Name
}
return ""
}

func (x *UpdateGroupPush) GetAvatarUrl() string {
if x != nil {
return x.AvatarUrl
}
return ""
}

func (x *UpdateGroupPush) GetIntroduction() string {
if x != nil {
return x.Introduction
}
return ""
}

func (x *UpdateGroupPush) GetIsUpdateIntroduction() bool {
if x != nil {
return x.IsUpdateIntroduction
}
return false
}

func (x *UpdateGroupPush) GetExtra() string {
if x != nil {
return x.Extra
}
return ""
}

// 添加群组成员 PC_AGREE_ADD_GROUPS = 120
type AddGroupMembersPush struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

OptId int64 `protobuf:"varint,1,opt,name=opt_id,json=optId,proto3" json:"opt_id,omitempty"` // 操作人用户id
OptName string `protobuf:"bytes,2,opt,name=opt_name,json=optName,proto3" json:"opt_name,omitempty"` // 操作人昵称
Members []*GroupMember `protobuf:"bytes,3,rep,name=members,proto3" json:"members,omitempty"` // 群组成员
}

func (x *AddGroupMembersPush) Reset() {
*x = AddGroupMembersPush{}
if protoimpl.UnsafeEnabled {
mi := &file_push_ext_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *AddGroupMembersPush) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*AddGroupMembersPush) ProtoMessage() {}

func (x *AddGroupMembersPush) ProtoReflect() protoreflect.Message {
mi := &file_push_ext_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}

// Deprecated: Use AddGroupMembersPush.ProtoReflect.Descriptor instead.
func (*AddGroupMembersPush) Descriptor() ([]byte, []int) {
return file_push_ext_proto_rawDescGZIP(), []int{3}
}

func (x *AddGroupMembersPush) GetOptId() int64 {
if x != nil {
return x.OptId
}
return 0
}

func (x *AddGroupMembersPush) GetOptName() string {
if x != nil {
return x.OptName
}
return ""
}

func (x *AddGroupMembersPush) GetMembers() []*GroupMember {
if x != nil {
return x.Members
}
return nil
}

// 删除群组成员 PC_REMOVE_GROUP_MEMBER = 121
type RemoveGroupMemberPush struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

OptId int64 `protobuf:"varint,1,opt,name=opt_id,json=optId,proto3" json:"opt_id,omitempty"` // 操作人用户id
OptName string `protobuf:"bytes,2,opt,name=opt_name,json=optName,proto3" json:"opt_name,omitempty"` // 操作人昵称
DeletedUserId int64 `protobuf:"varint,3,opt,name=deleted_user_id,json=deletedUserId,proto3" json:"deleted_user_id,omitempty"` // 被删除的成员id
DeletedUserName string `protobuf:"bytes,4,opt,name=deleted_user_name,json=deletedUserName,proto3" json:"deleted_user_name,omitempty"` // 被删除的成员昵称
}

func (x *RemoveGroupMemberPush) Reset() {
*x = RemoveGroupMemberPush{}
if protoimpl.UnsafeEnabled {
mi := &file_push_ext_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *RemoveGroupMemberPush) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*RemoveGroupMemberPush) ProtoMessage() {}

func (x *RemoveGroupMemberPush) ProtoReflect() protoreflect.Message {
mi := &file_push_ext_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}

// Deprecated: Use RemoveGroupMemberPush.ProtoReflect.Descriptor instead.
func (*RemoveGroupMemberPush) Descriptor() ([]byte, []int) {
return file_push_ext_proto_rawDescGZIP(), []int{4}
}

func (x *RemoveGroupMemberPush) GetOptId() int64 {
if x != nil {
return x.OptId
}
return 0
}

func (x *RemoveGroupMemberPush) GetOptName() string {
if x != nil {
return x.OptName
}
return ""
}

func (x *RemoveGroupMemberPush) GetDeletedUserId() int64 {
if x != nil {
return x.DeletedUserId
}
return 0
}

func (x *RemoveGroupMemberPush) GetDeletedUserName() string {
if x != nil {
return x.DeletedUserName
}
return ""
}

// 禁言群组成员 PC_BANNED_GROUP_MEMBER = 122
type BannedGroupMemberPush struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

OptId int64 `protobuf:"varint,1,opt,name=opt_id,json=optId,proto3" json:"opt_id,omitempty"` // 操作人用户id
OptName string `protobuf:"bytes,2,opt,name=opt_name,json=optName,proto3" json:"opt_name,omitempty"` // 操作人昵称
BannedUserId int64 `protobuf:"varint,3,opt,name=banned_user_id,json=bannedUserId,proto3" json:"banned_user_id,omitempty"` // 被禁言的成员id
BannedUserName string `protobuf:"bytes,4,opt,name=banned_user_name,json=bannedUserName,proto3" json:"banned_user_name,omitempty"` // 被禁言的成员昵称
}

func (x *BannedGroupMemberPush) Reset() {
*x = BannedGroupMemberPush{}
if protoimpl.UnsafeEnabled {
mi := &file_push_ext_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *BannedGroupMemberPush) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*BannedGroupMemberPush) ProtoMessage() {}

func (x *BannedGroupMemberPush) ProtoReflect() protoreflect.Message {
mi := &file_push_ext_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}

// Deprecated: Use BannedGroupMemberPush.ProtoReflect.Descriptor instead.
func (*BannedGroupMemberPush) Descriptor() ([]byte, []int) {
return file_push_ext_proto_rawDescGZIP(), []int{5}
}

func (x *BannedGroupMemberPush) GetOptId() int64 {
if x != nil {
return x.OptId
}
return 0
}

func (x *BannedGroupMemberPush) GetOptName() string {
if x != nil {
return x.OptName
}
return ""
}

func (x *BannedGroupMemberPush) GetBannedUserId() int64 {
if x != nil {
return x.BannedUserId
}
return 0
}

func (x *BannedGroupMemberPush) GetBannedUserName() string {
if x != nil {
return x.BannedUserName
}
return ""
}

// 取消禁言群组成员 PC_REMOVE_BANNED_GROUP_MEMBER = 123
type RemoveBannedGroupMemberPush struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

OptId int64 `protobuf:"varint,1,opt,name=opt_id,json=optId,proto3" json:"opt_id,omitempty"` // 操作人用户id
OptName string `protobuf:"bytes,2,opt,name=opt_name,json=optName,proto3" json:"opt_name,omitempty"` // 操作人昵称
RemoveBannedUserId int64 `protobuf:"varint,3,opt,name=remove_banned_user_id,json=removeBannedUserId,proto3" json:"remove_banned_user_id,omitempty"` // 被解禁言的成员id
RemoveBannedUserName string `protobuf:"bytes,4,opt,name=remove_banned_user_name,json=removeBannedUserName,proto3" json:"remove_banned_user_name,omitempty"` // 被解禁言的成员昵称
}

func (x *RemoveBannedGroupMemberPush) Reset() {
*x = RemoveBannedGroupMemberPush{}
if protoimpl.UnsafeEnabled {
mi := &file_push_ext_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *RemoveBannedGroupMemberPush) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*RemoveBannedGroupMemberPush) ProtoMessage() {}

func (x *RemoveBannedGroupMemberPush) ProtoReflect() protoreflect.Message {
mi := &file_push_ext_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}

// Deprecated: Use RemoveBannedGroupMemberPush.ProtoReflect.Descriptor instead.
func (*RemoveBannedGroupMemberPush) Descriptor() ([]byte, []int) {
return file_push_ext_proto_rawDescGZIP(), []int{6}
}

func (x *RemoveBannedGroupMemberPush) GetOptId() int64 {
if x != nil {
return x.OptId
}
return 0
}

func (x *RemoveBannedGroupMemberPush) GetOptName() string {
if x != nil {
return x.OptName
}
return ""
}

func (x *RemoveBannedGroupMemberPush) GetRemoveBannedUserId() int64 {
if x != nil {
return x.RemoveBannedUserId
}
return 0
}

func (x *RemoveBannedGroupMemberPush) GetRemoveBannedUserName() string {
if x != nil {
return x.RemoveBannedUserName
}
return ""
}

// 修改群组成员身份 PC_UPDATE_GROUP_MEMBER = 124
type UpdateMemberPush struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

OptId int64 `protobuf:"varint,1,opt,name=opt_id,json=optId,proto3" json:"opt_id,omitempty"` // 操作人用户id
OptName string `protobuf:"bytes,2,opt,name=opt_name,json=optName,proto3" json:"opt_name,omitempty"` // 操作人昵称
UpdateUserId int64 `protobuf:"varint,3,opt,name=update_user_id,json=updateUserId,proto3" json:"update_user_id,omitempty"` // 被修改的成员id
UpdateUserName string `protobuf:"bytes,4,opt,name=update_user_name,json=updateUserName,proto3" json:"update_user_name,omitempty"` // 被修改的成员昵称
UpdateUserMemberType int32 `protobuf:"varint,5,opt,name=update_user_member_type,json=updateUserMemberType,proto3" json:"update_user_member_type,omitempty"` // 被修改的成员身份类型
}

func (x *UpdateMemberPush) Reset() {
*x = UpdateMemberPush{}
if protoimpl.UnsafeEnabled {
mi := &file_push_ext_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *UpdateMemberPush) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*UpdateMemberPush) ProtoMessage() {}

func (x *UpdateMemberPush) ProtoReflect() protoreflect.Message {
mi := &file_push_ext_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}

// Deprecated: Use UpdateMemberPush.ProtoReflect.Descriptor instead.
func (*UpdateMemberPush) Descriptor() ([]byte, []int) {
return file_push_ext_proto_rawDescGZIP(), []int{7}
}

func (x *UpdateMemberPush) GetOptId() int64 {
if x != nil {
return x.OptId
}
return 0
}

func (x *UpdateMemberPush) GetOptName() string {
if x != nil {
return x.OptName
}
return ""
}

func (x *UpdateMemberPush) GetUpdateUserId() int64 {
if x != nil {
return x.UpdateUserId
}
return 0
}

func (x *UpdateMemberPush) GetUpdateUserName() string {
if x != nil {
return x.UpdateUserName
}
return ""
}

func (x *UpdateMemberPush) GetUpdateUserMemberType() int32 {
if x != nil {
return x.UpdateUserMemberType
}
return 0
}

var File_push_ext_proto protoreflect.FileDescriptor

var file_push_ext_proto_rawDesc = []byte{
0x0a, 0x0e, 0x70, 0x75, 0x73, 0x68, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x02, 0x70, 0x62, 0x1a, 0x0f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x01, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69,
0x65, 0x6e, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e,
0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65,
0x6e, 0x64, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12,
0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x22, 0x6c, 0x0a, 0x12, 0x41, 0x67, 0x72, 0x65, 0x65, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69,
0x65, 0x6e, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e,
0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65,
0x6e, 0x64, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x22,
0x8a, 0x02, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50,
0x75, 0x73, 0x68, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x05, 0x6f, 0x70, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x70,
0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70,
0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6f, 0x70, 0x74, 0x5f, 0x61, 0x76, 0x61,
0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f,
0x70, 0x74, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x1d, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20,
0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x22,
0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x14, 0x69, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e,
0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08,
0x52, 0x14, 0x69, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x64,
0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18,
0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x72, 0x0a, 0x13,
0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x50,
0x75, 0x73, 0x68, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x05, 0x6f, 0x70, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x70,
0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70,
0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x72, 0x6f, 0x75,
0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73,
0x22, 0x9d, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x70,
0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6f, 0x70, 0x74, 0x49,
0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x70, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f,
0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x55, 0x73,
0x65, 0x72, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f,
0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65,
0x22, 0x99, 0x01, 0x0a, 0x15, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x70,
0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6f, 0x70, 0x74, 0x49,
0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x70, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e,
0x62, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72,
0x49, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65,
0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x61,
0x6e, 0x6e, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xb9, 0x01, 0x0a,
0x1b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x47, 0x72, 0x6f,
0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x12, 0x15, 0x0a, 0x06,
0x6f, 0x70, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6f, 0x70,
0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x70, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31,
0x0a, 0x15, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x5f,
0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x72,
0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49,
0x64, 0x12, 0x35, 0x0a, 0x17, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x62, 0x61, 0x6e, 0x6e,
0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x14, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64,
0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x12, 0x15, 0x0a,
0x06, 0x6f, 0x70, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6f,
0x70, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x70, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12,
0x24, 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55,
0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f,
0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12,
0x35, 0x0a, 0x17, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6d,
0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05,
0x52, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62,
0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x2a, 0xf0, 0x01, 0x0a, 0x08, 0x50, 0x75, 0x73, 0x68, 0x43,
0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x5f, 0x44, 0x45,
0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x43, 0x5f, 0x41, 0x44,
0x44, 0x5f, 0x46, 0x52, 0x49, 0x45, 0x4e, 0x44, 0x10, 0x64, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x43,
0x5f, 0x41, 0x47, 0x52, 0x45, 0x45, 0x5f, 0x41, 0x44, 0x44, 0x5f, 0x46, 0x52, 0x49, 0x45, 0x4e,
0x44, 0x10, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x43, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45,
0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x6e, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x43, 0x5f, 0x41,
0x44, 0x44, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x53,
0x10, 0x78, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x43, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x5f,
0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x79, 0x12, 0x1a,
0x0a, 0x16, 0x50, 0x43, 0x5f, 0x42, 0x41, 0x4e, 0x4e, 0x45, 0x44, 0x5f, 0x47, 0x52, 0x4f, 0x55,
0x50, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x7a, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x43,
0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x5f, 0x42, 0x41, 0x4e, 0x4e, 0x45, 0x44, 0x5f, 0x47,
0x52, 0x4f, 0x55, 0x50, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x7b, 0x12, 0x1a, 0x0a,
0x16, 0x50, 0x43, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50,
0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x7c, 0x42, 0x0d, 0x5a, 0x0b, 0x67, 0x69, 0x6d,
0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}

var (
file_push_ext_proto_rawDescOnce sync.Once
file_push_ext_proto_rawDescData = file_push_ext_proto_rawDesc
)

func file_push_ext_proto_rawDescGZIP() []byte {
file_push_ext_proto_rawDescOnce.Do(func() {
file_push_ext_proto_rawDescData = protoimpl.X.CompressGZIP(file_push_ext_proto_rawDescData)
})
return file_push_ext_proto_rawDescData
}

var file_push_ext_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_push_ext_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_push_ext_proto_goTypes = []interface{}{
(PushCode)(0), // 0: pb.PushCode
(*AddFriendPush)(nil), // 1: pb.AddFriendPush
(*AgreeAddFriendPush)(nil), // 2: pb.AgreeAddFriendPush
(*UpdateGroupPush)(nil), // 3: pb.UpdateGroupPush
(*AddGroupMembersPush)(nil), // 4: pb.AddGroupMembersPush
(*RemoveGroupMemberPush)(nil), // 5: pb.RemoveGroupMemberPush
(*BannedGroupMemberPush)(nil), // 6: pb.BannedGroupMemberPush
(*RemoveBannedGroupMemberPush)(nil), // 7: pb.RemoveBannedGroupMemberPush
(*UpdateMemberPush)(nil), // 8: pb.UpdateMemberPush
(*GroupMember)(nil), // 9: pb.GroupMember
}
var file_push_ext_proto_depIdxs = []int32{
9, // 0: pb.AddGroupMembersPush.members:type_name -> pb.GroupMember
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}

func init() { file_push_ext_proto_init() }
func file_push_ext_proto_init() {
if File_push_ext_proto != nil {
return
}
file_logic_ext_proto_init()
if !protoimpl.UnsafeEnabled {
file_push_ext_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AddFriendPush); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_push_ext_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AgreeAddFriendPush); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_push_ext_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateGroupPush); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_push_ext_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AddGroupMembersPush); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_push_ext_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RemoveGroupMemberPush); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_push_ext_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BannedGroupMemberPush); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_push_ext_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RemoveBannedGroupMemberPush); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_push_ext_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateMemberPush); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_push_ext_proto_rawDesc,
NumEnums: 1,
NumMessages: 8,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_push_ext_proto_goTypes,
DependencyIndexes: file_push_ext_proto_depIdxs,
EnumInfos: file_push_ext_proto_enumTypes,
MessageInfos: file_push_ext_proto_msgTypes,
}.Build()
File_push_ext_proto = out.File
file_push_ext_proto_rawDesc = nil
file_push_ext_proto_goTypes = nil
file_push_ext_proto_depIdxs = nil
}

+ 95
- 0
gim/push.ext.proto View File

@@ -0,0 +1,95 @@
syntax = "proto3";
package pb;
option go_package = "gim/pkg/pb/";

import "logic.ext.proto";

enum PushCode {
PC_ADD_DEFAULT = 0;

PC_ADD_FRIEND = 100; // 添加好友请求

PC_AGREE_ADD_FRIEND = 101; // 同意添加好友

PC_UPDATE_GROUP = 110; // 更新群组

PC_ADD_GROUP_MEMBERS = 120; // 添加群组成员

PC_REMOVE_GROUP_MEMBER = 121; // 移除群组成员

PC_BANNED_GROUP_MEMBER = 122; // 禁言群组成员

PC_REMOVE_BANNED_GROUP_MEMBER = 123; // 取消禁言群组成员

PC_UPDATE_GROUP_MEMBER = 124; // 更新群组成员信息

}

// 推送码 PC_ADD_FRIEND = 100
message AddFriendPush {
int64 friend_id = 1; // 好友id
string nickname = 2; // 昵称
string avatar_url = 3; // 头像
string description = 4; // 描述
}

// 推送码 PC_AGREE_ADD_FRIEND = 101
message AgreeAddFriendPush {
int64 friend_id = 1; // 好友id
string nickname = 2; // 昵称
string avatar_url = 3; // 头像
}

// 更新群组 PC_UPDATE_GROUP = 110
message UpdateGroupPush {
int64 opt_id = 1; // 操作人用户id
string opt_name = 2; // 操作人昵称
string opt_avatar_url = 3; // 操作人头像
string name = 4; // 群组名称
string avatar_url = 5; // 群组头像
string introduction = 6; // 群组简介
bool isUpdateIntroduction = 7; // 是否更新群组简介
string extra = 8; // 附加字段
}

// 添加群组成员 PC_AGREE_ADD_GROUPS = 120
message AddGroupMembersPush {
int64 opt_id = 1; // 操作人用户id
string opt_name = 2; // 操作人昵称
repeated GroupMember members = 3; // 群组成员
}

// 删除群组成员 PC_REMOVE_GROUP_MEMBER = 121
message RemoveGroupMemberPush {
int64 opt_id = 1; // 操作人用户id
string opt_name = 2; // 操作人昵称
int64 deleted_user_id = 3; // 被删除的成员id
string deleted_user_name = 4; // 被删除的成员昵称
}

// 禁言群组成员 PC_BANNED_GROUP_MEMBER = 122
message BannedGroupMemberPush {
int64 opt_id = 1; // 操作人用户id
string opt_name = 2; // 操作人昵称
int64 banned_user_id = 3; // 被禁言的成员id
string banned_user_name = 4; // 被禁言的成员昵称
}


// 取消禁言群组成员 PC_REMOVE_BANNED_GROUP_MEMBER = 123
message RemoveBannedGroupMemberPush {
int64 opt_id = 1; // 操作人用户id
string opt_name = 2; // 操作人昵称
int64 remove_banned_user_id = 3; // 被解禁言的成员id
string remove_banned_user_name = 4; // 被解禁言的成员昵称
}

// 修改群组成员身份 PC_UPDATE_GROUP_MEMBER = 124
message UpdateMemberPush {
int64 opt_id = 1; // 操作人用户id
string opt_name = 2; // 操作人昵称
int64 update_user_id = 3; // 被修改的成员id
string update_user_name = 4; // 被修改的成员昵称
int32 update_user_member_type = 5; // 被修改的成员身份类型
}


BIN
View File


Loading…
Cancel
Save