From a7f9faf8688be969f922f880d3f34a893c44f46d Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Mon, 7 Feb 2022 08:44:21 +0800 Subject: [PATCH] statistics --- cmd/rpc/open_im_statistics/main.go | 13 + cmd/rpc/statistics/main.go | 14 - config/config.yaml | 2 + internal/cms_api/group/group.go | 11 +- internal/cms_api/message/message.go | 22 +- internal/cms_api/router.go | 18 +- internal/cms_api/statistics/statistics.go | 209 +++- internal/cms_api/user/user.go | 45 +- internal/rpc/group/group.go | 13 +- internal/rpc/statistics/statistics.go | 285 +++++- internal/rpc/user/user.go | 40 +- pkg/cms_api_struct/message.go | 13 +- pkg/cms_api_struct/statistics.go | 46 +- pkg/cms_api_struct/user.go | 13 +- pkg/common/config/config.go | 1 + pkg/common/constant/constant.go | 15 +- .../im_mysql_model/statistics_model.go | 153 +++ .../mysql_model/im_mysql_model/user_model.go | 21 +- pkg/proto/message/message.pb.go | 923 ++++++++++++++++++ pkg/proto/message/message.proto | 57 ++ pkg/proto/proto_dir.cfg | 6 +- pkg/proto/sdk_ws/ws.pb.go | 4 +- pkg/proto/statistics/statistics.pb.go | 436 ++++----- pkg/proto/statistics/statistics.proto | 12 +- pkg/proto/user/user.pb.go | 831 +++++++++------- pkg/proto/user/user.proto | 31 +- pkg/utils/time_format.go | 5 + 27 files changed, 2514 insertions(+), 725 deletions(-) create mode 100644 cmd/rpc/open_im_statistics/main.go delete mode 100644 cmd/rpc/statistics/main.go create mode 100644 pkg/common/db/mysql_model/im_mysql_model/statistics_model.go create mode 100644 pkg/proto/message/message.pb.go create mode 100644 pkg/proto/message/message.proto diff --git a/cmd/rpc/open_im_statistics/main.go b/cmd/rpc/open_im_statistics/main.go new file mode 100644 index 0000000..f1f9502 --- /dev/null +++ b/cmd/rpc/open_im_statistics/main.go @@ -0,0 +1,13 @@ +package main + +import ( + "Open_IM/internal/rpc/statistics" + "flag" +) + +func main() { + rpcPort := flag.Int("port", 10800, "rpc listening port") + flag.Parse() + rpcServer := statistics.NewStatisticsServer(*rpcPort) + rpcServer.Run() +} diff --git a/cmd/rpc/statistics/main.go b/cmd/rpc/statistics/main.go deleted file mode 100644 index fb74dae..0000000 --- a/cmd/rpc/statistics/main.go +++ /dev/null @@ -1,14 +0,0 @@ -package main - -import ( - "Open_IM/internal/rpc/user" - "flag" -) - -func main() { - rpcPort := flag.Int("port", 10100, "rpc listening port") - flag.Parse() - rpcServer := user.NewUserServer(*rpcPort) - rpcServer.Run() -} - diff --git a/config/config.yaml b/config/config.yaml index 1a7aa23..710421f 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -92,6 +92,7 @@ rpcport: openImGroupPort: [ 10500 ] openImAuthPort: [ 10600 ] openImPushPort: [ 10700 ] + openImOpenImStatisticPort: [ 10800 ] c2c: callbackBeforeSendMsg: switch: false @@ -110,6 +111,7 @@ rpcregistername: openImOnlineMessageRelayName: OnlineMessageRelay openImGroupName: Group openImAuthName: Auth + OpenImStatisticsName: Statistics log: storageLocation: ../logs/ diff --git a/internal/cms_api/group/group.go b/internal/cms_api/group/group.go index 6ffe981..e2df244 100644 --- a/internal/cms_api/group/group.go +++ b/internal/cms_api/group/group.go @@ -20,8 +20,8 @@ import ( func GetGroupById(c *gin.Context) { var ( - req cms_api_struct.GetGroupByIdRequest - resp cms_api_struct.GetGroupByIdResponse + req cms_api_struct.GetGroupByIdRequest + resp cms_api_struct.GetGroupByIdResponse reqPb pbGroup.GetGroupByIdReq ) if err := c.ShouldBindQuery(&req); err != nil { @@ -33,7 +33,7 @@ func GetGroupById(c *gin.Context) { client := pbGroup.NewGroupClient(etcdConn) respPb, err := client.GetGroupById(context.Background(), &reqPb) if err != nil { - log.NewError(utils.GetSelfFuncName(), "GetUserInfo failed ", err.Error()) + log.NewError(utils.GetSelfFuncName(), "GetGroupById failed ", err.Error()) openIMHttp.RespHttp200(c, constant.ErrServer, nil) return } @@ -43,7 +43,7 @@ func GetGroupById(c *gin.Context) { resp.CreateTime = (utils.UnixSecondToTime(int64(respPb.GroupInfo.CreateTime))).String() resp.ProfilePhoto = respPb.GroupInfo.FaceURL resp.GroupMasterName = respPb.GroupInfo.OwnerUserID - openIMHttp.RespHttp200(c, constant.OK, nil) + openIMHttp.RespHttp200(c, constant.OK, resp) } func GetGroups(c *gin.Context) { @@ -141,7 +141,7 @@ func CreateGroup(c *gin.Context) { reqPb.GroupInfo.CreatorUserID = req.GroupMasterId for _, v := range req.GroupMembers { reqPb.InitMemberList = append(reqPb.InitMemberList, &pbGroup.GroupAddMemberInfo{ - UserID: v, + UserID: v, RoleLevel: 1, }) } @@ -249,7 +249,6 @@ func OpenPrivateChat(c *gin.Context) { openIMHttp.RespHttp200(c, constant.OK, nil) } - func GetGroupsMember(c *gin.Context) { var ( req cms_api_struct.GetGroupMembersRequest diff --git a/internal/cms_api/message/message.go b/internal/cms_api/message/message.go index e13829b..2972684 100644 --- a/internal/cms_api/message/message.go +++ b/internal/cms_api/message/message.go @@ -1,25 +1,21 @@ package message import ( - "github.com/gin-gonic/gin" -) - -func Broadcast(c *gin.Context) { + openIMHttp "Open_IM/pkg/common/http" -} - -func SearchMessageByUser(c *gin.Context) { + "Open_IM/pkg/common/constant" -} - -func SearchMessageByGroup(c *gin.Context) { + "github.com/gin-gonic/gin" +) +func BroadcastMessage(c *gin.Context) { + openIMHttp.RespHttp200(c, constant.OK, nil) } func MassSendMassage(c *gin.Context) { - + openIMHttp.RespHttp200(c, constant.OK, nil) } -func Withdraw(c *gin.Context) { - +func WithdrawMessage(c *gin.Context) { + openIMHttp.RespHttp200(c, constant.OK, nil) } diff --git a/internal/cms_api/router.go b/internal/cms_api/router.go index 1f01f31..a7d6e6d 100644 --- a/internal/cms_api/router.go +++ b/internal/cms_api/router.go @@ -21,15 +21,14 @@ func NewGinRouter() *gin.Engine { adminRouterGroup := router.Group("/admin") { adminRouterGroup.POST("/register", admin.AdminRegister) - adminRouterGroup.POST("/login", admin.AdminLogin) adminRouterGroup.GET("/get_user_settings", admin.GetAdminSettings) adminRouterGroup.POST("/alter_user_settings", admin.AlterAdminSettings) } statisticsRouterGroup := router.Group("/statistics") { statisticsRouterGroup.GET("/get_messages_statistics", statistics.GetMessagesStatistics) - statisticsRouterGroup.GET("/get_users_statistics", statistics.GetUsersStatistics) - statisticsRouterGroup.GET("/get_groups_statistics", statistics.GetGroupsStatistics) + statisticsRouterGroup.GET("/get_user_statistics", statistics.GetUserStatistics) + statisticsRouterGroup.GET("/get_group_statistics", statistics.GetGroupStatistics) statisticsRouterGroup.GET("/get_active_user", statistics.GetActiveUser) statisticsRouterGroup.GET("/get_active_group", statistics.GetActiveGroup) } @@ -49,11 +48,9 @@ func NewGinRouter() *gin.Engine { } messageRouterGroup := router.Group("/message") { - messageRouterGroup.POST("/broadcast", message.Broadcast) - messageRouterGroup.GET("/search_message_by_user", message.SearchMessageByUser) - messageRouterGroup.POST("/message_mass_send", message.MassSendMassage) - messageRouterGroup.GET("/search_message_by_group", message.SearchMessageByGroup) - messageRouterGroup.POST("/withdraw_message", message.Withdraw) + messageRouterGroup.POST("/broadcast_message", message.BroadcastMessage) + messageRouterGroup.POST("/mass_send_message", message.MassSendMassage) + messageRouterGroup.POST("/withdraw_message", message.WithdrawMessage) } groupRouterGroup := router.Group("/group") { @@ -75,14 +72,15 @@ func NewGinRouter() *gin.Engine { userRouterGroup := router.Group("/user") { userRouterGroup.POST("/resign", user.ResignUser) - userRouterGroup.GET("/get_user", user.GetUser) + userRouterGroup.GET("/get_user_by_id", user.GetUserById) userRouterGroup.POST("/alter_user", user.AlterUser) userRouterGroup.GET("/get_users", user.GetUsers) userRouterGroup.POST("/add_user", user.AddUser) userRouterGroup.POST("/unblock_user", user.UnblockUser) userRouterGroup.POST("/block_user", user.BlockUser) userRouterGroup.GET("/get_block_users", user.GetBlockUsers) - userRouterGroup.GET("/get_block_user", user.GetBlockUser) + userRouterGroup.GET("/get_block_user_by_id", user.GetBlockUserById) + userRouterGroup.POST("/delete_user", user.DeleteUser) } return baseRouter } diff --git a/internal/cms_api/statistics/statistics.go b/internal/cms_api/statistics/statistics.go index 0e20035..fd64855 100644 --- a/internal/cms_api/statistics/statistics.go +++ b/internal/cms_api/statistics/statistics.go @@ -2,30 +2,221 @@ package statistics import ( "Open_IM/pkg/cms_api_struct" + "Open_IM/pkg/common/config" + "Open_IM/pkg/common/constant" + openIMHttp "Open_IM/pkg/common/http" + "Open_IM/pkg/common/log" + "Open_IM/pkg/grpc-etcdv3/getcdv3" + pb "Open_IM/pkg/proto/statistics" + "Open_IM/pkg/utils" + "context" + "strings" + "github.com/gin-gonic/gin" - statisticsPb "Open_IM/pkg/proto/statistics" ) func GetMessagesStatistics(c *gin.Context) { var ( - req cms_api_struct.GetGroupMembersRequest - resp cms_api_struct.GetGroupMembersResponse - reqPb statisticsPb.GetMessageStatisticsReq + req cms_api_struct.GetMessageStatisticsRequest + resp cms_api_struct.GetMessageStatisticsResponse + reqPb pb.GetMessageStatisticsReq ) + reqPb.StatisticsReq = &pb.StatisticsReq{} + if err := c.ShouldBindQuery(&req); err != nil { + log.NewError("0", utils.GetSelfFuncName(), "BindJSON failed ", err.Error()) + openIMHttp.RespHttp200(c, constant.ErrArgs, nil) + return + } + utils.CopyStructFields(&reqPb.StatisticsReq, &req) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName) + client := pb.NewUserClient(etcdConn) + respPb, err := client.GetMessageStatistics(context.Background(), &reqPb) + if err != nil { + openIMHttp.RespHttp200(c, constant.ErrServer, resp) + log.NewError("0", utils.GetSelfFuncName(), err.Error()) + return + } + // utils.CopyStructFields(&resp, respPb) + resp.GroupMessageNum = int(respPb.GroupMessageNum) + resp.PrivateMessageNum = int(respPb.PrivateMessageNum) + for _, v := range respPb.PrivateMessageNumList { + resp.PrivateMessageNumList = append(resp.PrivateMessageNumList, struct { + Date string "json:\"date\"" + MessageNum int "json:\"message_num\"" + }{ + Date: v.Date, + MessageNum: int(v.Num), + }) + } + for _, v := range respPb.GroupMessageNumList { + resp.GroupMessageNumList = append(resp.GroupMessageNumList, struct { + Date string "json:\"date\"" + MessageNum int "json:\"message_num\"" + }{ + Date: v.Date, + MessageNum: int(v.Num), + }) + } + openIMHttp.RespHttp200(c, constant.OK, resp) } -func GetUsersStatistics(c *gin.Context) { - +func GetUserStatistics(c *gin.Context) { + var ( + req cms_api_struct.GetUserStatisticsRequest + resp cms_api_struct.GetUserStatisticsResponse + reqPb pb.GetUserStatisticsReq + ) + reqPb.StatisticsReq = &pb.StatisticsReq{} + if err := c.ShouldBindQuery(&req); err != nil { + log.NewError("0", utils.GetSelfFuncName(), "BindJSON failed ", err.Error()) + openIMHttp.RespHttp200(c, constant.ErrArgs, nil) + return + } + utils.CopyStructFields(&reqPb.StatisticsReq, &req) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName) + client := pb.NewUserClient(etcdConn) + respPb, err := client.GetUserStatistics(context.Background(), &reqPb) + if err != nil { + log.NewError("0", utils.GetSelfFuncName(), err.Error()) + openIMHttp.RespHttp200(c, constant.ErrServer, nil) + return + } + // utils.CopyStructFields(&resp, respPb) + resp.ActiveUserNum = int(respPb.ActiveUserNum) + resp.IncreaseUserNum = int(respPb.IncreaseUserNum) + resp.TotalUserNum = int(respPb.TotalUserNum) + for _, v := range respPb.ActiveUserNumList { + resp.ActiveUserNumList = append(resp.ActiveUserNumList, struct { + Date string "json:\"date\"" + ActiveUserNum int "json:\"active_user_num\"" + }{ + Date: v.Date, + ActiveUserNum: int(v.Num), + }) + } + for _, v := range respPb.IncreaseUserNumList { + resp.IncreaseUserNumList = append(resp.IncreaseUserNumList, struct { + Date string "json:\"date\"" + IncreaseUserNum int "json:\"increase_user_num\"" + }{ + Date: v.Date, + IncreaseUserNum: int(v.Num), + }) + } + for _, v := range respPb.TotalUserNumList { + resp.TotalUserNumList = append(resp.TotalUserNumList, struct { + Date string "json:\"date\"" + TotalUserNum int "json:\"total_user_num\"" + }{ + Date: v.Date, + TotalUserNum: int(v.Num), + }) + } + openIMHttp.RespHttp200(c, constant.OK, resp) } -func GetGroupsStatistics(c *gin.Context) { +func GetGroupStatistics(c *gin.Context) { + var ( + req cms_api_struct.GetGroupStatisticsRequest + resp cms_api_struct.GetGroupStatisticsResponse + reqPb pb.GetGroupStatisticsReq + ) + reqPb.StatisticsReq = &pb.StatisticsReq{} + if err := c.ShouldBindQuery(&req); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + openIMHttp.RespHttp200(c, constant.ErrArgs, nil) + return + } + utils.CopyStructFields(&reqPb.StatisticsReq, &req) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName) + client := pb.NewUserClient(etcdConn) + respPb, err := client.GetGroupStatistics(context.Background(), &reqPb) + if err != nil { + openIMHttp.RespHttp200(c, constant.ErrServer, nil) + return + } + // utils.CopyStructFields(&resp, respPb) + resp.IncreaseGroupNum = int(respPb.GetIncreaseGroupNum()) + resp.TotalGroupNum = int(respPb.GetTotalGroupNum()) + for _, v := range respPb.IncreaseGroupNumList { + resp.IncreaseGroupNumList = append(resp.IncreaseGroupNumList, + struct { + Date string "json:\"date\"" + IncreaseGroupNum int "json:\"increase_group_num\"" + }{ + Date: v.Date, + IncreaseGroupNum: int(v.Num), + }) + } + for _, v := range respPb.TotalGroupNumList { + resp.TotalGroupNumList = append(resp.TotalGroupNumList, + struct { + Date string "json:\"date\"" + TotalGroupNum int "json:\"total_group_num\"" + }{ + Date: v.Date, + TotalGroupNum: int(v.Num), + }) + } + openIMHttp.RespHttp200(c, constant.OK, resp) } func GetActiveUser(c *gin.Context) { - + var ( + req cms_api_struct.GetActiveUserRequest + resp cms_api_struct.GetActiveUserResponse + reqPb pb.GetActiveUserReq + ) + reqPb.StatisticsReq = &pb.StatisticsReq{} + if err := c.ShouldBindQuery(&req); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + openIMHttp.RespHttp200(c, constant.ErrArgs, nil) + return + } + utils.CopyStructFields(&reqPb.StatisticsReq, req) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName) + client := pb.NewUserClient(etcdConn) + respPb, err := client.GetActiveUser(context.Background(), &reqPb) + if err != nil { + openIMHttp.RespHttp200(c, constant.ErrServer, nil) + return + } + utils.CopyStructFields(&resp.ActiveUserList, respPb.Users) + openIMHttp.RespHttp200(c, constant.OK, resp) } func GetActiveGroup(c *gin.Context) { - + var ( + req cms_api_struct.GetActiveGroupRequest + resp cms_api_struct.GetActiveGroupResponse + reqPb pb.GetActiveGroupReq + ) + reqPb.StatisticsReq = &pb.StatisticsReq{} + if err := c.ShouldBindQuery(&req); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + openIMHttp.RespHttp200(c, constant.ErrArgs, nil) + return + } + utils.CopyStructFields(&reqPb.StatisticsReq, req) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName) + client := pb.NewUserClient(etcdConn) + respPb, err := client.GetActiveGroup(context.Background(), &reqPb) + if err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + openIMHttp.RespHttp200(c, constant.ErrServer, nil) + return + } + for _, group := range respPb.Groups { + resp.ActiveGroupList = append(resp.ActiveGroupList, struct { + GroupName string "json:\"group_name\"" + GroupId string "json:\"group_id\"" + MessageNum int "json:\"message_num\"" + }{ + GroupName: group.GroupName, + GroupId: group.GroupId, + MessageNum: int(group.MessageNum), + }) + } + openIMHttp.RespHttp200(c, constant.OK, resp) } diff --git a/internal/cms_api/user/user.go b/internal/cms_api/user/user.go index 2842eb4..3428f8b 100644 --- a/internal/cms_api/user/user.go +++ b/internal/cms_api/user/user.go @@ -18,23 +18,23 @@ import ( "github.com/gin-gonic/gin" ) -func GetUser(c *gin.Context) { +func GetUserById(c *gin.Context) { var ( req cms_api_struct.GetUserRequest resp cms_api_struct.GetUserResponse - reqPb pb.GetUserReq + reqPb pb.GetUserByIdReq ) if err := c.ShouldBindQuery(&req); err != nil { - log.NewError("0", "ShouldBindQuery failed ", err.Error()) + log.NewError("GetUser", utils.GetSelfFuncName(), "ShouldBindQuery failed ", err.Error()) openIMHttp.RespHttp200(c, constant.ErrArgs, nil) return } utils.CopyStructFields(&reqPb, &req) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) client := pb.NewUserClient(etcdConn) - respPb, err := client.GetUser(context.Background(), &reqPb) + respPb, err := client.GetUserById(context.Background(), &reqPb) if err != nil { - log.NewError("s", "GetUserInfo failed ", err.Error()) + log.NewError("GetUserFailed", utils.GetSelfFuncName(), err.Error()) openIMHttp.RespHttp200(c, constant.ErrServer, nil) return } @@ -67,7 +67,6 @@ func GetUsers(c *gin.Context) { return } utils.CopyStructFields(&resp.Users, respPb.User) - resp.UserNum = int(respPb.UserNum) resp.ShowNumber = int(respPb.Pagination.ShowNumber) resp.CurrentPage = int(respPb.Pagination.CurrentPage) openIMHttp.RespHttp200(c, constant.OK, resp) @@ -101,7 +100,6 @@ func AlterUser(c *gin.Context) { req cms_api_struct.AlterUserRequest resp cms_api_struct.AlterUserResponse reqPb pb.AlterUserReq - _ *pb.AlterUserResp ) if err := c.BindJSON(&req); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) @@ -222,28 +220,29 @@ func GetBlockUsers(c *gin.Context) { EndDisableTime: v.EndDisableTime, }) } - resp.BlockUserNum = int(respPb.BlockUserNum) resp.ShowNumber = int(respPb.Pagination.ShowNumber) resp.CurrentPage = int(respPb.Pagination.CurrentPage) openIMHttp.RespHttp200(c, constant.OK, resp) } -func GetBlockUser(c *gin.Context) { +func GetBlockUserById(c *gin.Context) { var ( req cms_api_struct.GetBlockUserRequest resp cms_api_struct.GetBlockUserResponse - reqPb pb.GetBlockUserReq + reqPb pb.GetBlockUserByIdReq ) if err := c.ShouldBindQuery(&req); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) openIMHttp.RespHttp200(c, constant.ErrArgs, nil) return } + reqPb.UserId = req.UserId etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) client := pb.NewUserClient(etcdConn) - respPb, err := client.GetBlockUser(context.Background(), &reqPb) + respPb, err := client.GetBlockUserById(context.Background(), &reqPb) if err != nil { - openIMHttp.RespHttp200(c, constant.ErrServer, resp) + log.NewError("0", "GetBlockUserById rpc failed ", err.Error()) + openIMHttp.RespHttp200(c, constant.ErrServer, nil) return } resp.EndDisableTime = respPb.BlockUser.EndDisableTime @@ -251,3 +250,25 @@ func GetBlockUser(c *gin.Context) { utils.CopyStructFields(&resp, respPb.BlockUser.User) openIMHttp.RespHttp200(c, constant.OK, resp) } + +func DeleteUser(c *gin.Context) { + var ( + req cms_api_struct.DeleteUserRequest + reqPb pb.DeleteUserReq + ) + if err := c.BindJSON(&req); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + openIMHttp.RespHttp200(c, constant.ErrArgs, nil) + return + } + reqPb.UserId = req.UserId + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) + client := pb.NewUserClient(etcdConn) + _, err := client.DeleteUser(context.Background(), &reqPb) + if err != nil { + log.NewError("0", "DeleteUser rpc failed ", err.Error()) + openIMHttp.RespHttp200(c, constant.ErrServer, nil) + return + } + openIMHttp.RespHttp200(c, constant.OK, nil) +} diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 4772ded..bc52de5 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -648,16 +648,15 @@ func (s *groupServer) GetGroupById(_ context.Context, req *pbGroup.GetGroupByIdR return resp, err } resp.GroupInfo = &open_im_sdk.GroupInfo{ - GroupID: group.GroupID, - GroupName: group.GroupName, - FaceURL: group.FaceUrl, - OwnerUserID: group.CreatorUserID, + GroupID: group.GroupID, + GroupName: group.GroupName, + FaceURL: group.FaceUrl, + OwnerUserID: group.CreatorUserID, MemberCount: 0, Status: group.Status, CreatorUserID: group.CreatorUserID, - GroupType: group.GroupType, + GroupType: group.GroupType, } - resp.GroupInfo.CreatorUserID = group.CreatorUserID return resp, nil } @@ -721,7 +720,7 @@ func (s *groupServer) GetGroups(_ context.Context, req *pbGroup.GetGroupsReq) (* } func (s *groupServer) OperateGroupStatus(_ context.Context, req *pbGroup.OperateGroupStatusReq) (*pbGroup.OperateGroupStatusResp, error) { - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req.String()) + log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req.String()) resp := &pbGroup.OperateGroupStatusResp{} if err := imdb.OperateGroupStatus(req.GroupId, req.Status); err != nil { return resp, err diff --git a/internal/rpc/statistics/statistics.go b/internal/rpc/statistics/statistics.go index d8adbae..f933398 100644 --- a/internal/rpc/statistics/statistics.go +++ b/internal/rpc/statistics/statistics.go @@ -2,13 +2,19 @@ package statistics import ( "Open_IM/pkg/common/config" + "context" + "fmt" + "time" + //"Open_IM/pkg/common/constant" //"Open_IM/pkg/common/db" - //imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" + imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" + //cp "Open_IM/pkg/common/utils" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbStatistics "Open_IM/pkg/proto/statistics" + //open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" //"context" @@ -26,18 +32,18 @@ type statisticsServer struct { etcdAddr []string } -func NewStatisticsGroupServer(port int) *statisticsServer { - log.NewPrivateLog("group") +func NewStatisticsServer(port int) *statisticsServer { + log.NewPrivateLog("Statistics") return &statisticsServer{ rpcPort: port, - rpcRegisterName: config.Config.RpcRegisterName.OpenImGroupName, + rpcRegisterName: config.Config.RpcRegisterName.OpenImStatisticsName, etcdSchema: config.Config.Etcd.EtcdSchema, etcdAddr: config.Config.Etcd.EtcdAddr, } } func (s *statisticsServer) Run() { - log.NewInfo("0", "group rpc start ") + log.NewInfo("0", "Statistics rpc start ") ip := utils.ServerIP registerAddress := ip + ":" + strconv.Itoa(s.rpcPort) //listener network @@ -63,5 +69,270 @@ func (s *statisticsServer) Run() { log.NewError("0", "Serve failed ", err.Error()) return } - log.NewInfo("0", "group rpc success") -} \ No newline at end of file + log.NewInfo("0", "statistics rpc success") +} + +func (s *statisticsServer) GetActiveGroup(_ context.Context, req *pbStatistics.GetActiveGroupReq) (*pbStatistics.GetActiveGroupResp, error) { + log.NewInfo("GetActiveGroup", utils.GetSelfFuncName(), req.String()) + resp := &pbStatistics.GetActiveGroupResp{} + fromTime, toTime, err := ParseTimeFromTo(req.StatisticsReq.From, req.StatisticsReq.To) + if err != nil { + log.NewError("GetActiveGroup", utils.GetSelfFuncName(), err.Error()) + return resp, err + } + activeGroups, err := imdb.GetActiveGroups(fromTime, toTime, 12) + if err != nil { + log.NewError("GetActiveGroup", utils.GetSelfFuncName(), err.Error()) + return resp, err + } + for _, activeGroup := range activeGroups { + resp.Groups = append(resp.Groups, + &pbStatistics.GroupResp{ + GroupName: activeGroup.Name, + GroupId: activeGroup.Id, + MessageNum: int32(activeGroup.MessageNum), + }) + } + return resp, nil +} + +func (s *statisticsServer) GetActiveUser(_ context.Context, req *pbStatistics.GetActiveUserReq) (*pbStatistics.GetActiveUserResp, error) { + log.NewInfo("GetActiveUser", utils.GetSelfFuncName(), req.String()) + resp := &pbStatistics.GetActiveUserResp{} + fromTime, toTime, err := ParseTimeFromTo(req.StatisticsReq.From, req.StatisticsReq.To) + if err != nil { + log.NewError("GetActiveUser", utils.GetSelfFuncName(), err.Error()) + return resp, err + } + activeUsers, err := imdb.GetActiveUsers(fromTime, toTime, 12) + if err != nil { + log.NewError("GetActiveUser", utils.GetSelfFuncName(), err.Error()) + return resp, err + } + for _, activeUser := range activeUsers { + resp.Users = append(resp.Users, + &pbStatistics.UserResp{ + UserId: activeUser.Id, + NickName: activeUser.Name, + MessageNum: int32(activeUser.MessageNum), + }, + ) + } + return resp, nil +} + +func ParseTimeFromTo(from, to string) (time.Time, time.Time, error) { + var fromTime time.Time + var toTime time.Time + fromTime, err := utils.TimeStringToTime(from) + if err != nil { + return fromTime, toTime, err + } + toTime, err = utils.TimeStringToTime(to) + if err != nil { + return fromTime, toTime, err + } + return fromTime, toTime, nil +} + +func isInOneMonth(from, to time.Time) bool { + return from.Month() == to.Month() +} + +func GetRangeDate(from, to time.Time) [][2]time.Time { + interval := to.Sub(from) + var times [][2]time.Time + switch { + // today + case interval == 0: + times = append(times, [2]time.Time{ + from, from.Add(time.Hour * 24), + }) + // days + case isInOneMonth(from, to): + for i := 0; ; i++ { + fromTime := from.Add(time.Hour * 24 * time.Duration(i)) + toTime := from.Add(time.Hour * 24 * time.Duration(i+1)) + if toTime.After(to.Add(time.Hour * 24)) { + break + } + times = append(times, [2]time.Time{ + fromTime, toTime, + }) + } + // month + case !isInOneMonth(from, to): + for i := 0; ; i++ { + if i == 0 { + fromTime := from + toTime := getFirstDateOfNextNMonth(fromTime, 1) + times = append(times, [2]time.Time{ + fromTime, toTime, + }) + } else { + fromTime := getFirstDateOfNextNMonth(from, i) + toTime := getFirstDateOfNextNMonth(fromTime, 1) + if toTime.After(to) { + toTime = to + times = append(times, [2]time.Time{ + fromTime, toTime, + }) + break + } + times = append(times, [2]time.Time{ + fromTime, toTime, + }) + } + + } + } + return times +} + +func getFirstDateOfNextNMonth(currentTime time.Time, n int) time.Time { + lastOfMonth := time.Date(currentTime.Year(), currentTime.Month(), 1, 0, 0, 0, 0, currentTime.Location()).AddDate(0, n, 0) + return lastOfMonth +} + +func (s *statisticsServer) GetGroupStatistics(_ context.Context, req *pbStatistics.GetGroupStatisticsReq) (*pbStatistics.GetGroupStatisticsResp, error) { + log.NewInfo("GetGroupStatistics", utils.GetSelfFuncName(), req.String()) + resp := &pbStatistics.GetGroupStatisticsResp{} + fromTime, toTime, err := ParseTimeFromTo(req.StatisticsReq.From, req.StatisticsReq.To) + if err != nil { + log.NewError("GetMessageStatistics", utils.GetSelfFuncName(), err.Error()) + return resp, err + } + increaseGroupNum, err := imdb.GetIncreaseGroupNum(fromTime, toTime.Add(time.Hour*24)) + if err != nil { + log.NewError("GetMessageStatistics", utils.GetSelfFuncName(), err.Error()) + return resp, err + } + totalGroupNum, err := imdb.GetTotalGroupNum() + if err != nil { + log.NewError("GetMessageStatistics", utils.GetSelfFuncName(), err.Error()) + return resp, err + } + resp.IncreaseGroupNum = increaseGroupNum + resp.TotalGroupNum = totalGroupNum + times := GetRangeDate(fromTime, toTime) + log.NewInfo("", "times:", times) + for _, v := range times { + num, err := imdb.GetIncreaseGroupNum(v[0], v[1]) + if err != nil { + log.NewError("", utils.GetSelfFuncName(), "GetIncreaseGroupNum", v, err.Error()) + } + resp.IncreaseGroupNumList = append(resp.IncreaseGroupNumList, &pbStatistics.DateNumList{ + Date: v[0].String(), + Num: num, + }) + num, err = imdb.GetGroupNum(v[0]) + if err != nil { + log.NewError("", utils.GetSelfFuncName(), "GetIncreaseGroupNum", v, err.Error()) + } + resp.TotalGroupNumList = append(resp.TotalGroupNumList, &pbStatistics.DateNumList{ + Date: v[0].String(), + Num: num, + }) + } + return resp, nil +} + +func (s *statisticsServer) GetMessageStatistics(_ context.Context, req *pbStatistics.GetMessageStatisticsReq) (*pbStatistics.GetMessageStatisticsResp, error) { + log.NewInfo("GetMessageStatistics", utils.GetSelfFuncName(), req.String()) + resp := &pbStatistics.GetMessageStatisticsResp{} + fromTime, toTime, err := ParseTimeFromTo(req.StatisticsReq.From, req.StatisticsReq.To) + if err != nil { + log.NewError("GetMessageStatistics", utils.GetSelfFuncName(), err.Error()) + return resp, err + } + privateMessageNum, err := imdb.GetPrivateMessageNum(fromTime, toTime.Add(time.Hour*24)) + if err != nil { + log.NewError("GetMessageStatistics", utils.GetSelfFuncName(), err.Error()) + return resp, err + } + groupMessageNum, err := imdb.GetGroupMessageNum(fromTime, toTime.Add(time.Hour*24)) + if err != nil { + log.NewError("GetMessageStatistics", utils.GetSelfFuncName(), err.Error()) + } + resp.PrivateMessageNum = privateMessageNum + resp.GroupMessageNum = groupMessageNum + times := GetRangeDate(fromTime, toTime) + fmt.Println(times) + for _, v := range times { + num, err := imdb.GetPrivateMessageNum(v[0], v[1]) + if err != nil { + log.NewError("", utils.GetSelfFuncName(), "GetIncreaseGroupNum", v, err.Error()) + } + resp.PrivateMessageNumList = append(resp.PrivateMessageNumList, &pbStatistics.DateNumList{ + Date: v[0].String(), + Num: num, + }) + + num, err = imdb.GetGroupMessageNum(v[0], v[1]) + if err != nil { + log.NewError("", utils.GetSelfFuncName(), "GetIncreaseGroupNum", v, err.Error()) + } + resp.GroupMessageNumList = append(resp.GroupMessageNumList, &pbStatistics.DateNumList{ + Date: v[0].String(), + Num: num, + }) + } + fmt.Println(resp) + return resp, nil +} + +func (s *statisticsServer) GetUserStatistics(_ context.Context, req *pbStatistics.GetUserStatisticsReq) (*pbStatistics.GetUserStatisticsResp, error) { + log.NewInfo("GetUserStatistics", utils.GetSelfFuncName(), req.String()) + resp := &pbStatistics.GetUserStatisticsResp{} + fromTime, toTime, err := ParseTimeFromTo(req.StatisticsReq.From, req.StatisticsReq.To) + if err != nil { + return resp, err + } + activeUserNum, err := imdb.GetActiveUserNum(fromTime, toTime.Add(time.Hour*24)) + if err != nil { + log.NewError("GetUserStatistics", utils.GetSelfFuncName(), err.Error()) + return resp, err + } + increaseUserNum, err := imdb.GetIncreaseUserNum(fromTime, toTime.Add(time.Hour*24)) + if err != nil { + log.NewError("GetUserStatistics", utils.GetSelfFuncName(), err.Error()) + return resp, err + } + totalUserNum, err := imdb.GetTotalUserNum() + if err != nil { + log.NewError("GetUserStatistics", utils.GetSelfFuncName(), err.Error()) + return resp, err + } + resp.ActiveUserNum = activeUserNum + resp.TotalUserNum = totalUserNum + resp.IncreaseUserNum = increaseUserNum + + times := GetRangeDate(fromTime, toTime) + for _, v := range times { + num, err := imdb.GetActiveUserNum(v[0], v[1]) + if err != nil { + log.NewError("", utils.GetSelfFuncName(), "GetIncreaseGroupNum", v, err.Error()) + } + resp.ActiveUserNumList = append(resp.ActiveUserNumList, &pbStatistics.DateNumList{ + Date: v[0].String(), + Num: num, + }) + num, err = imdb.GetTotalUserNumByDate(v[0]) + if err != nil { + log.NewError("", utils.GetSelfFuncName(), "GetTotalUserNumByDate", v, err.Error()) + } + resp.TotalUserNumList = append(resp.TotalUserNumList, &pbStatistics.DateNumList{ + Date: v[0].String(), + Num: num, + }) + num, err = imdb.GetIncreaseUserNum(v[0], v[1]) + if err != nil { + log.NewError("", utils.GetSelfFuncName(), "GetIncreaseUserNum", v, err.Error()) + } + resp.IncreaseUserNumList = append(resp.IncreaseUserNumList, &pbStatistics.DateNumList{ + Date: v[0].String(), + Num: num, + }) + } + return resp, nil +} diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 5a6b776..8752987 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -243,9 +243,9 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil } -func (s *userServer) GetUser(ctx context.Context, req *pbUser.GetUserReq) (*pbUser.GetUserResp, error) { +func (s *userServer) GetUserById(ctx context.Context, req *pbUser.GetUserByIdReq) (*pbUser.GetUserByIdResp, error) { log.NewInfo(req.OperationID, "GetUser args ", req.String()) - resp := &pbUser.GetUserResp{User: &pbUser.User{}} + resp := &pbUser.GetUserByIdResp{User: &pbUser.User{}} user, err := imdb.GetUserByUserID(req.UserId) if err != nil { return resp, nil @@ -259,7 +259,7 @@ func (s *userServer) GetUser(ctx context.Context, req *pbUser.GetUserReq) (*pbUs Nickname: user.Nickname, UserId: user.UserID, CreateTime: user.CreateTime.String(), - IsBlock: isBlock, + IsBlock: isBlock, } return resp, nil } @@ -271,11 +271,6 @@ func (s *userServer) GetUsers(ctx context.Context, req *pbUser.GetUsersReq) (*pb if err != nil { return resp, nil } - usersNum, err := imdb.GetUsersNumCount() - if err != nil { - return resp, nil - } - resp.UserNum = int32(usersNum) for _, v := range users { isBlock, err := imdb.UserIsBlock(v.UserID) if err == nil { @@ -356,11 +351,9 @@ func (s *userServer) GetBlockUsers(ctx context.Context, req *pbUser.GetBlockUser if err != nil { return resp, constant.ErrDB } - usersNum, err := imdb.GetBlockUsersNumCount() if err != nil { return resp, constant.ErrDB } - resp.BlockUserNum = int32(usersNum) for _, v := range blockUsers { resp.BlockUsers = append(resp.BlockUsers, &pbUser.BlockUser{ User: &pbUser.User{ @@ -380,16 +373,33 @@ func (s *userServer) GetBlockUsers(ctx context.Context, req *pbUser.GetBlockUser return resp, nil } -func (s *userServer) GetBlockUser(_ context.Context, req *pbUser.GetBlockUserReq) (*pbUser.GetBlockUserResp, error) { +func (s *userServer) GetBlockUserById(_ context.Context, req *pbUser.GetBlockUserByIdReq) (*pbUser.GetBlockUserByIdResp, error) { log.NewInfo(req.OperationID, "GetBlockUser args ", req.String()) - resp := &pbUser.GetBlockUserResp{} + resp := &pbUser.GetBlockUserByIdResp{} user, err := imdb.GetBlockUserById(req.UserId) if err != nil { + log.NewError(req.OperationID, utils.GetSelfFuncName(), err) return resp, err } - resp.BlockUser = &pbUser.BlockUser{} - resp.BlockUser.BeginDisableTime = (user.BeginDisableTime).String() - resp.BlockUser.EndDisableTime = (user.EndDisableTime).String() + resp.BlockUser = &pbUser.BlockUser{ + User: &pbUser.User{ + ProfilePhoto: user.User.FaceURL, + Nickname: user.User.Nickname, + UserId: user.User.UserID, + IsBlock: true, + }, + BeginDisableTime: (user.BeginDisableTime).String(), + EndDisableTime: (user.EndDisableTime).String(), + } return resp, nil +} +func (s *userServer) DeleteUser(_ context.Context, req *pbUser.DeleteUserReq) (*pbUser.DeleteUserResp, error) { + log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req.String()) + resp := &pbUser.DeleteUserResp{} + if row := imdb.DeleteUser(req.UserId); row == 0 { + log.NewError(req.OperationID, utils.GetSelfFuncName(), "delete error", row) + return resp, constant.ErrDB + } + return resp, nil } diff --git a/pkg/cms_api_struct/message.go b/pkg/cms_api_struct/message.go index 2b3c73d..a9e32f7 100644 --- a/pkg/cms_api_struct/message.go +++ b/pkg/cms_api_struct/message.go @@ -1,8 +1,15 @@ package cms_api_struct +type BroadcastRequest struct { + Message string `json:"message"` +} + +type BroadcastResponse struct { +} + type CommonMessage struct { - ChatType int `json:"chat_type"` - MessageType int `json:"message_type"` + SessionType int `json:"session_type"` + ContentType int `json:"content_type"` SenderNickName string `json:"sender_nick_name"` SenderId int `json:"sender_id"` SearchContent string `json:"search_content"` @@ -21,6 +28,6 @@ type SearchMessageByUserResponse struct { type SearchMessageByGroupResponse struct { MessageList []struct { CommonMessage - Date string `json:"date"` + Date string `json:"date"` } `json:"massage_list"` } diff --git a/pkg/cms_api_struct/statistics.go b/pkg/cms_api_struct/statistics.go index 02aae7c..2ff1eff 100644 --- a/pkg/cms_api_struct/statistics.go +++ b/pkg/cms_api_struct/statistics.go @@ -1,11 +1,14 @@ package cms_api_struct type GetStatisticsRequest struct { - FromTime string `json:"from"` - ToTime string `json:"to"` + From string `form:"from" binding:"required"` + To string `form:"to" binding:"required"` +} + +type GetMessageStatisticsRequest struct { + GetStatisticsRequest } -// 单聊 type GetMessageStatisticsResponse struct { PrivateMessageNum int `json:"private_message_num"` GroupMessageNum int `json:"group_message_num"` @@ -19,7 +22,10 @@ type GetMessageStatisticsResponse struct { } `json:"group_message_num_list"` } -// 用户统计 +type GetUserStatisticsRequest struct { + GetStatisticsRequest +} + type GetUserStatisticsResponse struct { IncreaseUserNum int `json:"increase_user_num"` ActiveUserNum int `json:"active_user_num"` @@ -34,12 +40,16 @@ type GetUserStatisticsResponse struct { } `json:"active_user_num_list"` TotalUserNumList []struct { Date string `json:"date"` - TotalUserNum string `json:"total_user_num"` + TotalUserNum int `json:"total_user_num"` } `json:"total_user_num_list"` } +type GetGroupStatisticsRequest struct { + GetStatisticsRequest +} + // 群聊统计 -type GetGroupMessageStatisticsResponse struct { +type GetGroupStatisticsResponse struct { IncreaseGroupNum int `json:"increase_group_num"` TotalGroupNum int `json:"total_group_num"` IncreaseGroupNumList []struct { @@ -48,22 +58,32 @@ type GetGroupMessageStatisticsResponse struct { } `json:"increase_group_num_list"` TotalGroupNumList []struct { Date string `json:"date"` - TotalGroupNum string `json:"total_group_num"` + TotalGroupNum int `json:"total_group_num"` } `json:"total_group_num_list"` } -type GetActiveUserStatisticsResponse struct { +type GetActiveUserRequest struct { + GetStatisticsRequest + // RequestPagination +} + +type GetActiveUserResponse struct { ActiveUserList []struct { NickName string `json:"nick_name"` - Id int `json:"id"` + UserId string `json:"user_id"` MessageNum int `json:"message_num"` } `json:"active_user_list"` } -type GetActiveGroupStatisticsResponse struct { +type GetActiveGroupRequest struct { + GetStatisticsRequest + // RequestPagination +} + +type GetActiveGroupResponse struct { ActiveGroupList []struct { - GroupNickName string `json:"group_nick_name"` - GroupId int `json:"group_id"` - MessageNum int `json:"message_num"` + GroupName string `json:"group_name"` + GroupId string `json:"group_id"` + MessageNum int `json:"message_num"` } `json:"active_group_list"` } diff --git a/pkg/cms_api_struct/user.go b/pkg/cms_api_struct/user.go index 9021716..b34e521 100644 --- a/pkg/cms_api_struct/user.go +++ b/pkg/cms_api_struct/user.go @@ -21,8 +21,7 @@ type GetUsersRequest struct { } type GetUsersResponse struct { - Users []*UserResponse `json:"users"` - UserNum int `json:"user_num"` + Users []*UserResponse `json:"users"` ResponsePagination } @@ -78,8 +77,7 @@ type GetBlockUsersRequest struct { } type GetBlockUsersResponse struct { - BlockUsers []BlockUser `json:"block_users"` - BlockUserNum int `json:"block_user_num"` + BlockUsers []BlockUser `json:"block_users"` ResponsePagination } @@ -90,3 +88,10 @@ type GetBlockUserRequest struct { type GetBlockUserResponse struct { BlockUser } + +type DeleteUserRequest struct { + UserId string `json:"user_id" binding:"required"` +} + +type DeleteUserResponse struct { +} diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 2e68705..d862224 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -77,6 +77,7 @@ type config struct { RpcGetTokenPort []int `yaml:"rpcGetTokenPort"` } RpcRegisterName struct { + OpenImStatisticsName string `yaml:"OpenImStatisticsName"` OpenImUserName string `yaml:"openImUserName"` OpenImFriendName string `yaml:"openImFriendName"` OpenImOfflineMessageName string `yaml:"openImOfflineMessageName"` diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index 2b8bfc9..c18ab09 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -109,11 +109,16 @@ const ( IsSenderSync = "senderSync" //GroupStatus - GroupOk = 0 - GroupBanChat = 1 - GroupDisband = 2 - GroupBaned = 3 + GroupOk = 0 + GroupBanChat = 1 + GroupDisband = 2 + GroupBaned = 3 GroupBanPrivateChat = 4 + + //timeInterval + Day = 1 + Week = 7 + Month = 31 ) var ContentType2PushContent = map[int64]string{ @@ -159,4 +164,4 @@ func GroupIsBanPrivateChat(status int32) bool { return false } return true -} \ No newline at end of file +} diff --git a/pkg/common/db/mysql_model/im_mysql_model/statistics_model.go b/pkg/common/db/mysql_model/im_mysql_model/statistics_model.go new file mode 100644 index 0000000..2f6c969 --- /dev/null +++ b/pkg/common/db/mysql_model/im_mysql_model/statistics_model.go @@ -0,0 +1,153 @@ +package im_mysql_model + +import ( + "Open_IM/pkg/common/db" + "time" +) + +func GetActiveUserNum(from, to time.Time) (int32, error) { + dbConn, err := db.DB.MysqlDB.DefaultGormDB() + if err != nil { + return 0, err + } + dbConn.LogMode(true) + var num int32 + err = dbConn.Table("chat_logs").Select("count(distinct(send_id))").Where("create_time >= ? and create_time <= ?", from, to).Count(&num).Error + return num, err +} + +func GetIncreaseUserNum(from, to time.Time) (int32, error) { + dbConn, err := db.DB.MysqlDB.DefaultGormDB() + if err != nil { + return 0, err + } + dbConn.LogMode(true) + var num int32 + err = dbConn.Table("users").Where("create_time >= ? and create_time <= ?", from, to).Count(&num).Error + return num, err +} + +func GetTotalUserNum() (int32, error) { + dbConn, err := db.DB.MysqlDB.DefaultGormDB() + if err != nil { + return 0, err + } + dbConn.LogMode(true) + var num int32 + err = dbConn.Table("users").Count(&num).Error + return num, err +} + +func GetTotalUserNumByDate(to time.Time) (int32, error) { + dbConn, err := db.DB.MysqlDB.DefaultGormDB() + if err != nil { + return 0, err + } + dbConn.LogMode(true) + var num int32 + err = dbConn.Table("users").Where("create_time <= ?", to).Count(&num).Error + return num, err +} + +func GetPrivateMessageNum(from, to time.Time) (int32, error) { + dbConn, err := db.DB.MysqlDB.DefaultGormDB() + if err != nil { + return 0, err + } + dbConn.LogMode(true) + var num int32 + err = dbConn.Table("chat_logs").Where("create_time >= ? and create_time <= ? and session_type = ?", from, to, 1).Count(&num).Error + return num, err +} + +func GetGroupMessageNum(from, to time.Time) (int32, error) { + dbConn, err := db.DB.MysqlDB.DefaultGormDB() + if err != nil { + return 0, err + } + dbConn.LogMode(true) + var num int32 + err = dbConn.Table("chat_logs").Where("create_time >= ? and create_time <= ? and session_type = ?", from, to, 2).Count(&num).Error + return num, err +} + +func GetIncreaseGroupNum(from, to time.Time) (int32, error) { + dbConn, err := db.DB.MysqlDB.DefaultGormDB() + if err != nil { + return 0, err + } + dbConn.LogMode(true) + var num int32 + err = dbConn.Table("groups").Where("create_time >= ? and create_time <= ?", from, to).Count(&num).Error + return num, err +} + +func GetTotalGroupNum() (int32, error) { + dbConn, err := db.DB.MysqlDB.DefaultGormDB() + if err != nil { + return 0, err + } + dbConn.LogMode(true) + var num int32 + err = dbConn.Table("groups").Count(&num).Error + return num, err +} + +func GetGroupNum(to time.Time) (int32, error) { + dbConn, err := db.DB.MysqlDB.DefaultGormDB() + if err != nil { + return 0, err + } + dbConn.LogMode(true) + var num int32 + err = dbConn.Table("groups").Where("create_time <= ?", to).Count(&num).Error + return num, err +} + +type activeGroup struct { + Name string + Id string `gorm:"column:recv_id"` + MessageNum int `gorm:"column:message_num"` +} + +func GetActiveGroups(from, to time.Time, limit int) ([]*activeGroup, error) { + dbConn, err := db.DB.MysqlDB.DefaultGormDB() + var activeGroups []*activeGroup + if err != nil { + return activeGroups, err + } + dbConn.LogMode(true) + err = dbConn.Table("chat_logs").Select("recv_id, count(*) as message_num").Where("create_time >= ? and create_time <= ? and session_type = ?", from, to, 2).Group("recv_id").Limit(limit).Order("message_num DESC").Find(&activeGroups).Error + for _, activeGroup := range activeGroups { + group := db.Group{ + GroupID: activeGroup.Id, + } + dbConn.Model(&group).Select("group_id", "name").Find(&group) + activeGroup.Name = group.GroupName + } + return activeGroups, err +} + +type activeUser struct { + Name string + Id string `gorm:"column:send_id"` + MessageNum int `gorm:"column:message_num"` +} + +func GetActiveUsers(from, to time.Time, limit int) ([]*activeUser, error) { + dbConn, err := db.DB.MysqlDB.DefaultGormDB() + var activeUsers []*activeUser + if err != nil { + return activeUsers, err + } + dbConn.LogMode(true) + err = dbConn.Table("chat_logs").Select("send_id, count(*) as message_num").Where("create_time >= ? and create_time <= ? and session_type = ?", from, to, 1).Group("send_id").Limit(limit).Order("message_num DESC").Find(&activeUsers).Error + for _, activeUser := range activeUsers { + user := db.Users{ + UserID: activeUser.Id, + } + dbConn.Model(&user).Select("user_id, name").Find(&user) + activeUser.Name = user.Nickname + } + return activeUsers, err +} diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 7b55961..96bd5c8 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -137,19 +137,6 @@ func GetUsers(showNumber, pageNumber int32) ([]db.Users, error) { return users, err } -func GetUsersNumCount() (int, error) { - dbConn, err := db.DB.MysqlDB.DefaultGormDB() - if err != nil { - return 0, err - } - dbConn.LogMode(true) - var count int - if err := dbConn.Model(&db.Users{}).Count(&count).Error; err != nil { - return 0, err - } - return count, nil -} - func AddUser(userId, phoneNumber, name string) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { @@ -235,7 +222,7 @@ func GetBlockUserById(userId string) (BlockUserInfo, error) { if err != nil { return blockUserInfo, err } - if err = dbConn.Find(&blockUser).Error; err != nil { + if err = dbConn.Find(&blockUser).First(&blockUser).Error; err != nil { return blockUserInfo, err } user := db.Users{ @@ -247,6 +234,8 @@ func GetBlockUserById(userId string) (BlockUserInfo, error) { blockUserInfo.User.UserID = user.UserID blockUserInfo.User.FaceURL = user.UserID blockUserInfo.User.Nickname = user.Nickname + blockUserInfo.BeginDisableTime = blockUser.BeginDisableTime + blockUserInfo.EndDisableTime = blockUser.EndDisableTime return blockUserInfo, nil } @@ -258,7 +247,9 @@ func GetBlockUsers(showNumber, pageNumber int32) ([]BlockUserInfo, error) { return blockUserInfos, err } dbConn.LogMode(true) - err = dbConn.Limit(showNumber).Offset(showNumber * (pageNumber - 1)).Find(&blockUsers).Error + if err = dbConn.Limit(showNumber).Offset(showNumber * (pageNumber - 1)).Find(&blockUsers).Error; err != nil { + return blockUserInfos, err + } for _, blockUser := range blockUsers { var user db.Users if err := dbConn.Table("users").Where("user_id=?", blockUser.UserId).First(&user).Error; err == nil { diff --git a/pkg/proto/message/message.pb.go b/pkg/proto/message/message.pb.go new file mode 100644 index 0000000..dcbbd90 --- /dev/null +++ b/pkg/proto/message/message.pb.go @@ -0,0 +1,923 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.19.3 +// source: message/message.proto + +package message + +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 BoradcastMessageReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=Message,proto3" json:"Message,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` +} + +func (x *BoradcastMessageReq) Reset() { + *x = BoradcastMessageReq{} + if protoimpl.UnsafeEnabled { + mi := &file_message_message_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoradcastMessageReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoradcastMessageReq) ProtoMessage() {} + +func (x *BoradcastMessageReq) ProtoReflect() protoreflect.Message { + mi := &file_message_message_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 BoradcastMessageReq.ProtoReflect.Descriptor instead. +func (*BoradcastMessageReq) Descriptor() ([]byte, []int) { + return file_message_message_proto_rawDescGZIP(), []int{0} +} + +func (x *BoradcastMessageReq) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *BoradcastMessageReq) GetOperationID() string { + if x != nil { + return x.OperationID + } + return "" +} + +type BoradcastMessageResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BoradcastMessageResp) Reset() { + *x = BoradcastMessageResp{} + if protoimpl.UnsafeEnabled { + mi := &file_message_message_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoradcastMessageResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoradcastMessageResp) ProtoMessage() {} + +func (x *BoradcastMessageResp) ProtoReflect() protoreflect.Message { + mi := &file_message_message_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 BoradcastMessageResp.ProtoReflect.Descriptor instead. +func (*BoradcastMessageResp) Descriptor() ([]byte, []int) { + return file_message_message_proto_rawDescGZIP(), []int{1} +} + +type MassSendMessageReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=Message,proto3" json:"Message,omitempty"` + UserIds []string `protobuf:"bytes,2,rep,name=UserIds,proto3" json:"UserIds,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=OperationID,proto3" json:"OperationID,omitempty"` +} + +func (x *MassSendMessageReq) Reset() { + *x = MassSendMessageReq{} + if protoimpl.UnsafeEnabled { + mi := &file_message_message_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MassSendMessageReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MassSendMessageReq) ProtoMessage() {} + +func (x *MassSendMessageReq) ProtoReflect() protoreflect.Message { + mi := &file_message_message_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 MassSendMessageReq.ProtoReflect.Descriptor instead. +func (*MassSendMessageReq) Descriptor() ([]byte, []int) { + return file_message_message_proto_rawDescGZIP(), []int{2} +} + +func (x *MassSendMessageReq) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *MassSendMessageReq) GetUserIds() []string { + if x != nil { + return x.UserIds + } + return nil +} + +func (x *MassSendMessageReq) GetOperationID() string { + if x != nil { + return x.OperationID + } + return "" +} + +type MassSendMessageResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MassSendMessageResp) Reset() { + *x = MassSendMessageResp{} + if protoimpl.UnsafeEnabled { + mi := &file_message_message_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MassSendMessageResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MassSendMessageResp) ProtoMessage() {} + +func (x *MassSendMessageResp) ProtoReflect() protoreflect.Message { + mi := &file_message_message_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 MassSendMessageResp.ProtoReflect.Descriptor instead. +func (*MassSendMessageResp) Descriptor() ([]byte, []int) { + return file_message_message_proto_rawDescGZIP(), []int{3} +} + +type GetChatLogsReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=UserId,proto3" json:"UserId,omitempty"` + Date string `protobuf:"bytes,3,opt,name=Date,proto3" json:"Date,omitempty"` + SessionType int32 `protobuf:"varint,4,opt,name=SessionType,proto3" json:"SessionType,omitempty"` + ContentType int32 `protobuf:"varint,5,opt,name=ContentType,proto3" json:"ContentType,omitempty"` + OperationID string `protobuf:"bytes,6,opt,name=OperationID,proto3" json:"OperationID,omitempty"` +} + +func (x *GetChatLogsReq) Reset() { + *x = GetChatLogsReq{} + if protoimpl.UnsafeEnabled { + mi := &file_message_message_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetChatLogsReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChatLogsReq) ProtoMessage() {} + +func (x *GetChatLogsReq) ProtoReflect() protoreflect.Message { + mi := &file_message_message_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 GetChatLogsReq.ProtoReflect.Descriptor instead. +func (*GetChatLogsReq) Descriptor() ([]byte, []int) { + return file_message_message_proto_rawDescGZIP(), []int{4} +} + +func (x *GetChatLogsReq) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *GetChatLogsReq) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *GetChatLogsReq) GetDate() string { + if x != nil { + return x.Date + } + return "" +} + +func (x *GetChatLogsReq) GetSessionType() int32 { + if x != nil { + return x.SessionType + } + return 0 +} + +func (x *GetChatLogsReq) GetContentType() int32 { + if x != nil { + return x.ContentType + } + return 0 +} + +func (x *GetChatLogsReq) GetOperationID() string { + if x != nil { + return x.OperationID + } + return "" +} + +type GetChatLogsResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionType int32 `protobuf:"varint,1,opt,name=SessionType,proto3" json:"SessionType,omitempty"` + ContentType int32 `protobuf:"varint,2,opt,name=ContentType,proto3" json:"ContentType,omitempty"` + SenderNickName string `protobuf:"bytes,3,opt,name=SenderNickName,proto3" json:"SenderNickName,omitempty"` + ReciverNickName string `protobuf:"bytes,4,opt,name=ReciverNickName,proto3" json:"ReciverNickName,omitempty"` + SearchContent string `protobuf:"bytes,5,opt,name=SearchContent,proto3" json:"SearchContent,omitempty"` + Content string `protobuf:"bytes,6,opt,name=Content,proto3" json:"Content,omitempty"` + Date string `protobuf:"bytes,7,opt,name=Date,proto3" json:"Date,omitempty"` +} + +func (x *GetChatLogsResp) Reset() { + *x = GetChatLogsResp{} + if protoimpl.UnsafeEnabled { + mi := &file_message_message_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetChatLogsResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChatLogsResp) ProtoMessage() {} + +func (x *GetChatLogsResp) ProtoReflect() protoreflect.Message { + mi := &file_message_message_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 GetChatLogsResp.ProtoReflect.Descriptor instead. +func (*GetChatLogsResp) Descriptor() ([]byte, []int) { + return file_message_message_proto_rawDescGZIP(), []int{5} +} + +func (x *GetChatLogsResp) GetSessionType() int32 { + if x != nil { + return x.SessionType + } + return 0 +} + +func (x *GetChatLogsResp) GetContentType() int32 { + if x != nil { + return x.ContentType + } + return 0 +} + +func (x *GetChatLogsResp) GetSenderNickName() string { + if x != nil { + return x.SenderNickName + } + return "" +} + +func (x *GetChatLogsResp) GetReciverNickName() string { + if x != nil { + return x.ReciverNickName + } + return "" +} + +func (x *GetChatLogsResp) GetSearchContent() string { + if x != nil { + return x.SearchContent + } + return "" +} + +func (x *GetChatLogsResp) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *GetChatLogsResp) GetDate() string { + if x != nil { + return x.Date + } + return "" +} + +type WithdrawMessageReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerMsgId string `protobuf:"bytes,1,opt,name=ServerMsgId,proto3" json:"ServerMsgId,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` +} + +func (x *WithdrawMessageReq) Reset() { + *x = WithdrawMessageReq{} + if protoimpl.UnsafeEnabled { + mi := &file_message_message_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WithdrawMessageReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WithdrawMessageReq) ProtoMessage() {} + +func (x *WithdrawMessageReq) ProtoReflect() protoreflect.Message { + mi := &file_message_message_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 WithdrawMessageReq.ProtoReflect.Descriptor instead. +func (*WithdrawMessageReq) Descriptor() ([]byte, []int) { + return file_message_message_proto_rawDescGZIP(), []int{6} +} + +func (x *WithdrawMessageReq) GetServerMsgId() string { + if x != nil { + return x.ServerMsgId + } + return "" +} + +func (x *WithdrawMessageReq) GetOperationID() string { + if x != nil { + return x.OperationID + } + return "" +} + +type WithdrawMessageResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *WithdrawMessageResp) Reset() { + *x = WithdrawMessageResp{} + if protoimpl.UnsafeEnabled { + mi := &file_message_message_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WithdrawMessageResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WithdrawMessageResp) ProtoMessage() {} + +func (x *WithdrawMessageResp) ProtoReflect() protoreflect.Message { + mi := &file_message_message_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 WithdrawMessageResp.ProtoReflect.Descriptor instead. +func (*WithdrawMessageResp) Descriptor() ([]byte, []int) { + return file_message_message_proto_rawDescGZIP(), []int{7} +} + +var File_message_message_proto protoreflect.FileDescriptor + +var file_message_message_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x22, 0x51, 0x0a, 0x13, 0x42, 0x6f, 0x72, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x44, 0x22, 0x16, 0x0a, 0x14, 0x42, 0x6f, 0x72, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x6a, 0x0a, 0x12, 0x4d, + 0x61, 0x73, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x71, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x15, 0x0a, 0x13, 0x4d, 0x61, 0x73, 0x73, 0x53, + 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0xbc, + 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, + 0x71, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xfb, 0x01, + 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, + 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x53, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, + 0x0f, 0x52, 0x65, 0x63, 0x69, 0x76, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x52, 0x65, 0x63, 0x69, 0x76, 0x65, 0x72, 0x4e, + 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x22, 0x58, 0x0a, 0x12, 0x57, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x73, + 0x67, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x15, 0x0a, 0x13, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x32, 0xb8, 0x02, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x4f, 0x0a, 0x10, 0x42, 0x6f, 0x72, 0x61, + 0x64, 0x63, 0x61, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x6f, 0x72, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x6f, 0x72, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4c, 0x0a, 0x0f, 0x4d, 0x61, 0x73, + 0x73, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x73, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x73, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x43, 0x68, + 0x61, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x1a, + 0x18, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, + 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4c, 0x0a, 0x0f, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x2f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x3b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_message_message_proto_rawDescOnce sync.Once + file_message_message_proto_rawDescData = file_message_message_proto_rawDesc +) + +func file_message_message_proto_rawDescGZIP() []byte { + file_message_message_proto_rawDescOnce.Do(func() { + file_message_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_message_proto_rawDescData) + }) + return file_message_message_proto_rawDescData +} + +var file_message_message_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_message_message_proto_goTypes = []interface{}{ + (*BoradcastMessageReq)(nil), // 0: message.BoradcastMessageReq + (*BoradcastMessageResp)(nil), // 1: message.BoradcastMessageResp + (*MassSendMessageReq)(nil), // 2: message.MassSendMessageReq + (*MassSendMessageResp)(nil), // 3: message.MassSendMessageResp + (*GetChatLogsReq)(nil), // 4: message.GetChatLogsReq + (*GetChatLogsResp)(nil), // 5: message.GetChatLogsResp + (*WithdrawMessageReq)(nil), // 6: message.WithdrawMessageReq + (*WithdrawMessageResp)(nil), // 7: message.WithdrawMessageResp +} +var file_message_message_proto_depIdxs = []int32{ + 0, // 0: message.message.BoradcastMessage:input_type -> message.BoradcastMessageReq + 2, // 1: message.message.MassSendMessage:input_type -> message.MassSendMessageReq + 4, // 2: message.message.GetChatLogs:input_type -> message.GetChatLogsReq + 6, // 3: message.message.WithdrawMessage:input_type -> message.WithdrawMessageReq + 1, // 4: message.message.BoradcastMessage:output_type -> message.BoradcastMessageResp + 3, // 5: message.message.MassSendMessage:output_type -> message.MassSendMessageResp + 5, // 6: message.message.GetChatLogs:output_type -> message.GetChatLogsResp + 7, // 7: message.message.WithdrawMessage:output_type -> message.WithdrawMessageResp + 4, // [4:8] is the sub-list for method output_type + 0, // [0:4] 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_message_message_proto_init() } +func file_message_message_proto_init() { + if File_message_message_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_message_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoradcastMessageReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_message_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoradcastMessageResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_message_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MassSendMessageReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_message_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MassSendMessageResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_message_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChatLogsReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_message_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChatLogsResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_message_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WithdrawMessageReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_message_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WithdrawMessageResp); 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_message_message_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_message_message_proto_goTypes, + DependencyIndexes: file_message_message_proto_depIdxs, + MessageInfos: file_message_message_proto_msgTypes, + }.Build() + File_message_message_proto = out.File + file_message_message_proto_rawDesc = nil + file_message_message_proto_goTypes = nil + file_message_message_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// MessageClient is the client API for Message service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MessageClient interface { + BoradcastMessage(ctx context.Context, in *BoradcastMessageReq, opts ...grpc.CallOption) (*BoradcastMessageResp, error) + MassSendMessage(ctx context.Context, in *MassSendMessageReq, opts ...grpc.CallOption) (*MassSendMessageResp, error) + GetChatLogs(ctx context.Context, in *GetChatLogsReq, opts ...grpc.CallOption) (*GetChatLogsResp, error) + WithdrawMessage(ctx context.Context, in *WithdrawMessageReq, opts ...grpc.CallOption) (*WithdrawMessageResp, error) +} + +type messageClient struct { + cc grpc.ClientConnInterface +} + +func NewMessageClient(cc grpc.ClientConnInterface) MessageClient { + return &messageClient{cc} +} + +func (c *messageClient) BoradcastMessage(ctx context.Context, in *BoradcastMessageReq, opts ...grpc.CallOption) (*BoradcastMessageResp, error) { + out := new(BoradcastMessageResp) + err := c.cc.Invoke(ctx, "/message.message/BoradcastMessage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *messageClient) MassSendMessage(ctx context.Context, in *MassSendMessageReq, opts ...grpc.CallOption) (*MassSendMessageResp, error) { + out := new(MassSendMessageResp) + err := c.cc.Invoke(ctx, "/message.message/MassSendMessage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *messageClient) GetChatLogs(ctx context.Context, in *GetChatLogsReq, opts ...grpc.CallOption) (*GetChatLogsResp, error) { + out := new(GetChatLogsResp) + err := c.cc.Invoke(ctx, "/message.message/GetChatLogs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *messageClient) WithdrawMessage(ctx context.Context, in *WithdrawMessageReq, opts ...grpc.CallOption) (*WithdrawMessageResp, error) { + out := new(WithdrawMessageResp) + err := c.cc.Invoke(ctx, "/message.message/WithdrawMessage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MessageServer is the server API for Message service. +type MessageServer interface { + BoradcastMessage(context.Context, *BoradcastMessageReq) (*BoradcastMessageResp, error) + MassSendMessage(context.Context, *MassSendMessageReq) (*MassSendMessageResp, error) + GetChatLogs(context.Context, *GetChatLogsReq) (*GetChatLogsResp, error) + WithdrawMessage(context.Context, *WithdrawMessageReq) (*WithdrawMessageResp, error) +} + +// UnimplementedMessageServer can be embedded to have forward compatible implementations. +type UnimplementedMessageServer struct { +} + +func (*UnimplementedMessageServer) BoradcastMessage(context.Context, *BoradcastMessageReq) (*BoradcastMessageResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method BoradcastMessage not implemented") +} +func (*UnimplementedMessageServer) MassSendMessage(context.Context, *MassSendMessageReq) (*MassSendMessageResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method MassSendMessage not implemented") +} +func (*UnimplementedMessageServer) GetChatLogs(context.Context, *GetChatLogsReq) (*GetChatLogsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChatLogs not implemented") +} +func (*UnimplementedMessageServer) WithdrawMessage(context.Context, *WithdrawMessageReq) (*WithdrawMessageResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawMessage not implemented") +} + +func RegisterMessageServer(s *grpc.Server, srv MessageServer) { + s.RegisterService(&_Message_serviceDesc, srv) +} + +func _Message_BoradcastMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BoradcastMessageReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessageServer).BoradcastMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/message.message/BoradcastMessage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessageServer).BoradcastMessage(ctx, req.(*BoradcastMessageReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Message_MassSendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MassSendMessageReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessageServer).MassSendMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/message.message/MassSendMessage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessageServer).MassSendMessage(ctx, req.(*MassSendMessageReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Message_GetChatLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetChatLogsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessageServer).GetChatLogs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/message.message/GetChatLogs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessageServer).GetChatLogs(ctx, req.(*GetChatLogsReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Message_WithdrawMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WithdrawMessageReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessageServer).WithdrawMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/message.message/WithdrawMessage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessageServer).WithdrawMessage(ctx, req.(*WithdrawMessageReq)) + } + return interceptor(ctx, in, info, handler) +} + +var _Message_serviceDesc = grpc.ServiceDesc{ + ServiceName: "message.message", + HandlerType: (*MessageServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "BoradcastMessage", + Handler: _Message_BoradcastMessage_Handler, + }, + { + MethodName: "MassSendMessage", + Handler: _Message_MassSendMessage_Handler, + }, + { + MethodName: "GetChatLogs", + Handler: _Message_GetChatLogs_Handler, + }, + { + MethodName: "WithdrawMessage", + Handler: _Message_WithdrawMessage_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "message/message.proto", +} diff --git a/pkg/proto/message/message.proto b/pkg/proto/message/message.proto new file mode 100644 index 0000000..7b557df --- /dev/null +++ b/pkg/proto/message/message.proto @@ -0,0 +1,57 @@ +syntax = "proto3"; +option go_package = "./message;message"; +package message; + +message BoradcastMessageReq { + string Message = 1; + string OperationID = 2; +} + +message BoradcastMessageResp { + +} + +message MassSendMessageReq { + string Message = 1; + repeated string UserIds = 2; + string OperationID = 3; +} + +message MassSendMessageResp { + +} + +message GetChatLogsReq { + string content = 1; + string UserId = 2; + string Date = 3; + int32 SessionType = 4; + int32 ContentType = 5; + string OperationID = 6; +} + +message GetChatLogsResp { + int32 SessionType = 1; + int32 ContentType = 2; + string SenderNickName = 3; + string ReciverNickName = 4; + string SearchContent = 5; + string Content = 6; + string Date = 7; +} + +message WithdrawMessageReq { + string ServerMsgId = 1; + string OperationID = 2; +} + +message WithdrawMessageResp { + +} + +service message { + rpc BoradcastMessage(BoradcastMessageReq) returns(BoradcastMessageResp); + rpc MassSendMessage(MassSendMessageReq) returns(MassSendMessageResp); + rpc GetChatLogs(GetChatLogsReq) returns(GetChatLogsResp); + rpc WithdrawMessage(WithdrawMessageReq) returns(WithdrawMessageResp); +} \ No newline at end of file diff --git a/pkg/proto/proto_dir.cfg b/pkg/proto/proto_dir.cfg index eed106f..e8c7881 100644 --- a/pkg/proto/proto_dir.cfg +++ b/pkg/proto/proto_dir.cfg @@ -1,6 +1,7 @@ all_proto=( - statistics/statistics.proto + message/message.proto + # statistics/statistics.proto # auth/auth.proto # friend/friend.proto # group/group.proto @@ -8,5 +9,6 @@ all_proto=( # chat/chat.proto # push/push.proto # relay/relay.proto - sdk_ws/ws.proto + # sdk_ws/ws.proto + ) diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 838827b..50631d0 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.15.5 +// protoc-gen-go v1.26.0 +// protoc v3.19.3 // source: sdk_ws/ws.proto package server_api_params diff --git a/pkg/proto/statistics/statistics.pb.go b/pkg/proto/statistics/statistics.pb.go index 0e333d8..5fd528d 100644 --- a/pkg/proto/statistics/statistics.pb.go +++ b/pkg/proto/statistics/statistics.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.15.5 +// protoc-gen-go v1.26.0 +// protoc v3.19.3 // source: statistics/statistics.proto package statistics import ( - sdk_ws "Open_IM/pkg/proto/sdk_ws" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -85,8 +84,8 @@ type GetActiveUserReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,1,opt,name=Pagination,proto3" json:"Pagination,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + StatisticsReq *StatisticsReq `protobuf:"bytes,1,opt,name=StatisticsReq,proto3" json:"StatisticsReq,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` } func (x *GetActiveUserReq) Reset() { @@ -121,9 +120,9 @@ func (*GetActiveUserReq) Descriptor() ([]byte, []int) { return file_statistics_statistics_proto_rawDescGZIP(), []int{1} } -func (x *GetActiveUserReq) GetPagination() *sdk_ws.ResponsePagination { +func (x *GetActiveUserReq) GetStatisticsReq() *StatisticsReq { if x != nil { - return x.Pagination + return x.StatisticsReq } return nil } @@ -142,7 +141,7 @@ type UserResp struct { NickName string `protobuf:"bytes,1,opt,name=NickName,proto3" json:"NickName,omitempty"` UserId string `protobuf:"bytes,2,opt,name=UserId,proto3" json:"UserId,omitempty"` - MessageNum string `protobuf:"bytes,3,opt,name=MessageNum,proto3" json:"MessageNum,omitempty"` + MessageNum int32 `protobuf:"varint,3,opt,name=MessageNum,proto3" json:"MessageNum,omitempty"` } func (x *UserResp) Reset() { @@ -191,11 +190,11 @@ func (x *UserResp) GetUserId() string { return "" } -func (x *UserResp) GetMessageNum() string { +func (x *UserResp) GetMessageNum() int32 { if x != nil { return x.MessageNum } - return "" + return 0 } type GetActiveUserResp struct { @@ -203,8 +202,7 @@ type GetActiveUserResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Users []*UserResp `protobuf:"bytes,1,rep,name=Users,proto3" json:"Users,omitempty"` - Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,2,opt,name=Pagination,proto3" json:"Pagination,omitempty"` + Users []*UserResp `protobuf:"bytes,1,rep,name=Users,proto3" json:"Users,omitempty"` } func (x *GetActiveUserResp) Reset() { @@ -246,20 +244,13 @@ func (x *GetActiveUserResp) GetUsers() []*UserResp { return nil } -func (x *GetActiveUserResp) GetPagination() *sdk_ws.ResponsePagination { - if x != nil { - return x.Pagination - } - return nil -} - type GetActiveGroupReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,1,opt,name=Pagination,proto3" json:"Pagination,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + StatisticsReq *StatisticsReq `protobuf:"bytes,1,opt,name=StatisticsReq,proto3" json:"StatisticsReq,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` } func (x *GetActiveGroupReq) Reset() { @@ -294,9 +285,9 @@ func (*GetActiveGroupReq) Descriptor() ([]byte, []int) { return file_statistics_statistics_proto_rawDescGZIP(), []int{4} } -func (x *GetActiveGroupReq) GetPagination() *sdk_ws.ResponsePagination { +func (x *GetActiveGroupReq) GetStatisticsReq() *StatisticsReq { if x != nil { - return x.Pagination + return x.StatisticsReq } return nil } @@ -315,7 +306,7 @@ type GroupResp struct { GroupName string `protobuf:"bytes,1,opt,name=GroupName,proto3" json:"GroupName,omitempty"` GroupId string `protobuf:"bytes,2,opt,name=GroupId,proto3" json:"GroupId,omitempty"` - MessageNum string `protobuf:"bytes,3,opt,name=MessageNum,proto3" json:"MessageNum,omitempty"` + MessageNum int32 `protobuf:"varint,3,opt,name=MessageNum,proto3" json:"MessageNum,omitempty"` } func (x *GroupResp) Reset() { @@ -364,11 +355,11 @@ func (x *GroupResp) GetGroupId() string { return "" } -func (x *GroupResp) GetMessageNum() string { +func (x *GroupResp) GetMessageNum() int32 { if x != nil { return x.MessageNum } - return "" + return 0 } type GetActiveGroupResp struct { @@ -376,8 +367,7 @@ type GetActiveGroupResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Groups []*GroupResp `protobuf:"bytes,1,rep,name=Groups,proto3" json:"Groups,omitempty"` - Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,2,opt,name=Pagination,proto3" json:"Pagination,omitempty"` + Groups []*GroupResp `protobuf:"bytes,1,rep,name=Groups,proto3" json:"Groups,omitempty"` } func (x *GetActiveGroupResp) Reset() { @@ -419,13 +409,6 @@ func (x *GetActiveGroupResp) GetGroups() []*GroupResp { return nil } -func (x *GetActiveGroupResp) GetPagination() *sdk_ws.ResponsePagination { - if x != nil { - return x.Pagination - } - return nil -} - type DateNumList struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -880,170 +863,158 @@ var File_statistics_statistics_proto protoreflect.FileDescriptor var file_statistics_statistics_proto_rawDesc = []byte{ 0x0a, 0x1b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x1a, 0x21, 0x4f, 0x70, 0x65, 0x6e, 0x5f, - 0x49, 0x4d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x64, 0x6b, - 0x5f, 0x77, 0x73, 0x2f, 0x77, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x0d, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, - 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, - 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, - 0x6f, 0x22, 0x7b, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x5e, - 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69, - 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4e, 0x69, - 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, - 0x0a, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x22, 0x86, - 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, - 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x52, 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, - 0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70, - 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x12, 0x45, 0x0a, 0x0a, - 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x63, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x22, 0x8a, 0x01, 0x0a, 0x12, 0x47, - 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x2d, 0x0a, 0x06, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x52, 0x06, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, - 0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70, - 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x33, 0x0a, 0x0b, 0x44, 0x61, 0x74, 0x65, 0x4e, - 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, - 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, 0x7c, 0x0a, 0x17, - 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, - 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x3f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x52, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x8c, 0x02, 0x0a, 0x18, 0x47, - 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, - 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x11, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x28, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, - 0x4d, 0x0a, 0x15, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, - 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x15, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x49, - 0x0a, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, - 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x7a, 0x0a, 0x15, 0x47, 0x65, 0x74, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, + 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x33, 0x0a, 0x0d, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, + 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, + 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x22, 0x75, + 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x3f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x52, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xfe, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x2a, 0x0a, 0x10, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x49, 0x6e, 0x63, 0x72, - 0x65, 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x12, 0x24, 0x0a, 0x0d, - 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0d, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, - 0x75, 0x6d, 0x12, 0x4b, 0x0a, 0x14, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, - 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x14, 0x49, 0x6e, 0x63, 0x72, 0x65, - 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x45, 0x0a, 0x11, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, - 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x11, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, - 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x79, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x3f, - 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, - 0x63, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, - 0x52, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, - 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x22, 0xe2, 0x02, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x0f, 0x49, - 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x24, 0x0a, 0x0d, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x54, - 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, - 0x49, 0x0a, 0x13, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, + 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x5e, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x22, 0x3f, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x05, 0x55, 0x73, + 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x52, + 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, 0x22, 0x76, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x12, 0x3f, 0x0a, 0x0d, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x52, 0x0d, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x63, + 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, + 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x4e, 0x75, 0x6d, 0x22, 0x43, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x06, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x52, 0x06, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x33, 0x0a, 0x0b, 0x44, 0x61, 0x74, 0x65, + 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4e, + 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, 0x7c, 0x0a, + 0x17, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x3f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x52, 0x0d, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x8c, 0x02, 0x0a, 0x18, + 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, + 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x11, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x28, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, + 0x12, 0x4d, 0x0a, 0x15, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, + 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x15, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x49, 0x0a, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x4e, 0x75, - 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x13, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x11, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, - 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x11, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x43, 0x0a, 0x10, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, - 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, + 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x7a, 0x0a, 0x15, 0x47, 0x65, + 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, + 0x52, 0x65, 0x71, 0x12, 0x3f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, + 0x73, 0x52, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x73, 0x52, 0x65, 0x71, 0x52, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, + 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xfe, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x2a, 0x0a, 0x10, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x49, 0x6e, 0x63, + 0x72, 0x65, 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x12, 0x24, 0x0a, + 0x0d, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x4e, 0x75, 0x6d, 0x12, 0x4b, 0x0a, 0x14, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, + 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x14, 0x49, 0x6e, 0x63, 0x72, + 0x65, 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x45, 0x0a, 0x11, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, + 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x10, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4e, - 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x32, 0xbf, 0x03, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, - 0x4c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x12, 0x1c, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, - 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1d, - 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f, 0x0a, - 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x11, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x79, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, + 0x3f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, + 0x71, 0x52, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, + 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x44, 0x22, 0xe2, 0x02, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x0f, + 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x24, 0x0a, 0x0d, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x22, 0x0a, 0x0c, + 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, + 0x12, 0x49, 0x0a, 0x13, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x4e, + 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x13, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x11, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x11, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x43, 0x0a, 0x10, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4e, + 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x4e, 0x75, + 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x10, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, + 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x32, 0xbf, 0x03, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, + 0x12, 0x4c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x12, 0x1c, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x1e, - 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x61, - 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, - 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x5b, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x21, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, - 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x58, - 0x0a, 0x11, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, - 0x69, 0x63, 0x73, 0x12, 0x20, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, - 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, - 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, - 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x3b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, - 0x69, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f, + 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x1d, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, + 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, + 0x1e, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x5b, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x21, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x58, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, + 0x74, 0x69, 0x63, 0x73, 0x12, 0x20, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, + 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x3b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, + 0x74, 0x69, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1060,54 +1031,51 @@ func file_statistics_statistics_proto_rawDescGZIP() []byte { var file_statistics_statistics_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_statistics_statistics_proto_goTypes = []interface{}{ - (*StatisticsReq)(nil), // 0: statistics.StatisticsReq - (*GetActiveUserReq)(nil), // 1: statistics.GetActiveUserReq - (*UserResp)(nil), // 2: statistics.UserResp - (*GetActiveUserResp)(nil), // 3: statistics.GetActiveUserResp - (*GetActiveGroupReq)(nil), // 4: statistics.GetActiveGroupReq - (*GroupResp)(nil), // 5: statistics.GroupResp - (*GetActiveGroupResp)(nil), // 6: statistics.GetActiveGroupResp - (*DateNumList)(nil), // 7: statistics.DateNumList - (*GetMessageStatisticsReq)(nil), // 8: statistics.GetMessageStatisticsReq - (*GetMessageStatisticsResp)(nil), // 9: statistics.GetMessageStatisticsResp - (*GetGroupStatisticsReq)(nil), // 10: statistics.GetGroupStatisticsReq - (*GetGroupStatisticsResp)(nil), // 11: statistics.GetGroupStatisticsResp - (*GetUserStatisticsReq)(nil), // 12: statistics.GetUserStatisticsReq - (*GetUserStatisticsResp)(nil), // 13: statistics.GetUserStatisticsResp - (*sdk_ws.ResponsePagination)(nil), // 14: server_api_params.ResponsePagination + (*StatisticsReq)(nil), // 0: statistics.StatisticsReq + (*GetActiveUserReq)(nil), // 1: statistics.GetActiveUserReq + (*UserResp)(nil), // 2: statistics.UserResp + (*GetActiveUserResp)(nil), // 3: statistics.GetActiveUserResp + (*GetActiveGroupReq)(nil), // 4: statistics.GetActiveGroupReq + (*GroupResp)(nil), // 5: statistics.GroupResp + (*GetActiveGroupResp)(nil), // 6: statistics.GetActiveGroupResp + (*DateNumList)(nil), // 7: statistics.DateNumList + (*GetMessageStatisticsReq)(nil), // 8: statistics.GetMessageStatisticsReq + (*GetMessageStatisticsResp)(nil), // 9: statistics.GetMessageStatisticsResp + (*GetGroupStatisticsReq)(nil), // 10: statistics.GetGroupStatisticsReq + (*GetGroupStatisticsResp)(nil), // 11: statistics.GetGroupStatisticsResp + (*GetUserStatisticsReq)(nil), // 12: statistics.GetUserStatisticsReq + (*GetUserStatisticsResp)(nil), // 13: statistics.GetUserStatisticsResp } var file_statistics_statistics_proto_depIdxs = []int32{ - 14, // 0: statistics.GetActiveUserReq.Pagination:type_name -> server_api_params.ResponsePagination + 0, // 0: statistics.GetActiveUserReq.StatisticsReq:type_name -> statistics.StatisticsReq 2, // 1: statistics.GetActiveUserResp.Users:type_name -> statistics.UserResp - 14, // 2: statistics.GetActiveUserResp.Pagination:type_name -> server_api_params.ResponsePagination - 14, // 3: statistics.GetActiveGroupReq.Pagination:type_name -> server_api_params.ResponsePagination - 5, // 4: statistics.GetActiveGroupResp.Groups:type_name -> statistics.GroupResp - 14, // 5: statistics.GetActiveGroupResp.Pagination:type_name -> server_api_params.ResponsePagination - 0, // 6: statistics.GetMessageStatisticsReq.StatisticsReq:type_name -> statistics.StatisticsReq - 7, // 7: statistics.GetMessageStatisticsResp.PrivateMessageNumList:type_name -> statistics.DateNumList - 7, // 8: statistics.GetMessageStatisticsResp.GroupMessageNumList:type_name -> statistics.DateNumList - 0, // 9: statistics.GetGroupStatisticsReq.StatisticsReq:type_name -> statistics.StatisticsReq - 7, // 10: statistics.GetGroupStatisticsResp.IncreaseGroupNumList:type_name -> statistics.DateNumList - 7, // 11: statistics.GetGroupStatisticsResp.TotalGroupNumList:type_name -> statistics.DateNumList - 0, // 12: statistics.GetUserStatisticsReq.StatisticsReq:type_name -> statistics.StatisticsReq - 7, // 13: statistics.GetUserStatisticsResp.IncreaseUserNumList:type_name -> statistics.DateNumList - 7, // 14: statistics.GetUserStatisticsResp.ActiveUserNumList:type_name -> statistics.DateNumList - 7, // 15: statistics.GetUserStatisticsResp.TotalUserNumList:type_name -> statistics.DateNumList - 1, // 16: statistics.user.GetActiveUser:input_type -> statistics.GetActiveUserReq - 4, // 17: statistics.user.GetActiveGroup:input_type -> statistics.GetActiveGroupReq - 8, // 18: statistics.user.GetMessageStatistics:input_type -> statistics.GetMessageStatisticsReq - 10, // 19: statistics.user.GetGroupStatistics:input_type -> statistics.GetGroupStatisticsReq - 12, // 20: statistics.user.GetUserStatistics:input_type -> statistics.GetUserStatisticsReq - 3, // 21: statistics.user.GetActiveUser:output_type -> statistics.GetActiveUserResp - 6, // 22: statistics.user.GetActiveGroup:output_type -> statistics.GetActiveGroupResp - 9, // 23: statistics.user.GetMessageStatistics:output_type -> statistics.GetMessageStatisticsResp - 11, // 24: statistics.user.GetGroupStatistics:output_type -> statistics.GetGroupStatisticsResp - 13, // 25: statistics.user.GetUserStatistics:output_type -> statistics.GetUserStatisticsResp - 21, // [21:26] is the sub-list for method output_type - 16, // [16:21] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 0, // 2: statistics.GetActiveGroupReq.StatisticsReq:type_name -> statistics.StatisticsReq + 5, // 3: statistics.GetActiveGroupResp.Groups:type_name -> statistics.GroupResp + 0, // 4: statistics.GetMessageStatisticsReq.StatisticsReq:type_name -> statistics.StatisticsReq + 7, // 5: statistics.GetMessageStatisticsResp.PrivateMessageNumList:type_name -> statistics.DateNumList + 7, // 6: statistics.GetMessageStatisticsResp.GroupMessageNumList:type_name -> statistics.DateNumList + 0, // 7: statistics.GetGroupStatisticsReq.StatisticsReq:type_name -> statistics.StatisticsReq + 7, // 8: statistics.GetGroupStatisticsResp.IncreaseGroupNumList:type_name -> statistics.DateNumList + 7, // 9: statistics.GetGroupStatisticsResp.TotalGroupNumList:type_name -> statistics.DateNumList + 0, // 10: statistics.GetUserStatisticsReq.StatisticsReq:type_name -> statistics.StatisticsReq + 7, // 11: statistics.GetUserStatisticsResp.IncreaseUserNumList:type_name -> statistics.DateNumList + 7, // 12: statistics.GetUserStatisticsResp.ActiveUserNumList:type_name -> statistics.DateNumList + 7, // 13: statistics.GetUserStatisticsResp.TotalUserNumList:type_name -> statistics.DateNumList + 1, // 14: statistics.user.GetActiveUser:input_type -> statistics.GetActiveUserReq + 4, // 15: statistics.user.GetActiveGroup:input_type -> statistics.GetActiveGroupReq + 8, // 16: statistics.user.GetMessageStatistics:input_type -> statistics.GetMessageStatisticsReq + 10, // 17: statistics.user.GetGroupStatistics:input_type -> statistics.GetGroupStatisticsReq + 12, // 18: statistics.user.GetUserStatistics:input_type -> statistics.GetUserStatisticsReq + 3, // 19: statistics.user.GetActiveUser:output_type -> statistics.GetActiveUserResp + 6, // 20: statistics.user.GetActiveGroup:output_type -> statistics.GetActiveGroupResp + 9, // 21: statistics.user.GetMessageStatistics:output_type -> statistics.GetMessageStatisticsResp + 11, // 22: statistics.user.GetGroupStatistics:output_type -> statistics.GetGroupStatisticsResp + 13, // 23: statistics.user.GetUserStatistics:output_type -> statistics.GetUserStatisticsResp + 19, // [19:24] is the sub-list for method output_type + 14, // [14:19] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_statistics_statistics_proto_init() } diff --git a/pkg/proto/statistics/statistics.proto b/pkg/proto/statistics/statistics.proto index 8327129..3c72e4b 100644 --- a/pkg/proto/statistics/statistics.proto +++ b/pkg/proto/statistics/statistics.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -import "Open_IM/pkg/proto/sdk_ws/ws.proto"; +// import "Open_IM/pkg/proto/sdk_ws/ws.proto"; option go_package = "./statistics;statistics"; package statistics; @@ -9,35 +9,33 @@ message StatisticsReq { } message GetActiveUserReq{ - server_api_params.ResponsePagination Pagination = 1; + StatisticsReq StatisticsReq = 1; string OperationID = 2; } message UserResp{ string NickName = 1; string UserId = 2; - string MessageNum = 3; + int32 MessageNum = 3; } message GetActiveUserResp { repeated UserResp Users = 1; - server_api_params.ResponsePagination Pagination = 2; } message GetActiveGroupReq{ - server_api_params.ResponsePagination Pagination = 1; + StatisticsReq StatisticsReq = 1; string OperationID = 2; } message GroupResp { string GroupName = 1; string GroupId = 2; - string MessageNum = 3; + int32 MessageNum = 3; } message GetActiveGroupResp { repeated GroupResp Groups = 1; - server_api_params.ResponsePagination Pagination = 2; } message DateNumList { diff --git a/pkg/proto/user/user.pb.go b/pkg/proto/user/user.pb.go index 29fcaa1..37e9f73 100644 --- a/pkg/proto/user/user.pb.go +++ b/pkg/proto/user/user.pb.go @@ -1189,7 +1189,7 @@ func (x *ResignUserResp) GetCommonResp() *CommonResp { return nil } -type GetUserReq struct { +type GetUserByIdReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1198,8 +1198,8 @@ type GetUserReq struct { OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` } -func (x *GetUserReq) Reset() { - *x = GetUserReq{} +func (x *GetUserByIdReq) Reset() { + *x = GetUserByIdReq{} if protoimpl.UnsafeEnabled { mi := &file_user_user_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1207,13 +1207,13 @@ func (x *GetUserReq) Reset() { } } -func (x *GetUserReq) String() string { +func (x *GetUserByIdReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetUserReq) ProtoMessage() {} +func (*GetUserByIdReq) ProtoMessage() {} -func (x *GetUserReq) ProtoReflect() protoreflect.Message { +func (x *GetUserByIdReq) ProtoReflect() protoreflect.Message { mi := &file_user_user_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1225,19 +1225,19 @@ func (x *GetUserReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetUserReq.ProtoReflect.Descriptor instead. -func (*GetUserReq) Descriptor() ([]byte, []int) { +// Deprecated: Use GetUserByIdReq.ProtoReflect.Descriptor instead. +func (*GetUserByIdReq) Descriptor() ([]byte, []int) { return file_user_user_proto_rawDescGZIP(), []int{20} } -func (x *GetUserReq) GetUserId() string { +func (x *GetUserByIdReq) GetUserId() string { if x != nil { return x.UserId } return "" } -func (x *GetUserReq) GetOperationID() string { +func (x *GetUserByIdReq) GetOperationID() string { if x != nil { return x.OperationID } @@ -1323,7 +1323,7 @@ func (x *User) GetIsBlock() bool { return false } -type GetUserResp struct { +type GetUserByIdResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1332,8 +1332,8 @@ type GetUserResp struct { User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` } -func (x *GetUserResp) Reset() { - *x = GetUserResp{} +func (x *GetUserByIdResp) Reset() { + *x = GetUserByIdResp{} if protoimpl.UnsafeEnabled { mi := &file_user_user_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1341,13 +1341,13 @@ func (x *GetUserResp) Reset() { } } -func (x *GetUserResp) String() string { +func (x *GetUserByIdResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetUserResp) ProtoMessage() {} +func (*GetUserByIdResp) ProtoMessage() {} -func (x *GetUserResp) ProtoReflect() protoreflect.Message { +func (x *GetUserByIdResp) ProtoReflect() protoreflect.Message { mi := &file_user_user_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1359,19 +1359,19 @@ func (x *GetUserResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetUserResp.ProtoReflect.Descriptor instead. -func (*GetUserResp) Descriptor() ([]byte, []int) { +// Deprecated: Use GetUserByIdResp.ProtoReflect.Descriptor instead. +func (*GetUserByIdResp) Descriptor() ([]byte, []int) { return file_user_user_proto_rawDescGZIP(), []int{22} } -func (x *GetUserResp) GetCommonResp() *CommonResp { +func (x *GetUserByIdResp) GetCommonResp() *CommonResp { if x != nil { return x.CommonResp } return nil } -func (x *GetUserResp) GetUser() *User { +func (x *GetUserByIdResp) GetUser() *User { if x != nil { return x.User } @@ -1511,6 +1511,7 @@ type GetUsersReq struct { OperationID string `protobuf:"bytes,1,opt,name=OperationID,proto3" json:"OperationID,omitempty"` Pagination *sdk_ws.RequestPagination `protobuf:"bytes,2,opt,name=Pagination,proto3" json:"Pagination,omitempty"` + UserName string `protobuf:"bytes,3,opt,name=UserName,proto3" json:"UserName,omitempty"` } func (x *GetUsersReq) Reset() { @@ -1559,16 +1560,22 @@ func (x *GetUsersReq) GetPagination() *sdk_ws.RequestPagination { return nil } +func (x *GetUsersReq) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + type GetUsersResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp,proto3" json:"CommonResp,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` - User []*User `protobuf:"bytes,3,rep,name=user,proto3" json:"user,omitempty"` - UserNum int32 `protobuf:"varint,4,opt,name=UserNum,proto3" json:"UserNum,omitempty"` - Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,5,opt,name=Pagination,proto3" json:"Pagination,omitempty"` + User []*User `protobuf:"bytes,2,rep,name=user,proto3" json:"user,omitempty"` + Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,3,opt,name=Pagination,proto3" json:"Pagination,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=OperationID,proto3" json:"OperationID,omitempty"` } func (x *GetUsersResp) Reset() { @@ -1610,13 +1617,6 @@ func (x *GetUsersResp) GetCommonResp() *CommonResp { return nil } -func (x *GetUsersResp) GetOperationID() string { - if x != nil { - return x.OperationID - } - return "" -} - func (x *GetUsersResp) GetUser() []*User { if x != nil { return x.User @@ -1624,18 +1624,18 @@ func (x *GetUsersResp) GetUser() []*User { return nil } -func (x *GetUsersResp) GetUserNum() int32 { +func (x *GetUsersResp) GetPagination() *sdk_ws.ResponsePagination { if x != nil { - return x.UserNum + return x.Pagination } - return 0 + return nil } -func (x *GetUsersResp) GetPagination() *sdk_ws.ResponsePagination { +func (x *GetUsersResp) GetOperationID() string { if x != nil { - return x.Pagination + return x.OperationID } - return nil + return "" } type AddUserReq struct { @@ -2099,10 +2099,9 @@ type GetBlockUsersResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp,proto3" json:"CommonResp,omitempty"` - BlockUsers []*BlockUser `protobuf:"bytes,2,rep,name=BlockUsers,proto3" json:"BlockUsers,omitempty"` - Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,3,opt,name=Pagination,proto3" json:"Pagination,omitempty"` - BlockUserNum int32 `protobuf:"varint,4,opt,name=BlockUserNum,proto3" json:"BlockUserNum,omitempty"` + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp,proto3" json:"CommonResp,omitempty"` + BlockUsers []*BlockUser `protobuf:"bytes,2,rep,name=BlockUsers,proto3" json:"BlockUsers,omitempty"` + Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,3,opt,name=Pagination,proto3" json:"Pagination,omitempty"` } func (x *GetBlockUsersResp) Reset() { @@ -2158,14 +2157,7 @@ func (x *GetBlockUsersResp) GetPagination() *sdk_ws.ResponsePagination { return nil } -func (x *GetBlockUsersResp) GetBlockUserNum() int32 { - if x != nil { - return x.BlockUserNum - } - return 0 -} - -type GetBlockUserReq struct { +type GetBlockUserByIdReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -2174,8 +2166,8 @@ type GetBlockUserReq struct { OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` } -func (x *GetBlockUserReq) Reset() { - *x = GetBlockUserReq{} +func (x *GetBlockUserByIdReq) Reset() { + *x = GetBlockUserByIdReq{} if protoimpl.UnsafeEnabled { mi := &file_user_user_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2183,13 +2175,13 @@ func (x *GetBlockUserReq) Reset() { } } -func (x *GetBlockUserReq) String() string { +func (x *GetBlockUserByIdReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetBlockUserReq) ProtoMessage() {} +func (*GetBlockUserByIdReq) ProtoMessage() {} -func (x *GetBlockUserReq) ProtoReflect() protoreflect.Message { +func (x *GetBlockUserByIdReq) ProtoReflect() protoreflect.Message { mi := &file_user_user_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2201,26 +2193,26 @@ func (x *GetBlockUserReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetBlockUserReq.ProtoReflect.Descriptor instead. -func (*GetBlockUserReq) Descriptor() ([]byte, []int) { +// Deprecated: Use GetBlockUserByIdReq.ProtoReflect.Descriptor instead. +func (*GetBlockUserByIdReq) Descriptor() ([]byte, []int) { return file_user_user_proto_rawDescGZIP(), []int{36} } -func (x *GetBlockUserReq) GetUserId() string { +func (x *GetBlockUserByIdReq) GetUserId() string { if x != nil { return x.UserId } return "" } -func (x *GetBlockUserReq) GetOperationID() string { +func (x *GetBlockUserByIdReq) GetOperationID() string { if x != nil { return x.OperationID } return "" } -type GetBlockUserResp struct { +type GetBlockUserByIdResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -2228,8 +2220,8 @@ type GetBlockUserResp struct { BlockUser *BlockUser `protobuf:"bytes,2,opt,name=BlockUser,proto3" json:"BlockUser,omitempty"` } -func (x *GetBlockUserResp) Reset() { - *x = GetBlockUserResp{} +func (x *GetBlockUserByIdResp) Reset() { + *x = GetBlockUserByIdResp{} if protoimpl.UnsafeEnabled { mi := &file_user_user_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2237,13 +2229,13 @@ func (x *GetBlockUserResp) Reset() { } } -func (x *GetBlockUserResp) String() string { +func (x *GetBlockUserByIdResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetBlockUserResp) ProtoMessage() {} +func (*GetBlockUserByIdResp) ProtoMessage() {} -func (x *GetBlockUserResp) ProtoReflect() protoreflect.Message { +func (x *GetBlockUserByIdResp) ProtoReflect() protoreflect.Message { mi := &file_user_user_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2255,18 +2247,111 @@ func (x *GetBlockUserResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetBlockUserResp.ProtoReflect.Descriptor instead. -func (*GetBlockUserResp) Descriptor() ([]byte, []int) { +// Deprecated: Use GetBlockUserByIdResp.ProtoReflect.Descriptor instead. +func (*GetBlockUserByIdResp) Descriptor() ([]byte, []int) { return file_user_user_proto_rawDescGZIP(), []int{37} } -func (x *GetBlockUserResp) GetBlockUser() *BlockUser { +func (x *GetBlockUserByIdResp) GetBlockUser() *BlockUser { if x != nil { return x.BlockUser } return nil } +type DeleteUserReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId string `protobuf:"bytes,1,opt,name=User_id,json=UserId,proto3" json:"User_id,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` +} + +func (x *DeleteUserReq) Reset() { + *x = DeleteUserReq{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteUserReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteUserReq) ProtoMessage() {} + +func (x *DeleteUserReq) ProtoReflect() protoreflect.Message { + mi := &file_user_user_proto_msgTypes[38] + 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 DeleteUserReq.ProtoReflect.Descriptor instead. +func (*DeleteUserReq) Descriptor() ([]byte, []int) { + return file_user_user_proto_rawDescGZIP(), []int{38} +} + +func (x *DeleteUserReq) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *DeleteUserReq) GetOperationID() string { + if x != nil { + return x.OperationID + } + return "" +} + +type DeleteUserResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteUserResp) Reset() { + *x = DeleteUserResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteUserResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteUserResp) ProtoMessage() {} + +func (x *DeleteUserResp) ProtoReflect() protoreflect.Message { + mi := &file_user_user_proto_msgTypes[39] + 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 DeleteUserResp.ProtoReflect.Descriptor instead. +func (*DeleteUserResp) Descriptor() ([]byte, []int) { + return file_user_user_proto_rawDescGZIP(), []int{39} +} + type AccountCheckResp_SingleUserStatus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2279,7 +2364,7 @@ type AccountCheckResp_SingleUserStatus struct { func (x *AccountCheckResp_SingleUserStatus) Reset() { *x = AccountCheckResp_SingleUserStatus{} if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[38] + mi := &file_user_user_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2292,7 +2377,7 @@ func (x *AccountCheckResp_SingleUserStatus) String() string { func (*AccountCheckResp_SingleUserStatus) ProtoMessage() {} func (x *AccountCheckResp_SingleUserStatus) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[38] + mi := &file_user_user_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2483,207 +2568,217 @@ var file_user_user_proto_rawDesc = []byte{ 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x22, 0x46, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x98, 0x01, 0x0a, - 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x50, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63, - 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4e, 0x69, 0x63, - 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, - 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x49, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x49, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x5f, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x9c, 0x01, 0x0a, 0x0c, 0x41, 0x6c, 0x74, - 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x41, 0x0a, 0x0d, 0x41, 0x6c, 0x74, 0x65, 0x72, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x75, 0x0a, 0x0b, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x44, 0x0a, 0x0a, 0x50, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0xe3, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, - 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, - 0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70, - 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x68, 0x6f, 0x6e, 0x65, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x50, 0x68, - 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x4a, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, + 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, + 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x22, 0x98, 0x01, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x0a, + 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3f, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x70, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x26, - 0x0a, 0x0e, 0x45, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x45, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x41, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, - 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x4a, 0x0a, 0x0e, 0x55, - 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, - 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x43, 0x0a, 0x0f, 0x55, 0x6e, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x9e, 0x01, 0x0a, - 0x10, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x71, 0x12, 0x44, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, - 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x22, 0x7f, 0x0a, - 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x04, 0x55, 0x73, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x42, 0x65, - 0x67, 0x69, 0x6e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x44, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x45, 0x6e, 0x64, 0x44, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x45, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xe1, - 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x49, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x63, 0x0a, 0x0f, 0x47, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, + 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x1e, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, + 0x22, 0x9c, 0x01, 0x0a, 0x0c, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x50, + 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0b, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, + 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x6d, 0x61, + 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x22, + 0x41, 0x0a, 0x0d, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x22, 0x91, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x44, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, + 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x73, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x55, 0x73, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xc9, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x75, 0x73, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x44, 0x22, 0x7c, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x3f, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x22, 0x70, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x45, 0x6e, 0x64, + 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x45, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x44, 0x22, 0x41, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, - 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x0a, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, - 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x4e, - 0x75, 0x6d, 0x22, 0x4c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x17, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, - 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, - 0x22, 0x41, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, - 0x73, 0x65, 0x72, 0x32, 0xc7, 0x08, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0b, - 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x71, 0x1a, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x43, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, - 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x14, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a, 0x0c, 0x47, 0x65, 0x74, - 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x71, - 0x1a, 0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x12, 0x55, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x52, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x4a, 0x0a, 0x0e, 0x55, 0x6e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x44, 0x22, 0x43, 0x0a, 0x0f, 0x55, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x9e, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, 0x44, 0x0a, 0x0a, + 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, + 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x22, 0x7f, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x44, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x45, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x45, 0x6e, 0x64, 0x44, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x11, 0x47, 0x65, + 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x30, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x2f, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, + 0x72, 0x73, 0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, + 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x13, 0x47, 0x65, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, + 0x12, 0x17, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x45, 0x0a, 0x14, 0x47, + 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, + 0x65, 0x72, 0x22, 0x4a, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x12, 0x17, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x10, + 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x32, 0x98, 0x09, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0b, 0x47, 0x65, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x15, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x43, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, + 0x1a, 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0b, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, + 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, + 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x44, 0x52, 0x65, 0x73, 0x70, 0x12, 0x55, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x12, 0x1d, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x55, 0x0a, 0x14, + 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x4f, 0x70, 0x74, 0x12, 0x1d, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, - 0x12, 0x1d, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x71, 0x1a, - 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x55, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x12, 0x1d, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, - 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x4f, 0x70, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, - 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x61, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, - 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x4f, - 0x70, 0x74, 0x12, 0x21, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, + 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x61, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x12, + 0x21, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x52, + 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x4f, - 0x70, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, - 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x73, 0x67, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a, 0x0c, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, - 0x1a, 0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2e, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x69, - 0x67, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, - 0x73, 0x69, 0x67, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x34, 0x0a, 0x09, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x12, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x31, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x73, 0x12, 0x11, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2e, 0x0a, 0x07, 0x41, 0x64, - 0x64, 0x55, 0x73, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, - 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x09, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x3a, 0x0a, 0x0b, 0x55, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, - 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x6e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0d, - 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, - 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, - 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x15, + 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x42, 0x79, 0x49, 0x64, 0x12, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x37, 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, + 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x69, + 0x67, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x09, 0x41, 0x6c, + 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, + 0x6c, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x31, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x11, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, + 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x2e, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x12, 0x10, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x1a, 0x11, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, + 0x12, 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0b, 0x55, 0x6e, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x55, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x15, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0d, 0x5a, - 0x0b, 0x2e, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x12, 0x19, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x42, + 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x37, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x12, 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, + 0x2f, 0x75, 0x73, 0x65, 0x72, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -2698,7 +2793,7 @@ func file_user_user_proto_rawDescGZIP() []byte { return file_user_user_proto_rawDescData } -var file_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 39) +var file_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 41) var file_user_user_proto_goTypes = []interface{}{ (*CommonResp)(nil), // 0: user.CommonResp (*DeleteUsersReq)(nil), // 1: user.DeleteUsersReq @@ -2720,9 +2815,9 @@ var file_user_user_proto_goTypes = []interface{}{ (*GetAllConversationMsgOptResp)(nil), // 17: user.GetAllConversationMsgOptResp (*ResignUserReq)(nil), // 18: user.ResignUserReq (*ResignUserResp)(nil), // 19: user.ResignUserResp - (*GetUserReq)(nil), // 20: user.GetUserReq + (*GetUserByIdReq)(nil), // 20: user.GetUserByIdReq (*User)(nil), // 21: user.User - (*GetUserResp)(nil), // 22: user.GetUserResp + (*GetUserByIdResp)(nil), // 22: user.GetUserByIdResp (*AlterUserReq)(nil), // 23: user.AlterUserReq (*AlterUserResp)(nil), // 24: user.AlterUserResp (*GetUsersReq)(nil), // 25: user.GetUsersReq @@ -2736,21 +2831,23 @@ var file_user_user_proto_goTypes = []interface{}{ (*GetBlockUsersReq)(nil), // 33: user.GetBlockUsersReq (*BlockUser)(nil), // 34: user.BlockUser (*GetBlockUsersResp)(nil), // 35: user.GetBlockUsersResp - (*GetBlockUserReq)(nil), // 36: user.GetBlockUserReq - (*GetBlockUserResp)(nil), // 37: user.GetBlockUserResp - (*AccountCheckResp_SingleUserStatus)(nil), // 38: user.AccountCheckResp.SingleUserStatus - (*sdk_ws.UserInfo)(nil), // 39: server_api_params.UserInfo - (*sdk_ws.RequestPagination)(nil), // 40: server_api_params.RequestPagination - (*sdk_ws.ResponsePagination)(nil), // 41: server_api_params.ResponsePagination + (*GetBlockUserByIdReq)(nil), // 36: user.GetBlockUserByIdReq + (*GetBlockUserByIdResp)(nil), // 37: user.GetBlockUserByIdResp + (*DeleteUserReq)(nil), // 38: user.DeleteUserReq + (*DeleteUserResp)(nil), // 39: user.DeleteUserResp + (*AccountCheckResp_SingleUserStatus)(nil), // 40: user.AccountCheckResp.SingleUserStatus + (*sdk_ws.UserInfo)(nil), // 41: server_api_params.UserInfo + (*sdk_ws.RequestPagination)(nil), // 42: server_api_params.RequestPagination + (*sdk_ws.ResponsePagination)(nil), // 43: server_api_params.ResponsePagination } var file_user_user_proto_depIdxs = []int32{ 0, // 0: user.DeleteUsersResp.CommonResp:type_name -> user.CommonResp 0, // 1: user.GetAllUserIDResp.CommonResp:type_name -> user.CommonResp 0, // 2: user.AccountCheckResp.commonResp:type_name -> user.CommonResp - 38, // 3: user.AccountCheckResp.ResultList:type_name -> user.AccountCheckResp.SingleUserStatus + 40, // 3: user.AccountCheckResp.ResultList:type_name -> user.AccountCheckResp.SingleUserStatus 0, // 4: user.GetUserInfoResp.commonResp:type_name -> user.CommonResp - 39, // 5: user.GetUserInfoResp.UserInfoList:type_name -> server_api_params.UserInfo - 39, // 6: user.UpdateUserInfoReq.UserInfo:type_name -> server_api_params.UserInfo + 41, // 5: user.GetUserInfoResp.UserInfoList:type_name -> server_api_params.UserInfo + 41, // 6: user.UpdateUserInfoReq.UserInfo:type_name -> server_api_params.UserInfo 0, // 7: user.UpdateUserInfoResp.commonResp:type_name -> user.CommonResp 0, // 8: user.SetReceiveMessageOptResp.commonResp:type_name -> user.CommonResp 12, // 9: user.SetReceiveMessageOptResp.conversationOptResultList:type_name -> user.OptResult @@ -2759,22 +2856,22 @@ var file_user_user_proto_depIdxs = []int32{ 0, // 12: user.GetAllConversationMsgOptResp.commonResp:type_name -> user.CommonResp 12, // 13: user.GetAllConversationMsgOptResp.conversationOptResultList:type_name -> user.OptResult 0, // 14: user.ResignUserResp.commonResp:type_name -> user.CommonResp - 0, // 15: user.GetUserResp.CommonResp:type_name -> user.CommonResp - 21, // 16: user.GetUserResp.user:type_name -> user.User + 0, // 15: user.GetUserByIdResp.CommonResp:type_name -> user.CommonResp + 21, // 16: user.GetUserByIdResp.user:type_name -> user.User 0, // 17: user.AlterUserResp.CommonResp:type_name -> user.CommonResp - 40, // 18: user.GetUsersReq.Pagination:type_name -> server_api_params.RequestPagination + 42, // 18: user.GetUsersReq.Pagination:type_name -> server_api_params.RequestPagination 0, // 19: user.GetUsersResp.CommonResp:type_name -> user.CommonResp 21, // 20: user.GetUsersResp.user:type_name -> user.User - 41, // 21: user.GetUsersResp.Pagination:type_name -> server_api_params.ResponsePagination + 43, // 21: user.GetUsersResp.Pagination:type_name -> server_api_params.ResponsePagination 0, // 22: user.AddUserResp.CommonResp:type_name -> user.CommonResp 0, // 23: user.BlockUserResp.CommonResp:type_name -> user.CommonResp 0, // 24: user.UnBlockUserResp.CommonResp:type_name -> user.CommonResp - 40, // 25: user.GetBlockUsersReq.Pagination:type_name -> server_api_params.RequestPagination + 42, // 25: user.GetBlockUsersReq.Pagination:type_name -> server_api_params.RequestPagination 21, // 26: user.BlockUser.User:type_name -> user.User 0, // 27: user.GetBlockUsersResp.CommonResp:type_name -> user.CommonResp 34, // 28: user.GetBlockUsersResp.BlockUsers:type_name -> user.BlockUser - 41, // 29: user.GetBlockUsersResp.Pagination:type_name -> server_api_params.ResponsePagination - 34, // 30: user.GetBlockUserResp.BlockUser:type_name -> user.BlockUser + 43, // 29: user.GetBlockUsersResp.Pagination:type_name -> server_api_params.ResponsePagination + 34, // 30: user.GetBlockUserByIdResp.BlockUser:type_name -> user.BlockUser 7, // 31: user.user.GetUserInfo:input_type -> user.GetUserInfoReq 9, // 32: user.user.UpdateUserInfo:input_type -> user.UpdateUserInfoReq 1, // 33: user.user.DeleteUsers:input_type -> user.DeleteUsersReq @@ -2783,7 +2880,7 @@ var file_user_user_proto_depIdxs = []int32{ 14, // 36: user.user.GetReceiveMessageOpt:input_type -> user.GetReceiveMessageOptReq 16, // 37: user.user.GetAllConversationMsgOpt:input_type -> user.GetAllConversationMsgOptReq 5, // 38: user.user.AccountCheck:input_type -> user.AccountCheckReq - 20, // 39: user.user.GetUser:input_type -> user.GetUserReq + 20, // 39: user.user.GetUserById:input_type -> user.GetUserByIdReq 18, // 40: user.user.ResignUser:input_type -> user.ResignUserReq 23, // 41: user.user.AlterUser:input_type -> user.AlterUserReq 25, // 42: user.user.GetUsers:input_type -> user.GetUsersReq @@ -2791,26 +2888,28 @@ var file_user_user_proto_depIdxs = []int32{ 29, // 44: user.user.BlockUser:input_type -> user.BlockUserReq 31, // 45: user.user.UnBlockUser:input_type -> user.UnBlockUserReq 33, // 46: user.user.GetBlockUsers:input_type -> user.GetBlockUsersReq - 36, // 47: user.user.GetBlockUser:input_type -> user.GetBlockUserReq - 8, // 48: user.user.GetUserInfo:output_type -> user.GetUserInfoResp - 10, // 49: user.user.UpdateUserInfo:output_type -> user.UpdateUserInfoResp - 2, // 50: user.user.DeleteUsers:output_type -> user.DeleteUsersResp - 4, // 51: user.user.GetAllUserID:output_type -> user.GetAllUserIDResp - 13, // 52: user.user.SetReceiveMessageOpt:output_type -> user.SetReceiveMessageOptResp - 15, // 53: user.user.GetReceiveMessageOpt:output_type -> user.GetReceiveMessageOptResp - 17, // 54: user.user.GetAllConversationMsgOpt:output_type -> user.GetAllConversationMsgOptResp - 6, // 55: user.user.AccountCheck:output_type -> user.AccountCheckResp - 22, // 56: user.user.GetUser:output_type -> user.GetUserResp - 19, // 57: user.user.ResignUser:output_type -> user.ResignUserResp - 24, // 58: user.user.AlterUser:output_type -> user.AlterUserResp - 26, // 59: user.user.GetUsers:output_type -> user.GetUsersResp - 28, // 60: user.user.AddUser:output_type -> user.AddUserResp - 30, // 61: user.user.BlockUser:output_type -> user.BlockUserResp - 32, // 62: user.user.UnBlockUser:output_type -> user.UnBlockUserResp - 35, // 63: user.user.GetBlockUsers:output_type -> user.GetBlockUsersResp - 37, // 64: user.user.GetBlockUser:output_type -> user.GetBlockUserResp - 48, // [48:65] is the sub-list for method output_type - 31, // [31:48] is the sub-list for method input_type + 36, // 47: user.user.GetBlockUserById:input_type -> user.GetBlockUserByIdReq + 38, // 48: user.user.DeleteUser:input_type -> user.DeleteUserReq + 8, // 49: user.user.GetUserInfo:output_type -> user.GetUserInfoResp + 10, // 50: user.user.UpdateUserInfo:output_type -> user.UpdateUserInfoResp + 2, // 51: user.user.DeleteUsers:output_type -> user.DeleteUsersResp + 4, // 52: user.user.GetAllUserID:output_type -> user.GetAllUserIDResp + 13, // 53: user.user.SetReceiveMessageOpt:output_type -> user.SetReceiveMessageOptResp + 15, // 54: user.user.GetReceiveMessageOpt:output_type -> user.GetReceiveMessageOptResp + 17, // 55: user.user.GetAllConversationMsgOpt:output_type -> user.GetAllConversationMsgOptResp + 6, // 56: user.user.AccountCheck:output_type -> user.AccountCheckResp + 22, // 57: user.user.GetUserById:output_type -> user.GetUserByIdResp + 19, // 58: user.user.ResignUser:output_type -> user.ResignUserResp + 24, // 59: user.user.AlterUser:output_type -> user.AlterUserResp + 26, // 60: user.user.GetUsers:output_type -> user.GetUsersResp + 28, // 61: user.user.AddUser:output_type -> user.AddUserResp + 30, // 62: user.user.BlockUser:output_type -> user.BlockUserResp + 32, // 63: user.user.UnBlockUser:output_type -> user.UnBlockUserResp + 35, // 64: user.user.GetBlockUsers:output_type -> user.GetBlockUsersResp + 37, // 65: user.user.GetBlockUserById:output_type -> user.GetBlockUserByIdResp + 39, // 66: user.user.DeleteUser:output_type -> user.DeleteUserResp + 49, // [49:67] is the sub-list for method output_type + 31, // [31:49] is the sub-list for method input_type 31, // [31:31] is the sub-list for extension type_name 31, // [31:31] is the sub-list for extension extendee 0, // [0:31] is the sub-list for field type_name @@ -3063,7 +3162,7 @@ func file_user_user_proto_init() { } } file_user_user_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserReq); i { + switch v := v.(*GetUserByIdReq); i { case 0: return &v.state case 1: @@ -3087,7 +3186,7 @@ func file_user_user_proto_init() { } } file_user_user_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserResp); i { + switch v := v.(*GetUserByIdResp); i { case 0: return &v.state case 1: @@ -3255,7 +3354,7 @@ func file_user_user_proto_init() { } } file_user_user_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBlockUserReq); i { + switch v := v.(*GetBlockUserByIdReq); i { case 0: return &v.state case 1: @@ -3267,7 +3366,7 @@ func file_user_user_proto_init() { } } file_user_user_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBlockUserResp); i { + switch v := v.(*GetBlockUserByIdResp); i { case 0: return &v.state case 1: @@ -3279,6 +3378,30 @@ func file_user_user_proto_init() { } } file_user_user_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteUserReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_user_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteUserResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_user_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AccountCheckResp_SingleUserStatus); i { case 0: return &v.state @@ -3297,7 +3420,7 @@ func file_user_user_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_user_user_proto_rawDesc, NumEnums: 0, - NumMessages: 39, + NumMessages: 41, NumExtensions: 0, NumServices: 1, }, @@ -3331,7 +3454,7 @@ type UserClient interface { GetReceiveMessageOpt(ctx context.Context, in *GetReceiveMessageOptReq, opts ...grpc.CallOption) (*GetReceiveMessageOptResp, error) GetAllConversationMsgOpt(ctx context.Context, in *GetAllConversationMsgOptReq, opts ...grpc.CallOption) (*GetAllConversationMsgOptResp, error) AccountCheck(ctx context.Context, in *AccountCheckReq, opts ...grpc.CallOption) (*AccountCheckResp, error) - GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*GetUserResp, error) + GetUserById(ctx context.Context, in *GetUserByIdReq, opts ...grpc.CallOption) (*GetUserByIdResp, error) ResignUser(ctx context.Context, in *ResignUserReq, opts ...grpc.CallOption) (*ResignUserResp, error) AlterUser(ctx context.Context, in *AlterUserReq, opts ...grpc.CallOption) (*AlterUserResp, error) GetUsers(ctx context.Context, in *GetUsersReq, opts ...grpc.CallOption) (*GetUsersResp, error) @@ -3339,7 +3462,8 @@ type UserClient interface { BlockUser(ctx context.Context, in *BlockUserReq, opts ...grpc.CallOption) (*BlockUserResp, error) UnBlockUser(ctx context.Context, in *UnBlockUserReq, opts ...grpc.CallOption) (*UnBlockUserResp, error) GetBlockUsers(ctx context.Context, in *GetBlockUsersReq, opts ...grpc.CallOption) (*GetBlockUsersResp, error) - GetBlockUser(ctx context.Context, in *GetBlockUserReq, opts ...grpc.CallOption) (*GetBlockUserResp, error) + GetBlockUserById(ctx context.Context, in *GetBlockUserByIdReq, opts ...grpc.CallOption) (*GetBlockUserByIdResp, error) + DeleteUser(ctx context.Context, in *DeleteUserReq, opts ...grpc.CallOption) (*DeleteUserResp, error) } type userClient struct { @@ -3422,9 +3546,9 @@ func (c *userClient) AccountCheck(ctx context.Context, in *AccountCheckReq, opts return out, nil } -func (c *userClient) GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*GetUserResp, error) { - out := new(GetUserResp) - err := c.cc.Invoke(ctx, "/user.user/GetUser", in, out, opts...) +func (c *userClient) GetUserById(ctx context.Context, in *GetUserByIdReq, opts ...grpc.CallOption) (*GetUserByIdResp, error) { + out := new(GetUserByIdResp) + err := c.cc.Invoke(ctx, "/user.user/GetUserById", in, out, opts...) if err != nil { return nil, err } @@ -3494,9 +3618,18 @@ func (c *userClient) GetBlockUsers(ctx context.Context, in *GetBlockUsersReq, op return out, nil } -func (c *userClient) GetBlockUser(ctx context.Context, in *GetBlockUserReq, opts ...grpc.CallOption) (*GetBlockUserResp, error) { - out := new(GetBlockUserResp) - err := c.cc.Invoke(ctx, "/user.user/GetBlockUser", in, out, opts...) +func (c *userClient) GetBlockUserById(ctx context.Context, in *GetBlockUserByIdReq, opts ...grpc.CallOption) (*GetBlockUserByIdResp, error) { + out := new(GetBlockUserByIdResp) + err := c.cc.Invoke(ctx, "/user.user/GetBlockUserById", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) DeleteUser(ctx context.Context, in *DeleteUserReq, opts ...grpc.CallOption) (*DeleteUserResp, error) { + out := new(DeleteUserResp) + err := c.cc.Invoke(ctx, "/user.user/DeleteUser", in, out, opts...) if err != nil { return nil, err } @@ -3513,7 +3646,7 @@ type UserServer interface { GetReceiveMessageOpt(context.Context, *GetReceiveMessageOptReq) (*GetReceiveMessageOptResp, error) GetAllConversationMsgOpt(context.Context, *GetAllConversationMsgOptReq) (*GetAllConversationMsgOptResp, error) AccountCheck(context.Context, *AccountCheckReq) (*AccountCheckResp, error) - GetUser(context.Context, *GetUserReq) (*GetUserResp, error) + GetUserById(context.Context, *GetUserByIdReq) (*GetUserByIdResp, error) ResignUser(context.Context, *ResignUserReq) (*ResignUserResp, error) AlterUser(context.Context, *AlterUserReq) (*AlterUserResp, error) GetUsers(context.Context, *GetUsersReq) (*GetUsersResp, error) @@ -3521,7 +3654,8 @@ type UserServer interface { BlockUser(context.Context, *BlockUserReq) (*BlockUserResp, error) UnBlockUser(context.Context, *UnBlockUserReq) (*UnBlockUserResp, error) GetBlockUsers(context.Context, *GetBlockUsersReq) (*GetBlockUsersResp, error) - GetBlockUser(context.Context, *GetBlockUserReq) (*GetBlockUserResp, error) + GetBlockUserById(context.Context, *GetBlockUserByIdReq) (*GetBlockUserByIdResp, error) + DeleteUser(context.Context, *DeleteUserReq) (*DeleteUserResp, error) } // UnimplementedUserServer can be embedded to have forward compatible implementations. @@ -3552,8 +3686,8 @@ func (*UnimplementedUserServer) GetAllConversationMsgOpt(context.Context, *GetAl func (*UnimplementedUserServer) AccountCheck(context.Context, *AccountCheckReq) (*AccountCheckResp, error) { return nil, status.Errorf(codes.Unimplemented, "method AccountCheck not implemented") } -func (*UnimplementedUserServer) GetUser(context.Context, *GetUserReq) (*GetUserResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") +func (*UnimplementedUserServer) GetUserById(context.Context, *GetUserByIdReq) (*GetUserByIdResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserById not implemented") } func (*UnimplementedUserServer) ResignUser(context.Context, *ResignUserReq) (*ResignUserResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ResignUser not implemented") @@ -3576,8 +3710,11 @@ func (*UnimplementedUserServer) UnBlockUser(context.Context, *UnBlockUserReq) (* func (*UnimplementedUserServer) GetBlockUsers(context.Context, *GetBlockUsersReq) (*GetBlockUsersResp, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBlockUsers not implemented") } -func (*UnimplementedUserServer) GetBlockUser(context.Context, *GetBlockUserReq) (*GetBlockUserResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockUser not implemented") +func (*UnimplementedUserServer) GetBlockUserById(context.Context, *GetBlockUserByIdReq) (*GetBlockUserByIdResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlockUserById not implemented") +} +func (*UnimplementedUserServer) DeleteUser(context.Context, *DeleteUserReq) (*DeleteUserResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented") } func RegisterUserServer(s *grpc.Server, srv UserServer) { @@ -3728,20 +3865,20 @@ func _User_AccountCheck_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _User_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserReq) +func _User_GetUserById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserByIdReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(UserServer).GetUser(ctx, in) + return srv.(UserServer).GetUserById(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/user.user/GetUser", + FullMethod: "/user.user/GetUserById", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).GetUser(ctx, req.(*GetUserReq)) + return srv.(UserServer).GetUserById(ctx, req.(*GetUserByIdReq)) } return interceptor(ctx, in, info, handler) } @@ -3872,20 +4009,38 @@ func _User_GetBlockUsers_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -func _User_GetBlockUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBlockUserReq) +func _User_GetBlockUserById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBlockUserByIdReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).GetBlockUserById(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/user.user/GetBlockUserById", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).GetBlockUserById(ctx, req.(*GetBlockUserByIdReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _User_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteUserReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(UserServer).GetBlockUser(ctx, in) + return srv.(UserServer).DeleteUser(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/user.user/GetBlockUser", + FullMethod: "/user.user/DeleteUser", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).GetBlockUser(ctx, req.(*GetBlockUserReq)) + return srv.(UserServer).DeleteUser(ctx, req.(*DeleteUserReq)) } return interceptor(ctx, in, info, handler) } @@ -3927,8 +4082,8 @@ var _User_serviceDesc = grpc.ServiceDesc{ Handler: _User_AccountCheck_Handler, }, { - MethodName: "GetUser", - Handler: _User_GetUser_Handler, + MethodName: "GetUserById", + Handler: _User_GetUserById_Handler, }, { MethodName: "ResignUser", @@ -3959,8 +4114,12 @@ var _User_serviceDesc = grpc.ServiceDesc{ Handler: _User_GetBlockUsers_Handler, }, { - MethodName: "GetBlockUser", - Handler: _User_GetBlockUser_Handler, + MethodName: "GetBlockUserById", + Handler: _User_GetBlockUserById_Handler, + }, + { + MethodName: "DeleteUser", + Handler: _User_DeleteUser_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/pkg/proto/user/user.proto b/pkg/proto/user/user.proto index d304712..ac765d9 100644 --- a/pkg/proto/user/user.proto +++ b/pkg/proto/user/user.proto @@ -116,7 +116,7 @@ message ResignUserResp{ CommonResp commonResp = 1; } -message GetUserReq{ +message GetUserByIdReq{ string UserId = 1; string OperationID = 2; } @@ -129,7 +129,7 @@ message User{ bool IsBlock = 5; } -message GetUserResp{ +message GetUserByIdResp{ CommonResp CommonResp = 1; User user = 2; } @@ -149,14 +149,14 @@ message AlterUserResp{ message GetUsersReq { string OperationID = 1; server_api_params.RequestPagination Pagination = 2; + string UserName = 3; } message GetUsersResp{ CommonResp CommonResp = 1; - string OperationID = 2; - repeated User user = 3; - int32 UserNum = 4; - server_api_params.ResponsePagination Pagination = 5; + repeated User user = 2; + server_api_params.ResponsePagination Pagination = 3; + string OperationID = 4; } message AddUserReq{ @@ -206,18 +206,26 @@ message GetBlockUsersResp{ CommonResp CommonResp = 1; repeated BlockUser BlockUsers = 2; server_api_params.ResponsePagination Pagination = 3; - int32 BlockUserNum = 4; } -message GetBlockUserReq { +message GetBlockUserByIdReq { string User_id = 1; string OperationID = 2; } -message GetBlockUserResp { +message GetBlockUserByIdResp { BlockUser BlockUser = 2; } +message DeleteUserReq { + string User_id = 1; + string OperationID = 2; +} + +message DeleteUserResp { + +} + service user { rpc GetUserInfo(GetUserInfoReq) returns(GetUserInfoResp); rpc UpdateUserInfo(UpdateUserInfoReq) returns(UpdateUserInfoResp); @@ -228,7 +236,7 @@ service user { rpc GetAllConversationMsgOpt(GetAllConversationMsgOptReq)returns(GetAllConversationMsgOptResp); rpc AccountCheck(AccountCheckReq)returns(AccountCheckResp); - rpc GetUser(GetUserReq) returns (GetUserResp); + rpc GetUserById(GetUserByIdReq) returns (GetUserByIdResp); rpc ResignUser(ResignUserReq) returns (ResignUserResp); rpc AlterUser(AlterUserReq) returns (AlterUserResp); rpc GetUsers(GetUsersReq) returns (GetUsersResp); @@ -236,5 +244,6 @@ service user { rpc BlockUser(BlockUserReq) returns (BlockUserResp); rpc UnBlockUser(UnBlockUserReq) returns (UnBlockUserResp); rpc GetBlockUsers(GetBlockUsersReq) returns (GetBlockUsersResp); - rpc GetBlockUser(GetBlockUserReq) returns (GetBlockUserResp); + rpc GetBlockUserById(GetBlockUserByIdReq) returns (GetBlockUserByIdResp); + rpc DeleteUser(DeleteUserReq) returns (DeleteUserResp); } diff --git a/pkg/utils/time_format.go b/pkg/utils/time_format.go index b24d113..c8f6e21 100644 --- a/pkg/utils/time_format.go +++ b/pkg/utils/time_format.go @@ -78,3 +78,8 @@ func TimeStringFormatTimeUnix(timeFormat string, timeSrc string) int64 { tm, _ := time.Parse(timeFormat, timeSrc) return tm.Unix() } + +func TimeStringToTime(timeString string) (time.Time, error) { + t, err := time.Parse("2006-01-02", timeString) + return t, err +} -- GitLab