diff --git a/internal/rpc/friend/friend.go b/internal/rpc/friend/friend.go index 304a1837a..7dcd88e18 100644 --- a/internal/rpc/friend/friend.go +++ b/internal/rpc/friend/friend.go @@ -7,7 +7,7 @@ import ( "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db/controller" "Open_IM/pkg/common/db/relation" - relation2 "Open_IM/pkg/common/db/table/relation" + relationTb "Open_IM/pkg/common/db/table/relation" "Open_IM/pkg/common/log" "Open_IM/pkg/common/middleware" promePkg "Open_IM/pkg/common/prometheus" @@ -63,16 +63,16 @@ func NewFriendServer(port int) *friendServer { //mysql init var mysql relation.Mysql var model relation.FriendGorm - err = mysql.InitConn().AutoMigrateModel(&relation2.FriendModel{}) + err = mysql.InitConn().AutoMigrateModel(&relationTb.FriendModel{}) if err != nil { panic("db init err:" + err.Error()) } - err = mysql.InitConn().AutoMigrateModel(&relation2.FriendRequestModel{}) + err = mysql.InitConn().AutoMigrateModel(&relationTb.FriendRequestModel{}) if err != nil { panic("db init err:" + err.Error()) } - err = mysql.InitConn().AutoMigrateModel(&relation2.BlackModel{}) + err = mysql.InitConn().AutoMigrateModel(&relationTb.BlackModel{}) if err != nil { panic("db init err:" + err.Error()) } @@ -185,7 +185,7 @@ func (s *friendServer) RespondFriendApply(ctx context.Context, req *pbFriend.Res if err := check.Access(ctx, req.ToUserID); err != nil { return nil, err } - friendRequest := relation2.FriendRequestModel{FromUserID: req.FromUserID, ToUserID: req.ToUserID, HandleMsg: req.HandleMsg, HandleResult: req.HandleResult} + friendRequest := relationTb.FriendRequestModel{FromUserID: req.FromUserID, ToUserID: req.ToUserID, HandleMsg: req.HandleMsg, HandleResult: req.HandleResult} if req.HandleResult == constant.FriendResponseAgree { err := s.AgreeFriendRequest(ctx, &friendRequest) if err != nil { diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index a355271bc..6dcb94456 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -6,8 +6,8 @@ import ( "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db/cache" "Open_IM/pkg/common/db/controller" - "Open_IM/pkg/common/db/relation" - relation2 "Open_IM/pkg/common/db/table/relation" + relation_conn "Open_IM/pkg/common/db/relation" + "Open_IM/pkg/common/db/table/relation" "Open_IM/pkg/common/db/unrelation" "Open_IM/pkg/common/log" "Open_IM/pkg/common/middleware" @@ -38,7 +38,7 @@ type groupServer struct { rpcRegisterName string etcdSchema string etcdAddr []string - controller.GroupInterface + GroupInterface controller.GroupInterface etcdConn *getcdv3.EtcdConn //userRpc pbUser.UserClient @@ -71,9 +71,9 @@ func NewGroupServer(port int) *groupServer { //g.conversationRpc = pbConversation.NewConversationClient(conn) //mysql init - var mysql relation.Mysql + var mysql relation_conn.Mysql var mongo unrelation.Mongo - var groupModel relation2.GroupModel + var groupModel relation.GroupModel var redis cache.RedisClient err = mysql.InitConn().AutoMigrateModel(&groupModel) if err != nil { @@ -98,7 +98,7 @@ func NewGroupServer(port int) *groupServer { } var registerCenter discoveryRegistry.SvcDiscoveryRegistry = zkClient conns, err := registerCenter.GetConns(config.Config.RpcRegisterName.OpenImConversationName) - g.GroupInterface = controller.NewGroupController(groupModel.DB, redis.GetClient(), mongo.GetClient()) + g.GroupInterface = controller.NewGroupInterface(controller.NewGroupDatabase(mysql.GormConn(), redis.GetClient(), mongo.GetClient())) return &g } @@ -200,7 +200,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR if err := callbackBeforeCreateGroup(ctx, req); err != nil { return nil, err } - var groupMembers []*relation2.GroupMemberModel + var groupMembers []*relation.GroupMemberModel group := PbToDBGroupInfo(req.GroupInfo) group.GroupID = genGroupID(ctx, req.GroupInfo.GroupID) joinGroup := func(userID string, roleLevel int32) error { @@ -235,7 +235,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } } } - if err := s.GroupInterface.CreateGroup(ctx, []*relation2.GroupModel{group}, groupMembers); err != nil { + if err := s.GroupInterface.CreateGroup(ctx, []*relation.GroupModel{group}, groupMembers); err != nil { return nil, err } resp.GroupInfo = DbToPbGroupInfo(group, req.OwnerUserID, uint32(len(userIDs))) @@ -265,7 +265,7 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo if len(members) == 0 { return resp, nil } - groupIDs := utils.Slice(members, func(e *relation2.GroupMemberModel) string { + groupIDs := utils.Slice(members, func(e *relation.GroupMemberModel) string { return e.GroupID }) groups, err := s.GroupInterface.FindGroup(ctx, groupIDs) @@ -280,12 +280,12 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo if err != nil { return nil, err } - ownerMap := utils.SliceToMap(owners, func(e *relation2.GroupMemberModel) string { + ownerMap := utils.SliceToMap(owners, func(e *relation.GroupMemberModel) string { return e.GroupID }) - resp.Groups = utils.Slice(utils.Order(groupIDs, groups, func(group *relation2.GroupModel) string { + resp.Groups = utils.Slice(utils.Order(groupIDs, groups, func(group *relation.GroupModel) string { return group.GroupID - }), func(group *relation2.GroupModel) *open_im_sdk.GroupInfo { + }), func(group *relation.GroupModel) *open_im_sdk.GroupInfo { return DbToPbGroupInfo(group, ownerMap[group.GroupID].UserID, uint32(groupMemberNum[group.GroupID])) }) return resp, nil @@ -310,7 +310,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite if err != nil { return nil, err } - memberMap := utils.SliceToMap(members, func(e *relation2.GroupMemberModel) string { + memberMap := utils.SliceToMap(members, func(e *relation.GroupMemberModel) string { return e.UserID }) if ids := utils.Single(req.InvitedUserIDs, utils.Keys(memberMap)); len(ids) > 0 { @@ -331,9 +331,9 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite return nil, constant.ErrNoPermission.Wrap("not in group") } if !(member.RoleLevel == constant.GroupOwner || member.RoleLevel == constant.GroupAdmin) { - var requests []*relation2.GroupRequestModel + var requests []*relation.GroupRequestModel for _, userID := range req.InvitedUserIDs { - requests = append(requests, &relation2.GroupRequestModel{ + requests = append(requests, &relation.GroupRequestModel{ UserID: userID, GroupID: req.GroupID, JoinSource: constant.JoinByInvitation, @@ -364,7 +364,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite } } else { opUserID := tracelog.GetOpUserID(ctx) - var groupMembers []*relation2.GroupMemberModel + var groupMembers []*relation.GroupMemberModel for _, userID := range req.InvitedUserIDs { member := PbToDbGroupMember(userMap[userID]) member.GroupID = req.GroupID @@ -398,7 +398,7 @@ func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGro if err != nil { return nil, err } - resp.Members = utils.Slice(members, func(e *relation2.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo { + resp.Members = utils.Slice(members, func(e *relation.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo { return DbToPbGroupMembersCMSResp(e) }) return resp, nil @@ -411,7 +411,7 @@ func (s *groupServer) GetGroupMemberList(ctx context.Context, req *pbGroup.GetGr return nil, err } resp.Total = total - resp.Members = utils.Slice(members, func(e *relation2.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo { + resp.Members = utils.Slice(members, func(e *relation.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo { return DbToPbGroupMembersCMSResp(e) }) return resp, nil @@ -447,7 +447,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou if err != nil { return nil, err } - memberMap := make(map[string]*relation2.GroupMemberModel) + memberMap := make(map[string]*relation.GroupMemberModel) for i, member := range members { memberMap[member.UserID] = members[i] } @@ -496,7 +496,7 @@ func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetG if err != nil { return nil, err } - resp.Members = utils.Slice(members, func(e *relation2.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo { + resp.Members = utils.Slice(members, func(e *relation.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo { return DbToPbGroupMembersCMSResp(e) }) return resp, nil @@ -533,7 +533,7 @@ func (s *groupServer) GetGroupApplicationList(ctx context.Context, req *pbGroup. if err != nil { return nil, err } - groupMap := utils.SliceToMap(groups, func(e *relation2.GroupModel) string { + groupMap := utils.SliceToMap(groups, func(e *relation.GroupModel) string { return e.GroupID }) if ids := utils.Single(utils.Keys(groupMap), groupIDs); len(ids) > 0 { @@ -547,10 +547,10 @@ func (s *groupServer) GetGroupApplicationList(ctx context.Context, req *pbGroup. if err != nil { return nil, err } - ownerMap := utils.SliceToMap(owners, func(e *relation2.GroupMemberModel) string { + ownerMap := utils.SliceToMap(owners, func(e *relation.GroupMemberModel) string { return e.GroupID }) - resp.GroupRequests = utils.Slice(groupRequests, func(e *relation2.GroupRequestModel) *open_im_sdk.GroupRequest { + resp.GroupRequests = utils.Slice(groupRequests, func(e *relation.GroupRequestModel) *open_im_sdk.GroupRequest { return DbToPbGroupRequest(e, userMap[e.UserID], DbToPbGroupInfo(groupMap[e.GroupID], ownerMap[e.GroupID].UserID, uint32(groupMemberNumMap[e.GroupID]))) }) return resp, nil @@ -573,10 +573,10 @@ func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsI if err != nil { return nil, err } - ownerMap := utils.SliceToMap(owners, func(e *relation2.GroupMemberModel) string { + ownerMap := utils.SliceToMap(owners, func(e *relation.GroupMemberModel) string { return e.GroupID }) - resp.GroupInfos = utils.Slice(groups, func(e *relation2.GroupModel) *open_im_sdk.GroupInfo { + resp.GroupInfos = utils.Slice(groups, func(e *relation.GroupModel) *open_im_sdk.GroupInfo { return DbToPbGroupInfo(e, ownerMap[e.GroupID].UserID, uint32(groupMemberNumMap[e.GroupID])) }) return resp, nil @@ -618,9 +618,9 @@ func (s *groupServer) GroupApplicationResponse(ctx context.Context, req *pbGroup if err != nil { return nil, err } - var member *relation2.GroupMemberModel + var member *relation.GroupMemberModel if req.HandleResult == constant.GroupResponseAgree { - member = &relation2.GroupMemberModel{ + member = &relation.GroupMemberModel{ GroupID: req.GroupID, UserID: user.UserID, Nickname: user.Nickname, @@ -664,7 +664,7 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) if group.GroupType == constant.SuperGroup { return nil, constant.ErrGroupTypeNotSupport.Wrap() } - user, err := relation.GetUserByUserID(tracelog.GetOpUserID(ctx)) + user, err := relation_conn.GetUserByUserID(tracelog.GetOpUserID(ctx)) if err != nil { return nil, err } @@ -677,20 +677,20 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) if err := CallbackBeforeMemberJoinGroup(ctx, tracelog.GetOperationID(ctx), groupMember, group.Ex); err != nil { return nil, err } - if err := s.GroupInterface.CreateGroup(ctx, nil, []*relation2.GroupMemberModel{groupMember}); err != nil { + if err := s.GroupInterface.CreateGroup(ctx, nil, []*relation.GroupMemberModel{groupMember}); err != nil { return nil, err } chat.MemberEnterDirectlyNotification(req.GroupID, tracelog.GetOpUserID(ctx), tracelog.GetOperationID(ctx)) return resp, nil } - groupRequest := relation2.GroupRequestModel{ + groupRequest := relation.GroupRequestModel{ UserID: tracelog.GetOpUserID(ctx), ReqMsg: req.ReqMessage, GroupID: req.GroupID, JoinSource: req.JoinSource, ReqTime: time.Now(), } - if err := s.GroupInterface.CreateGroupRequest(ctx, []*relation2.GroupRequestModel{&groupRequest}); err != nil { + if err := s.GroupInterface.CreateGroupRequest(ctx, []*relation.GroupRequestModel{&groupRequest}); err != nil { return nil, err } chat.JoinGroupApplicationNotification(ctx, req) @@ -770,7 +770,7 @@ func (s *groupServer) TransferGroupOwner(ctx context.Context, req *pbGroup.Trans if err != nil { return nil, err } - memberMap := utils.SliceToMap(members, func(e *relation2.GroupMemberModel) string { return e.UserID }) + memberMap := utils.SliceToMap(members, func(e *relation.GroupMemberModel) string { return e.UserID }) if ids := utils.Single([]string{req.OldOwnerUserID, req.NewOwnerUserID}, utils.Keys(memberMap)); len(ids) > 0 { return nil, constant.ErrArgs.Wrap("user not in group " + strings.Join(ids, ",")) } @@ -804,26 +804,26 @@ func (s *groupServer) TransferGroupOwner(ctx context.Context, req *pbGroup.Trans func (s *groupServer) GetGroups(ctx context.Context, req *pbGroup.GetGroupsReq) (*pbGroup.GetGroupsResp, error) { resp := &pbGroup.GetGroupsResp{} var ( - groups []*relation2.GroupModel + groups []*relation.GroupModel err error ) if req.GroupID != "" { groups, err = s.GroupInterface.FindGroup(ctx, []string{req.GroupID}) - resp.GroupNum = int32(len(groups)) + resp.Total = uint32(len(groups)) } else { - resp.GroupNum, groups, err = s.GroupInterface.SearchGroup(ctx, req.GroupName, req.Pagination.PageNumber, req.Pagination.ShowNumber) + resp.Total, groups, err = s.GroupInterface.SearchGroup(ctx, req.GroupName, req.Pagination.PageNumber, req.Pagination.ShowNumber) } if err != nil { return nil, err } - groupIDs := utils.Slice(groups, func(e *relation2.GroupModel) string { + groupIDs := utils.Slice(groups, func(e *relation.GroupModel) string { return e.GroupID }) ownerMembers, err := s.GroupInterface.FindGroupMember(ctx, groupIDs, nil, []int32{constant.GroupOwner}) if err != nil { return nil, err } - ownerMemberMap := utils.SliceToMap(ownerMembers, func(e *relation2.GroupMemberModel) string { + ownerMemberMap := utils.SliceToMap(ownerMembers, func(e *relation.GroupMemberModel) string { return e.GroupID }) if ids := utils.Single(groupIDs, utils.Keys(ownerMemberMap)); len(ids) > 0 { @@ -833,7 +833,7 @@ func (s *groupServer) GetGroups(ctx context.Context, req *pbGroup.GetGroupsReq) if err != nil { return nil, err } - resp.Groups = utils.Slice(groups, func(group *relation2.GroupModel) *pbGroup.CMSGroup { + resp.Groups = utils.Slice(groups, func(group *relation.GroupModel) *pbGroup.CMSGroup { member := ownerMemberMap[group.GroupID] return DbToPbCMSGroup(group, member.UserID, member.Nickname, uint32(groupMemberNumMap[group.GroupID])) }) @@ -846,8 +846,8 @@ func (s *groupServer) GetGroupMembersCMS(ctx context.Context, req *pbGroup.GetGr if err != nil { return nil, err } - resp.MemberNums = total - resp.Members = utils.Slice(members, func(e *relation2.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo { + resp.Total = total + resp.Members = utils.Slice(members, func(e *relation.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo { return DbToPbGroupMembersCMSResp(e) }) return resp, nil @@ -867,14 +867,14 @@ func (s *groupServer) GetUserReqApplicationList(ctx context.Context, req *pbGrou if len(requests) == 0 { return resp, nil } - groupIDs := utils.Distinct(utils.Slice(requests, func(e *relation2.GroupRequestModel) string { + groupIDs := utils.Distinct(utils.Slice(requests, func(e *relation.GroupRequestModel) string { return e.GroupID })) groups, err := s.GroupInterface.FindGroup(ctx, groupIDs) if err != nil { return nil, err } - groupMap := utils.SliceToMap(groups, func(e *relation2.GroupModel) string { + groupMap := utils.SliceToMap(groups, func(e *relation.GroupModel) string { return e.GroupID }) if ids := utils.Single(groupIDs, utils.Keys(groupMap)); len(ids) > 0 { @@ -884,7 +884,7 @@ func (s *groupServer) GetUserReqApplicationList(ctx context.Context, req *pbGrou if err != nil { return nil, err } - ownerMap := utils.SliceToMap(owners, func(e *relation2.GroupMemberModel) string { + ownerMap := utils.SliceToMap(owners, func(e *relation.GroupMemberModel) string { return e.GroupID }) if ids := utils.Single(groupIDs, utils.Keys(ownerMap)); len(ids) > 0 { @@ -894,7 +894,7 @@ func (s *groupServer) GetUserReqApplicationList(ctx context.Context, req *pbGrou if err != nil { return nil, err } - resp.GroupRequests = utils.Slice(requests, func(e *relation2.GroupRequestModel) *open_im_sdk.GroupRequest { + resp.GroupRequests = utils.Slice(requests, func(e *relation.GroupRequestModel) *open_im_sdk.GroupRequest { return DbToPbGroupRequest(e, user, DbToPbGroupInfo(groupMap[e.GroupID], ownerMap[e.GroupID].UserID, uint32(groupMemberNum[e.GroupID]))) }) return resp, nil @@ -1058,7 +1058,7 @@ func (s *groupServer) GetGroupAbstractInfo(ctx context.Context, req *pbGroup.Get if err != nil { return nil, err } - resp.GroupAbstractInfos = utils.Slice(groups, func(e *relation2.GroupModel) *pbGroup.GroupAbstractInfo { + resp.GroupAbstractInfos = utils.Slice(groups, func(e *relation.GroupModel) *pbGroup.GroupAbstractInfo { userIDs := groupUserMap[e.GroupID] utils.Sort(userIDs, true) bi := big.NewInt(0) @@ -1077,7 +1077,7 @@ func (s *groupServer) GetUserInGroupMembers(ctx context.Context, req *pbGroup.Ge if err != nil { return nil, err } - resp.Members = utils.Slice(members, func(e *relation2.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo { + resp.Members = utils.Slice(members, func(e *relation.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo { return DbToPbGroupMembersCMSResp(e) }) return resp, nil diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index aac05ebd2..5849bf05f 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -7,7 +7,7 @@ import ( "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db/controller" "Open_IM/pkg/common/db/relation" - relation2 "Open_IM/pkg/common/db/table/relation" + relationTb "Open_IM/pkg/common/db/table/relation" "Open_IM/pkg/common/log" promePkg "Open_IM/pkg/common/prometheus" "Open_IM/pkg/common/token_verify" @@ -195,7 +195,7 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI if err != nil { return nil, err } - err = s.Update(ctx, []*relation2.UserModel{user}) + err = s.Update(ctx, []*relationTb.UserModel{user}) if err != nil { return nil, err } diff --git a/pkg/common/db/cache/black.go b/pkg/common/db/cache/black.go index 145fc1365..9ccfdbf13 100644 --- a/pkg/common/db/cache/black.go +++ b/pkg/common/db/cache/black.go @@ -1,8 +1,6 @@ package cache import ( - "Open_IM/pkg/common/db/relation" - relation2 "Open_IM/pkg/common/db/table/relation" "Open_IM/pkg/common/tracelog" "Open_IM/pkg/utils" "context" @@ -17,25 +15,30 @@ const ( blackExpireTime = time.Second * 60 * 60 * 12 ) -type BlackCache struct { - blackDB *relation2.BlackModel +type BlackCache interface { + //get blackIDs from cache + GetBlackIDs(ctx context.Context, userID string, fn func(ctx context.Context, userID string) ([]string, error)) (blackIDs []string, err error) + //del user's blackIDs cache, exec when a user's black list changed + DelBlackIDs(ctx context.Context, userID string) (err error) +} + +type BlackCacheRedis struct { expireTime time.Duration rcClient *rockscache.Client } -func NewBlackCache(rdb redis.UniversalClient, blackDB *relation.BlackGorm, options rockscache.Options) *BlackCache { - return &BlackCache{ - blackDB: blackDB, +func NewBlackCacheRedis(rdb redis.UniversalClient, blackDB BlackCache, options rockscache.Options) *BlackCacheRedis { + return &BlackCacheRedis{ expireTime: blackExpireTime, rcClient: rockscache.NewClient(rdb, options), } } -func (b *BlackCache) getBlackIDsKey(ownerUserID string) string { +func (b *BlackCacheRedis) getBlackIDsKey(ownerUserID string) string { return blackIDsKey + ownerUserID } -func (b *BlackCache) GetBlackIDs(ctx context.Context, userID string) (blackIDs []string, err error) { +func (b *BlackCacheRedis) GetBlackIDs(ctx context.Context, userID string) (blackIDs []string, err error) { getBlackIDList := func() (string, error) { blackIDs, err := b.blackDB.GetBlackIDs(ctx, userID) if err != nil { @@ -58,7 +61,7 @@ func (b *BlackCache) GetBlackIDs(ctx context.Context, userID string) (blackIDs [ return blackIDs, utils.Wrap(err, "") } -func (b *BlackCache) DelBlackIDListFromCache(ctx context.Context, userID string) (err error) { +func (b *BlackCacheRedis) DelBlackIDs(ctx context.Context, userID string) (err error) { defer func() { tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID) }() diff --git a/pkg/common/db/cache/conversation.go b/pkg/common/db/cache/conversation.go index 19ce8449e..3a6b0e0ce 100644 --- a/pkg/common/db/cache/conversation.go +++ b/pkg/common/db/cache/conversation.go @@ -2,7 +2,7 @@ package cache import ( "Open_IM/pkg/common/db/relation" - relation2 "Open_IM/pkg/common/db/table/relation" + relationTb "Open_IM/pkg/common/db/table/relation" "Open_IM/pkg/common/tracelog" "Open_IM/pkg/utils" "context" @@ -13,18 +13,39 @@ import ( "time" ) -type DBFun func() (string, error) +const ( + conversationKey = "CONVERSATION:" + conversationIDsKey = "CONVERSATION_IDS:" + recvMsgOptKey = "RECV_MSG_OPT:" + superGroupRecvMsgNotNotifyUserIDsKey = "SUPER_GROUP_RECV_MSG_NOT_NOTIFY_USER_IDS:" + conversationExpireTime = time.Second * 60 * 60 * 12 +) type ConversationCache interface { - GetUserConversationIDListFromCache(userID string, fn DBFun) ([]string, error) - DelUserConversationIDListFromCache(userID string) error - GetConversationFromCache(ownerUserID, conversationID string, fn DBFun) (*table.ConversationModel, error) - GetConversationsFromCache(ownerUserID string, conversationIDList []string, fn DBFun) ([]*table.ConversationModel, error) - GetUserAllConversationList(ownerUserID string, fn DBFun) ([]*table.ConversationModel, error) - DelConversationFromCache(ownerUserID, conversationID string) error - - GetUserConversationIDs(ctx context.Context, ownerUserID string, f func(ctx context.Context, userID string) ([]string, error)) ([]string, error) + // get user's conversationIDs from cache + GetUserConversationIDs(ctx context.Context, userID string, fn func(ctx context.Context, userID string) ([]string, error)) ([]string, error) + // del user's conversationIDs from cache, call when a user add or reduce a conversation + DelUserConversationIDs(ctx context.Context, userID string) error + // get one conversation from cache + GetConversation(ctx context.Context, ownerUserID, conversationID string, fn func(ctx context.Context, ownerUserID, conversationID string) (*relationTb.ConversationModel, error)) (*relationTb.ConversationModel, error) + // get one conversation from cache + GetConversations(ctx context.Context, ownerUserID string, conversationIDs []string, fn func(ctx context.Context, ownerUserID, conversationIDs []string) ([]*relationTb.ConversationModel, error)) ([]*relationTb.ConversationModel, error) + // get one user's all conversations from cache + GetUserAllConversations(ctx context.Context, ownerUserID string, fn func(ctx context.Context, ownerUserIDs string) ([]*relationTb.ConversationModel, error)) ([]*relationTb.ConversationModel, error) + // del one conversation from cache, call when one user's conversation Info changed + DelConversation(ctx context.Context, ownerUserID, conversationID string) error + // get user conversation recv msg from cache + GetUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string, fn func(ctx context.Context, ownerUserID, conversationID string) (opt int, err error)) (opt int, err error) + // del user recv msg opt from cache, call when user's conversation recv msg opt changed + DelUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string) error + // get one super group recv msg but do not notification userID list + GetSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string, fn func(ctx context.Context, groupID string) (userIDs []string, err error)) (userIDs []string, err error) + // del one super group recv msg but do not notification userID list, call it when this list changed + DelSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) error + //GetSuperGroupRecvMsgNotNotifyUserIDsHash(ctx context.Context, groupID string) (hash uint32, err error) + //DelSuperGroupRecvMsgNotNotifyUserIDsHash(ctx context.Context, groupID string) } + type ConversationRedis struct { rcClient *rockscache.Client } @@ -33,27 +54,27 @@ func NewConversationRedis(rcClient *rockscache.Client) *ConversationRedis { return &ConversationRedis{rcClient: rcClient} } -func NewConversationCache(rdb redis.UniversalClient, conversationDB *relation.ConversationGorm, options rockscache.Options) *ConversationCache { - return &ConversationCache{conversationDB: conversationDB, expireTime: conversationExpireTime, rcClient: rockscache.NewClient(rdb, options)} +func NewNewConversationRedis(rdb redis.UniversalClient, conversationDB *relation.ConversationGorm, options rockscache.Options) *ConversationRedis { + return &ConversationRedis{conversationDB: conversationDB, expireTime: conversationExpireTime, rcClient: rockscache.NewClient(rdb, options)} } -func (c *ConversationCache) getConversationKey(ownerUserID, conversationID string) string { +func (c *ConversationRedis) getConversationKey(ownerUserID, conversationID string) string { return conversationKey + ownerUserID + ":" + conversationID } -func (c *ConversationCache) getConversationIDsKey(ownerUserID string) string { +func (c *ConversationRedis) getConversationIDsKey(ownerUserID string) string { return conversationIDsKey + ownerUserID } -func (c *ConversationCache) getRecvMsgOptKey(ownerUserID, conversationID string) string { +func (c *ConversationRedis) getRecvMsgOptKey(ownerUserID, conversationID string) string { return recvMsgOptKey + ownerUserID + ":" + conversationID } -func (c *ConversationCache) getSuperGroupRecvNotNotifyUserIDsKey(groupID string) string { +func (c *ConversationRedis) getSuperGroupRecvNotNotifyUserIDsKey(groupID string) string { return superGroupRecvMsgNotNotifyUserIDsKey + groupID } -func (c *ConversationCache) GetUserConversationIDs(ctx context.Context, ownerUserID string, f func(ctx context.Context, userID string) ([]string, error)) (conversationIDs []string, err error) { +func (c *ConversationRedis) GetUserConversationIDs(ctx context.Context, ownerUserID string, f func(userID string) ([]string, error)) (conversationIDs []string, err error) { //getConversationIDs := func() (string, error) { // conversationIDs, err := relation.GetConversationIDsByUserID(ownerUserID) // if err != nil { @@ -79,7 +100,7 @@ func (c *ConversationCache) GetUserConversationIDs(ctx context.Context, ownerUse }) } -func (c *ConversationCache) GetUserConversationIDs1(ctx context.Context, ownerUserID string) (conversationIDs []string, err error) { +func (c *ConversationRedis) GetUserConversationIDs1(ctx context.Context, ownerUserID string) (conversationIDs []string, err error) { //getConversationIDs := func() (string, error) { // conversationIDs, err := relation.GetConversationIDsByUserID(ownerUserID) // if err != nil { @@ -149,14 +170,14 @@ func GetCache[T any](ctx context.Context, rcClient *rockscache.Client, key strin return t, nil } -func (c *ConversationCache) DelUserConversationIDs(ctx context.Context, ownerUserID string) (err error) { +func (c *ConversationRedis) DelUserConversationIDs(ctx context.Context, ownerUserID string) (err error) { defer func() { tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID) }() return utils.Wrap(c.rcClient.TagAsDeleted(c.getConversationIDsKey(ownerUserID)), "DelUserConversationIDs err") } -func (c *ConversationCache) GetConversation(ctx context.Context, ownerUserID, conversationID string) (conversation *relation2.ConversationModel, err error) { +func (c *ConversationRedis) GetConversation(ctx context.Context, ownerUserID, conversationID string) (conversation *relationTb.Conversation, err error) { getConversation := func() (string, error) { conversation, err := relation.GetConversation(ownerUserID, conversationID) if err != nil { @@ -175,19 +196,19 @@ func (c *ConversationCache) GetConversation(ctx context.Context, ownerUserID, co if err != nil { return nil, err } - conversation = &relation2.ConversationModel{} + conversation = &relationTb.ConversationModel{} err = json.Unmarshal([]byte(conversationStr), &conversation) return conversation, utils.Wrap(err, "Unmarshal failed") } -func (c *ConversationCache) DelConversation(ctx context.Context, ownerUserID, conversationID string) (err error) { +func (c *ConversationRedis) DelConversation(ctx context.Context, ownerUserID, conversationID string) (err error) { defer func() { tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationID", conversationID) }() return utils.Wrap(c.rcClient.TagAsDeleted(c.getConversationKey(ownerUserID, conversationID)), "DelConversation err") } -func (c *ConversationCache) GetConversations(ctx context.Context, ownerUserID string, conversationIDs []string) (conversations []relation2.ConversationModel, err error) { +func (c *ConversationRedis) GetConversations(ctx context.Context, ownerUserID string, conversationIDs []string) (conversations []relationTb.ConversationModel, err error) { defer func() { tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationIDs", conversationIDs, "conversations", conversations) }() @@ -201,7 +222,7 @@ func (c *ConversationCache) GetConversations(ctx context.Context, ownerUserID st return conversations, nil } -func (c *ConversationCache) GetUserAllConversations(ctx context.Context, ownerUserID string) (conversations []relation2.ConversationModel, err error) { +func (c *ConversationRedis) GetUserAllConversations(ctx context.Context, ownerUserID string) (conversations []relationTb.ConversationModel, err error) { defer func() { tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversations", conversations) }() @@ -209,7 +230,7 @@ func (c *ConversationCache) GetUserAllConversations(ctx context.Context, ownerUs if err != nil { return nil, err } - var conversationIDs []relation2.ConversationModel + var conversationIDs []relationTb.ConversationModel for _, conversationID := range IDs { conversation, err := c.GetConversation(ctx, ownerUserID, conversationID) if err != nil { @@ -220,7 +241,7 @@ func (c *ConversationCache) GetUserAllConversations(ctx context.Context, ownerUs return conversationIDs, nil } -func (c *ConversationCache) GetUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string) (opt int, err error) { +func (c *ConversationRedis) GetUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string) (opt int, err error) { getConversation := func() (string, error) { conversation, err := relation.GetConversation(ownerUserID, conversationID) if err != nil { @@ -238,22 +259,22 @@ func (c *ConversationCache) GetUserRecvMsgOpt(ctx context.Context, ownerUserID, return strconv.Atoi(optStr) } -func (c *ConversationCache) DelUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string) error { +func (c *ConversationRedis) DelUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string) error { return utils.Wrap(c.rcClient.TagAsDeleted(c.getConversationKey(ownerUserID, conversationID)), "DelUserRecvMsgOpt failed") } -func (c *ConversationCache) GetSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) (userIDs []string, err error) { +func (c *ConversationRedis) GetSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) (userIDs []string, err error) { return nil, nil } -func (c *ConversationCache) DelSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) (err error) { +func (c *ConversationRedis) DelSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) (err error) { return nil } -func (c *ConversationCache) GetSuperGroupRecvMsgNotNotifyUserIDsHash(ctx context.Context, groupID string) (hash uint32, err error) { +func (c *ConversationRedis) GetSuperGroupRecvMsgNotNotifyUserIDsHash(ctx context.Context, groupID string) (hash uint32, err error) { return } -func (c *ConversationCache) DelSuperGroupRecvMsgNotNotifyUserIDsHash(ctx context.Context, groupID string) { +func (c *ConversationRedis) DelSuperGroupRecvMsgNotNotifyUserIDsHash(ctx context.Context, groupID string) { return } diff --git a/pkg/common/db/cache/friend.go b/pkg/common/db/cache/friend.go index 4d70b1ff6..fb6c5c8c4 100644 --- a/pkg/common/db/cache/friend.go +++ b/pkg/common/db/cache/friend.go @@ -2,7 +2,7 @@ package cache import ( "Open_IM/pkg/common/db/relation" - relation2 "Open_IM/pkg/common/db/table/relation" + relationTb "Open_IM/pkg/common/db/table/relation" "Open_IM/pkg/common/tracelog" "Open_IM/pkg/utils" "context" @@ -19,33 +19,42 @@ const ( friendKey = "FRIEND_INFO:" ) -type FriendCache struct { +type FriendCache interface { + GetFriendIDs(ctx context.Context, ownerUserID string, fn func(ctx context.Context, ownerUserID string) (friendIDs []string, err error)) (friendIDs []string, err error) + // call when friendID List changed + DelFriendIDs(ctx context.Context, ownerUserID string) (err error) + GetFriend(ctx context.Context, ownerUserID, friendUserID string, fn func(ctx context.Context, ownerUserID, friendUserID string) (friend *relationTb.FriendModel, err error)) (friend *relationTb.FriendModel, err error) + // del friend when friend info changed or remove it + DelFriend(ctx context.Context, ownerUserID, friendUserID string) (err error) +} + +type FriendCacheRedis struct { friendDB *relation.FriendGorm expireTime time.Duration rcClient *rockscache.Client } -func NewFriendCache(rdb redis.UniversalClient, friendDB *relation.FriendGorm, options rockscache.Options) *FriendCache { - return &FriendCache{ +func NewFriendCacheRedis(rdb redis.UniversalClient, friendDB *relation.FriendGorm, options rockscache.Options) *FriendCacheRedis { + return &FriendCacheRedis{ friendDB: friendDB, expireTime: friendExpireTime, rcClient: rockscache.NewClient(rdb, options), } } -func (f *FriendCache) getFriendIDsKey(ownerUserID string) string { +func (f *FriendCacheRedis) getFriendIDsKey(ownerUserID string) string { return friendIDsKey + ownerUserID } -func (f *FriendCache) getTwoWayFriendsIDsKey(ownerUserID string) string { +func (f *FriendCacheRedis) getTwoWayFriendsIDsKey(ownerUserID string) string { return TwoWayFriendsIDsKey + ownerUserID } -func (f *FriendCache) getFriendKey(ownerUserID, friendUserID string) string { +func (f *FriendCacheRedis) getFriendKey(ownerUserID, friendUserID string) string { return friendKey + ownerUserID + "-" + friendUserID } -func (f *FriendCache) GetFriendIDs(ctx context.Context, ownerUserID string) (friendIDs []string, err error) { +func (f *FriendCacheRedis) GetFriendIDs(ctx context.Context, ownerUserID string) (friendIDs []string, err error) { getFriendIDs := func() (string, error) { friendIDs, err := f.friendDB.GetFriendIDs(ctx, ownerUserID) if err != nil { @@ -68,14 +77,14 @@ func (f *FriendCache) GetFriendIDs(ctx context.Context, ownerUserID string) (fri return friendIDs, utils.Wrap(err, "") } -func (f *FriendCache) DelFriendIDs(ctx context.Context, ownerUserID string) (err error) { +func (f *FriendCacheRedis) DelFriendIDs(ctx context.Context, ownerUserID string) (err error) { defer func() { tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID) }() return f.rcClient.TagAsDeleted(f.getFriendIDsKey(ownerUserID)) } -func (f *FriendCache) GetTwoWayFriendIDs(ctx context.Context, ownerUserID string) (twoWayFriendIDs []string, err error) { +func (f *FriendCacheRedis) GetTwoWayFriendIDs(ctx context.Context, ownerUserID string) (twoWayFriendIDs []string, err error) { friendIDs, err := f.GetFriendIDs(ctx, ownerUserID) if err != nil { return nil, err @@ -92,14 +101,14 @@ func (f *FriendCache) GetTwoWayFriendIDs(ctx context.Context, ownerUserID string return twoWayFriendIDs, nil } -func (f *FriendCache) DelTwoWayFriendIDs(ctx context.Context, ownerUserID string) (err error) { +func (f *FriendCacheRedis) DelTwoWayFriendIDs(ctx context.Context, ownerUserID string) (err error) { defer func() { tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID) }() return f.rcClient.TagAsDeleted(f.getTwoWayFriendsIDsKey(ownerUserID)) } -func (f *FriendCache) GetFriend(ctx context.Context, ownerUserID, friendUserID string) (friend *relation2.FriendModel, err error) { +func (f *FriendCacheRedis) GetFriend(ctx context.Context, ownerUserID, friendUserID string) (friend *relationTb.FriendModel, err error) { getFriend := func() (string, error) { friend, err = f.friendDB.Take(ctx, ownerUserID, friendUserID) if err != nil { @@ -115,12 +124,12 @@ func (f *FriendCache) GetFriend(ctx context.Context, ownerUserID, friendUserID s if err != nil { return nil, err } - friend = &relation2.FriendModel{} + friend = &relationTb.FriendModel{} err = json.Unmarshal([]byte(friendStr), friend) return friend, utils.Wrap(err, "") } -func (f *FriendCache) DelFriend(ctx context.Context, ownerUserID, friendUserID string) (err error) { +func (f *FriendCacheRedis) DelFriend(ctx context.Context, ownerUserID, friendUserID string) (err error) { defer func() { tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "friendUserID", friendUserID) }() diff --git a/pkg/common/db/cache/group.go b/pkg/common/db/cache/group.go index 2a75d97c4..f7e267360 100644 --- a/pkg/common/db/cache/group.go +++ b/pkg/common/db/cache/group.go @@ -3,7 +3,7 @@ package cache import ( "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db/relation" - relation2 "Open_IM/pkg/common/db/table/relation" + relationTb "Open_IM/pkg/common/db/table/relation" "Open_IM/pkg/common/db/unrelation" "Open_IM/pkg/common/tracelog" "Open_IM/pkg/utils" @@ -28,18 +28,25 @@ const ( groupMemberNumKey = "GROUP_MEMBER_NUM_CACHE:" ) -type GroupCache struct { - group relation2.GroupModelInterface - groupMember relation2.GroupMemberModelInterface - groupRequest relation2.GroupRequestModelInterface +type GroupCache interface { + GetGroupsInfo(ctx context.Context, groupIDs []string, fn func(ctx context.Context, groupIDs []string) (groups []*relationTb.GroupModel, err error)) (groups []*relationTb.GroupModel, err error) + DelGroupsInfo(ctx context.Context, groupID string) (err error) + GetGroupInfo(ctx context.Context, groupID string, fn func(ctx context.Context, groupID string) (group *relationTb.GroupModel, err error)) (group *relationTb.GroupModel, err error) + DelGroupInfo(ctx context.Context, groupID string) (err error) +} + +type GroupCacheRedis struct { + group *relation.GroupGorm + groupMember *relation.GroupMemberGorm + groupRequest *relation.GroupRequestGorm mongoDB *unrelation.SuperGroupMongoDriver expireTime time.Duration redisClient *RedisClient rcClient *rockscache.Client } -func NewGroupCache(rdb redis.UniversalClient, groupDB relation2.GroupModelInterface, groupMemberDB relation2.GroupMemberModelInterface, groupRequestDB relation2.GroupRequestModelInterface, mongoClient *unrelation.SuperGroupMongoDriver, opts rockscache.Options) *GroupCache { - return &GroupCache{rcClient: rockscache.NewClient(rdb, opts), expireTime: groupExpireTime, +func NewGroupCacheRedis(rdb redis.UniversalClient, groupDB *relation.GroupGorm, groupMemberDB *relation.GroupMemberGorm, groupRequestDB *relation.GroupRequestGorm, mongoClient *unrelation.SuperGroupMongoDriver, opts rockscache.Options) *GroupCacheRedis { + return &GroupCacheRedis{rcClient: rockscache.NewClient(rdb, opts), expireTime: groupExpireTime, group: groupDB, groupMember: groupMemberDB, groupRequest: groupRequestDB, redisClient: NewRedisClient(rdb), mongoDB: mongoClient, } diff --git a/pkg/common/db/cache/user.go b/pkg/common/db/cache/user.go index 92a5e9168..58186453f 100644 --- a/pkg/common/db/cache/user.go +++ b/pkg/common/db/cache/user.go @@ -2,7 +2,7 @@ package cache import ( "Open_IM/pkg/common/db/relation" - relation2 "Open_IM/pkg/common/db/table/relation" + relationTb "Open_IM/pkg/common/db/table/relation" "Open_IM/pkg/common/tracelog" "Open_IM/pkg/utils" "context" @@ -44,7 +44,7 @@ func (u *UserCache) getUserGlobalRecvMsgOptKey(userID string) string { return userGlobalRecvMsgOptKey + userID } -func (u *UserCache) GetUserInfo(ctx context.Context, userID string) (userInfo *relation2.UserModel, err error) { +func (u *UserCache) GetUserInfo(ctx context.Context, userID string) (userInfo *relationTb.UserModel, err error) { getUserInfo := func() (string, error) { userInfo, err := u.userDB.Take(ctx, userID) if err != nil { @@ -63,13 +63,13 @@ func (u *UserCache) GetUserInfo(ctx context.Context, userID string) (userInfo *r if err != nil { return nil, err } - userInfo = &relation2.UserModel{} + userInfo = &relationTb.UserModel{} err = json.Unmarshal([]byte(userInfoStr), userInfo) return userInfo, utils.Wrap(err, "") } -func (u *UserCache) GetUsersInfo(ctx context.Context, userIDs []string) ([]*relation2.UserModel, error) { - var users []*relation2.UserModel +func (u *UserCache) GetUsersInfo(ctx context.Context, userIDs []string) ([]*relationTb.UserModel, error) { + var users []*relationTb.UserModel for _, userID := range userIDs { user, err := GetUserInfoFromCache(ctx, userID) if err != nil { diff --git a/pkg/common/db/controller/conversation.go b/pkg/common/db/controller/conversation.go index 3ed221c45..c5fe8bc3b 100644 --- a/pkg/common/db/controller/conversation.go +++ b/pkg/common/db/controller/conversation.go @@ -3,7 +3,7 @@ package controller import ( "Open_IM/pkg/common/db/cache" "Open_IM/pkg/common/db/relation" - "Open_IM/pkg/common/db/table" + relationTb "Open_IM/pkg/common/db/table/relation" "context" ) @@ -13,15 +13,15 @@ type ConversationInterface interface { //UpdateUserConversationFiled 更新用户该会话的属性信息 UpdateUsersConversationFiled(ctx context.Context, UserIDList []string, conversationID string, args map[string]interface{}) error //CreateConversation 创建一批新的会话 - CreateConversation(ctx context.Context, conversations []*table.ConversationModel) error + CreateConversation(ctx context.Context, conversations []*relationTb.ConversationModel) error //SyncPeerUserPrivateConversation 同步对端私聊会话内部保证事务操作 - SyncPeerUserPrivateConversationTx(ctx context.Context, conversation *table.ConversationModel) error + SyncPeerUserPrivateConversationTx(ctx context.Context, conversation *relationTb.ConversationModel) error //FindConversations 根据会话ID获取某个用户的多个会话 - FindConversations(ctx context.Context, ownerUserID string, conversationID []string) ([]*table.ConversationModel, error) + FindConversations(ctx context.Context, ownerUserID string, conversationID []string) ([]*relationTb.ConversationModel, error) //GetUserAllConversation 获取一个用户在服务器上所有的会话 - GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*table.ConversationModel, error) + GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*relationTb.ConversationModel, error) //SetUserConversations 设置用户多个会话属性,如果会话不存在则创建,否则更新,内部保证原子性 - SetUserConversations(ctx context.Context, ownerUserID string, conversations []*table.ConversationModel) error + SetUserConversations(ctx context.Context, ownerUserID string, conversations []*relationTb.ConversationModel) error } type ConversationController struct { database ConversationDataBaseInterface @@ -39,22 +39,22 @@ func (c ConversationController) UpdateUsersConversationFiled(ctx context.Context panic("implement me") } -func (c ConversationController) CreateConversation(ctx context.Context, conversations []*table.ConversationModel) error { +func (c ConversationController) CreateConversation(ctx context.Context, conversations []*relationTb.ConversationModel) error { panic("implement me") } -func (c ConversationController) SyncPeerUserPrivateConversationTx(ctx context.Context, conversation *table.ConversationModel) error { +func (c ConversationController) SyncPeerUserPrivateConversationTx(ctx context.Context, conversation *relationTb.ConversationModel) error { panic("implement me") } -func (c ConversationController) FindConversations(ctx context.Context, ownerUserID string, conversationID []string) ([]*table.ConversationModel, error) { +func (c ConversationController) FindConversations(ctx context.Context, ownerUserID string, conversationID []string) ([]*relationTb.ConversationModel, error) { panic("implement me") } -func (c ConversationController) GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*table.ConversationModel, error) { +func (c ConversationController) GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*relationTb.ConversationModel, error) { panic("implement me") } -func (c ConversationController) SetUserConversations(ctx context.Context, ownerUserID string, conversations []*table.ConversationModel) error { +func (c ConversationController) SetUserConversations(ctx context.Context, ownerUserID string, conversations []*relationTb.ConversationModel) error { panic("implement me") } @@ -66,15 +66,15 @@ type ConversationDataBaseInterface interface { //UpdateUserConversationFiled 更新用户该会话的属性信息 UpdateUsersConversationFiled(ctx context.Context, UserIDList []string, conversationID string, args map[string]interface{}) error //CreateConversation 创建一批新的会话 - CreateConversation(ctx context.Context, conversations []*table.ConversationModel) error + CreateConversation(ctx context.Context, conversations []*relationTb.ConversationModel) error //SyncPeerUserPrivateConversation 同步对端私聊会话内部保证事务操作 - SyncPeerUserPrivateConversationTx(ctx context.Context, conversation *table.ConversationModel) error + SyncPeerUserPrivateConversationTx(ctx context.Context, conversation *relationTb.ConversationModel) error //FindConversations 根据会话ID获取某个用户的多个会话 - FindConversations(ctx context.Context, ownerUserID string, conversationID []string) ([]*table.ConversationModel, error) + FindConversations(ctx context.Context, ownerUserID string, conversationID []string) ([]*relationTb.ConversationModel, error) //GetUserAllConversation 获取一个用户在服务器上所有的会话 - GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*table.ConversationModel, error) + GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*relationTb.ConversationModel, error) //SetUserConversations 设置用户多个会话属性,如果会话不存在则创建,否则更新,内部保证原子性 - SetUserConversations(ctx context.Context, ownerUserID string, conversations []*table.ConversationModel) error + SetUserConversations(ctx context.Context, ownerUserID string, conversations []*relationTb.ConversationModel) error } type ConversationDataBase struct { db relation.Conversation @@ -89,23 +89,23 @@ func (c ConversationDataBase) UpdateUsersConversationFiled(ctx context.Context, panic("implement me") } -func (c ConversationDataBase) CreateConversation(ctx context.Context, conversations []*table.ConversationModel) error { +func (c ConversationDataBase) CreateConversation(ctx context.Context, conversations []*relationTb.ConversationModel) error { panic("implement me") } -func (c ConversationDataBase) SyncPeerUserPrivateConversationTx(ctx context.Context, conversation *table.ConversationModel) error { +func (c ConversationDataBase) SyncPeerUserPrivateConversationTx(ctx context.Context, conversation *relationTb.ConversationModel) error { panic("implement me") } -func (c ConversationDataBase) FindConversations(ctx context.Context, ownerUserID string, conversationID []string) ([]*table.ConversationModel, error) { +func (c ConversationDataBase) FindConversations(ctx context.Context, ownerUserID string, conversationID []string) ([]*relationTb.ConversationModel, error) { panic("implement me") } -func (c ConversationDataBase) GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*table.ConversationModel, error) { +func (c ConversationDataBase) GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*relationTb.ConversationModel, error) { panic("implement me") } -func (c ConversationDataBase) SetUserConversations(ctx context.Context, ownerUserID string, conversations []*table.ConversationModel) error { +func (c ConversationDataBase) SetUserConversations(ctx context.Context, ownerUserID string, conversations []*relationTb.ConversationModel) error { panic("implement me") } diff --git a/pkg/common/db/controller/group.go b/pkg/common/db/controller/group.go index e568e2a0b..3d0bd5923 100644 --- a/pkg/common/db/controller/group.go +++ b/pkg/common/db/controller/group.go @@ -23,15 +23,15 @@ type GroupInterface interface { CreateGroup(ctx context.Context, groups []*relation2.GroupModel, groupMembers []*relation2.GroupMemberModel) error TakeGroup(ctx context.Context, groupID string) (group *relation2.GroupModel, err error) FindGroup(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error) - SearchGroup(ctx context.Context, keyword string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error) + SearchGroup(ctx context.Context, keyword string, pageNumber, showNumber int32) (uint32, []*relation2.GroupModel, error) UpdateGroup(ctx context.Context, groupID string, data map[string]any) error DismissGroup(ctx context.Context, groupID string) error // 解散群,并删除群成员 // GroupMember TakeGroupMember(ctx context.Context, groupID string, userID string) (groupMember *relation2.GroupMemberModel, err error) TakeGroupOwner(ctx context.Context, groupID string) (*relation2.GroupMemberModel, error) FindGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32) ([]*relation2.GroupMemberModel, error) - PageGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (int32, []*relation2.GroupMemberModel, error) - SearchGroupMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (int32, []*relation2.GroupMemberModel, error) + PageGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relation2.GroupMemberModel, error) + SearchGroupMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relation2.GroupMemberModel, error) HandlerGroupRequest(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32, member *relation2.GroupMemberModel) error DeleteGroupMember(ctx context.Context, groupID string, userIDs []string) error MapGroupMemberUserID(ctx context.Context, groupIDs []string) (map[string][]string, error) @@ -41,7 +41,7 @@ type GroupInterface interface { // GroupRequest CreateGroupRequest(ctx context.Context, requests []*relation2.GroupRequestModel) error TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relation2.GroupRequestModel, error) - PageGroupRequestUser(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupRequestModel, error) + PageGroupRequestUser(ctx context.Context, userID string, pageNumber, showNumber int32) (uint32, []*relation2.GroupRequestModel, error) // SuperGroup FindSuperGroup(ctx context.Context, groupIDs []string) ([]*unrelation2.SuperGroupModel, error) FindJoinSuperGroup(ctx context.Context, userID string) (superGroup *unrelation2.UserToSuperGroupModel, err error) @@ -53,6 +53,10 @@ type GroupInterface interface { var _ GroupInterface = (*GroupController)(nil) +func NewGroupInterface(database GroupDataBaseInterface) GroupInterface { + return &GroupController{database: database} +} + type GroupController struct { database GroupDataBaseInterface } @@ -69,7 +73,7 @@ func (g *GroupController) FindGroup(ctx context.Context, groupIDs []string) (gro return g.database.FindGroup(ctx, groupIDs) } -func (g *GroupController) SearchGroup(ctx context.Context, keyword string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error) { +func (g *GroupController) SearchGroup(ctx context.Context, keyword string, pageNumber, showNumber int32) (uint32, []*relation2.GroupModel, error) { return g.database.SearchGroup(ctx, keyword, pageNumber, showNumber) } @@ -93,11 +97,11 @@ func (g *GroupController) FindGroupMember(ctx context.Context, groupIDs []string return g.database.FindGroupMember(ctx, groupIDs, userIDs, roleLevels) } -func (g *GroupController) PageGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (int32, []*relation2.GroupMemberModel, error) { +func (g *GroupController) PageGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relation2.GroupMemberModel, error) { return g.database.PageGroupMember(ctx, groupIDs, userIDs, roleLevels, pageNumber, showNumber) } -func (g *GroupController) SearchGroupMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (int32, []*relation2.GroupMemberModel, error) { +func (g *GroupController) SearchGroupMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relation2.GroupMemberModel, error) { return g.database.SearchGroupMember(ctx, keyword, groupIDs, userIDs, roleLevels, pageNumber, showNumber) } @@ -133,7 +137,7 @@ func (g *GroupController) TakeGroupRequest(ctx context.Context, groupID string, return g.database.TakeGroupRequest(ctx, groupID, userID) } -func (g *GroupController) PageGroupRequestUser(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupRequestModel, error) { +func (g *GroupController) PageGroupRequestUser(ctx context.Context, userID string, pageNumber, showNumber int32) (uint32, []*relation2.GroupRequestModel, error) { return g.database.PageGroupRequestUser(ctx, userID, pageNumber, showNumber) } @@ -168,15 +172,15 @@ type GroupDataBaseInterface interface { CreateGroup(ctx context.Context, groups []*relation2.GroupModel, groupMembers []*relation2.GroupMemberModel) error TakeGroup(ctx context.Context, groupID string) (group *relation2.GroupModel, err error) FindGroup(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error) - SearchGroup(ctx context.Context, keyword string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error) + SearchGroup(ctx context.Context, keyword string, pageNumber, showNumber int32) (uint32, []*relation2.GroupModel, error) UpdateGroup(ctx context.Context, groupID string, data map[string]any) error DismissGroup(ctx context.Context, groupID string) error // 解散群,并删除群成员 // GroupMember TakeGroupMember(ctx context.Context, groupID string, userID string) (groupMember *relation2.GroupMemberModel, err error) TakeGroupOwner(ctx context.Context, groupID string) (*relation2.GroupMemberModel, error) FindGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32) ([]*relation2.GroupMemberModel, error) - PageGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (int32, []*relation2.GroupMemberModel, error) - SearchGroupMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (int32, []*relation2.GroupMemberModel, error) + PageGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relation2.GroupMemberModel, error) + SearchGroupMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relation2.GroupMemberModel, error) HandlerGroupRequest(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32, member *relation2.GroupMemberModel) error DeleteGroupMember(ctx context.Context, groupID string, userIDs []string) error MapGroupMemberUserID(ctx context.Context, groupIDs []string) (map[string][]string, error) @@ -186,7 +190,7 @@ type GroupDataBaseInterface interface { // GroupRequest CreateGroupRequest(ctx context.Context, requests []*relation2.GroupRequestModel) error TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relation2.GroupRequestModel, error) - PageGroupRequestUser(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupRequestModel, error) + PageGroupRequestUser(ctx context.Context, userID string, pageNumber, showNumber int32) (uint32, []*relation2.GroupRequestModel, error) // SuperGroup FindSuperGroup(ctx context.Context, groupIDs []string) ([]*unrelation2.SuperGroupModel, error) FindJoinSuperGroup(ctx context.Context, userID string) (*unrelation2.UserToSuperGroupModel, error) @@ -196,7 +200,7 @@ type GroupDataBaseInterface interface { CreateSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error } -func newGroupDatabase(db *gorm.DB, rdb redis.UniversalClient, mgoClient *mongo.Client) GroupDataBaseInterface { +func NewGroupDatabase(db *gorm.DB, rdb redis.UniversalClient, mgoClient *mongo.Client) GroupDataBaseInterface { groupDB := relation.NewGroupDB(db) groupMemberDB := relation.NewGroupMemberDB(db) groupRequestDB := relation.NewGroupRequest(db) @@ -256,7 +260,7 @@ func (g *GroupDataBase) FindGroup(ctx context.Context, groupIDs []string) (group return g.groupDB.Find(ctx, groupIDs) } -func (g *GroupDataBase) SearchGroup(ctx context.Context, keyword string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error) { +func (g *GroupDataBase) SearchGroup(ctx context.Context, keyword string, pageNumber, showNumber int32) (uint32, []*relation2.GroupModel, error) { return g.groupDB.Search(ctx, keyword, pageNumber, showNumber) } @@ -285,11 +289,11 @@ func (g *GroupDataBase) FindGroupMember(ctx context.Context, groupIDs []string, return g.groupMemberDB.Find(ctx, groupIDs, userIDs, roleLevels) } -func (g *GroupDataBase) PageGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (int32, []*relation2.GroupMemberModel, error) { +func (g *GroupDataBase) PageGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relation2.GroupMemberModel, error) { return g.groupMemberDB.SearchMember(ctx, "", groupIDs, userIDs, roleLevels, pageNumber, showNumber) } -func (g *GroupDataBase) SearchGroupMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (int32, []*relation2.GroupMemberModel, error) { +func (g *GroupDataBase) SearchGroupMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relation2.GroupMemberModel, error) { return g.groupMemberDB.SearchMember(ctx, keyword, groupIDs, userIDs, roleLevels, pageNumber, showNumber) } @@ -349,7 +353,7 @@ func (g *GroupDataBase) TakeGroupRequest(ctx context.Context, groupID string, us return g.groupRequestDB.Take(ctx, groupID, userID) } -func (g *GroupDataBase) PageGroupRequestUser(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupRequestModel, error) { +func (g *GroupDataBase) PageGroupRequestUser(ctx context.Context, userID string, pageNumber, showNumber int32) (uint32, []*relation2.GroupRequestModel, error) { return g.groupRequestDB.Page(ctx, userID, pageNumber, showNumber) } diff --git a/pkg/common/db/localcache/conversation.go b/pkg/common/db/localcache/conversation.go index cb07bd7c7..3a4775367 100644 --- a/pkg/common/db/localcache/conversation.go +++ b/pkg/common/db/localcache/conversation.go @@ -1,8 +1,8 @@ package localcache import ( + discoveryRegistry "Open_IM/pkg/discovery_registry" "context" - "github.com/OpenIMSDK/openKeeper" "sync" ) @@ -13,16 +13,17 @@ type ConversationLocalCacheInterface interface { type ConversationLocalCache struct { lock sync.Mutex SuperGroupRecvMsgNotNotifyUserIDs map[string][]string - zkClient *openKeeper.ZkClient + client discoveryRegistry.SvcDiscoveryRegistry } -func NewConversationLocalCache(zkClient *openKeeper.ZkClient) ConversationLocalCache { +func NewConversationLocalCache(client discoveryRegistry.SvcDiscoveryRegistry) ConversationLocalCache { return ConversationLocalCache{ SuperGroupRecvMsgNotNotifyUserIDs: make(map[string][]string, 0), - zkClient: zkClient, + client: client, } } func (g *ConversationLocalCache) GetRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) []string { + g.client.GetConn() return []string{} } diff --git a/pkg/common/db/localcache/group.go b/pkg/common/db/localcache/group.go index c4606532d..87d9d2f27 100644 --- a/pkg/common/db/localcache/group.go +++ b/pkg/common/db/localcache/group.go @@ -3,10 +3,9 @@ package localcache import ( "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" + discoveryRegistry "Open_IM/pkg/discovery_registry" "Open_IM/pkg/proto/group" "context" - "github.com/OpenIMSDK/openKeeper" - "google.golang.org/grpc" "sync" ) @@ -15,9 +14,9 @@ type GroupLocalCacheInterface interface { } type GroupLocalCache struct { - lock sync.Mutex - cache map[string]GroupMemberIDsHash - zkClient *openKeeper.ZkClient + lock sync.Mutex + cache map[string]GroupMemberIDsHash + client discoveryRegistry.SvcDiscoveryRegistry } type GroupMemberIDsHash struct { @@ -25,17 +24,17 @@ type GroupMemberIDsHash struct { userIDs []string } -func NewGroupMemberIDsLocalCache(zkClient *openKeeper.ZkClient) GroupLocalCache { +func NewGroupMemberIDsLocalCache(client discoveryRegistry.SvcDiscoveryRegistry) GroupLocalCache { return GroupLocalCache{ - cache: make(map[string]GroupMemberIDsHash, 0), - zkClient: zkClient, + cache: make(map[string]GroupMemberIDsHash, 0), + client: client, } } func (g *GroupLocalCache) GetGroupMemberIDs(ctx context.Context, groupID string) ([]string, error) { g.lock.Lock() defer g.lock.Unlock() - conn, err := g.zkClient.GetConn(config.Config.RpcRegisterName.OpenImGroupName, nil) + conn, err := g.client.GetConn(config.Config.RpcRegisterName.OpenImGroupName, nil) if err != nil { return nil, err } diff --git a/pkg/common/db/relation/group_member_model.go b/pkg/common/db/relation/group_member_model.go index 4ebdc5b91..15745da1c 100644 --- a/pkg/common/db/relation/group_member_model.go +++ b/pkg/common/db/relation/group_member_model.go @@ -114,7 +114,7 @@ func (g *GroupMemberGorm) TakeOwner(ctx context.Context, groupID string, tx ...a return groupMember, utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ? and role_level = ?", groupID, constant.GroupOwner).Take(groupMember).Error, "") } -func (g *GroupMemberGorm) SearchMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32, tx ...any) (total int32, groupList []*relation.GroupMemberModel, err error) { +func (g *GroupMemberGorm) SearchMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32, tx ...any) (total uint32, groupList []*relation.GroupMemberModel, err error) { defer func() { tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "keyword", keyword, "groupIDs", groupIDs, "userIDs", userIDs, "roleLevels", roleLevels, "pageNumber", pageNumber, "showNumber", showNumber, "total", total, "groupList", groupList) }() diff --git a/pkg/common/db/relation/group_model.go b/pkg/common/db/relation/group_model.go index 4091c22e4..bc97aba66 100644 --- a/pkg/common/db/relation/group_model.go +++ b/pkg/common/db/relation/group_model.go @@ -61,7 +61,7 @@ func (g *GroupGorm) Take(ctx context.Context, groupID string, tx ...any) (group return group, utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ?", groupID).Take(group).Error, "") } -func (g *GroupGorm) Search(ctx context.Context, keyword string, pageNumber, showNumber int32, tx ...any) (total int32, groups []*relation.GroupModel, err error) { +func (g *GroupGorm) Search(ctx context.Context, keyword string, pageNumber, showNumber int32, tx ...any) (total uint32, groups []*relation.GroupModel, err error) { defer func() { tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "keyword", keyword, "pageNumber", pageNumber, "showNumber", showNumber, "total", total, "groups", groups) }() diff --git a/pkg/common/db/relation/group_request_model.go b/pkg/common/db/relation/group_request_model.go index f911c3cdb..a0c4b01fb 100644 --- a/pkg/common/db/relation/group_request_model.go +++ b/pkg/common/db/relation/group_request_model.go @@ -77,7 +77,7 @@ func (g *GroupRequestGorm) Take(ctx context.Context, groupID string, userID stri return groupRequest, utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ? and user_id = ? ", groupID, userID).Take(groupRequest).Error, utils.GetSelfFuncName()) } -func (g *GroupRequestGorm) Page(ctx context.Context, userID string, pageNumber, showNumber int32, tx ...any) (total int32, groups []*relation.GroupRequestModel, err error) { +func (g *GroupRequestGorm) Page(ctx context.Context, userID string, pageNumber, showNumber int32, tx ...any) (total uint32, groups []*relation.GroupRequestModel, err error) { defer func() { tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "pageNumber", pageNumber, "showNumber", showNumber, "total", total, "groups", groups) }() diff --git a/pkg/common/db/relation/utils.go b/pkg/common/db/relation/utils.go index 83e5e7bd2..8e3c62bfc 100644 --- a/pkg/common/db/relation/utils.go +++ b/pkg/common/db/relation/utils.go @@ -5,7 +5,7 @@ import ( "gorm.io/gorm" ) -func gormPage[E any](db *gorm.DB, pageNumber, showNumber int32) (int32, []*E, error) { +func gormPage[E any](db *gorm.DB, pageNumber, showNumber int32) (uint32, []*E, error) { var count int64 if err := db.Model(new(E)).Count(&count).Error; err != nil { return 0, nil, utils.Wrap(err, "") @@ -14,10 +14,10 @@ func gormPage[E any](db *gorm.DB, pageNumber, showNumber int32) (int32, []*E, er if err := db.Limit(int(showNumber)).Offset(int(pageNumber * showNumber)).Find(&es).Error; err != nil { return 0, nil, utils.Wrap(err, "") } - return int32(count), es, nil + return uint32(count), es, nil } -func gormSearch[E any](db *gorm.DB, fields []string, value string, pageNumber, showNumber int32) (int32, []*E, error) { +func gormSearch[E any](db *gorm.DB, fields []string, value string, pageNumber, showNumber int32) (uint32, []*E, error) { if len(fields) > 0 && value != "" { value = "%" + value + "%" if len(fields) == 1 { diff --git a/pkg/common/db/table/relation/group.go b/pkg/common/db/table/relation/group.go index adc9d5102..b95e814da 100644 --- a/pkg/common/db/table/relation/group.go +++ b/pkg/common/db/table/relation/group.go @@ -38,5 +38,5 @@ type GroupModelInterface interface { UpdateStatus(ctx context.Context, groupID string, status int32, tx ...any) (err error) Find(ctx context.Context, groupIDs []string, tx ...any) (groups []*GroupModel, err error) Take(ctx context.Context, groupID string, tx ...any) (group *GroupModel, err error) - Search(ctx context.Context, keyword string, pageNumber, showNumber int32, tx ...any) (total int32, groups []*GroupModel, err error) + Search(ctx context.Context, keyword string, pageNumber, showNumber int32, tx ...any) (total uint32, groups []*GroupModel, err error) } diff --git a/pkg/common/db/table/relation/group_member.go b/pkg/common/db/table/relation/group_member.go index 61384753b..a83dd76c5 100644 --- a/pkg/common/db/table/relation/group_member.go +++ b/pkg/common/db/table/relation/group_member.go @@ -38,7 +38,7 @@ type GroupMemberModelInterface interface { //FindGroupUser(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, tx ...any) (groupList []*GroupMemberModel, err error) Take(ctx context.Context, groupID string, userID string, tx ...any) (groupMember *GroupMemberModel, err error) TakeOwner(ctx context.Context, groupID string, tx ...any) (groupMember *GroupMemberModel, err error) - SearchMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32, tx ...any) (total int32, groupList []*GroupMemberModel, err error) + SearchMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32, tx ...any) (total uint32, groupList []*GroupMemberModel, err error) MapGroupMemberNum(ctx context.Context, groupIDs []string, tx ...any) (count map[string]uint32, err error) FindJoinUserID(ctx context.Context, groupIDs []string, tx ...any) (groupUsers map[string][]string, err error) } diff --git a/pkg/common/db/table/relation/group_request.go b/pkg/common/db/table/relation/group_request.go index 6f030e7a1..1c9d112c4 100644 --- a/pkg/common/db/table/relation/group_request.go +++ b/pkg/common/db/table/relation/group_request.go @@ -35,5 +35,5 @@ type GroupRequestModelInterface interface { //Update(ctx context.Context, groupRequests []*GroupRequestModel, tx ...any) (err error) //Find(ctx context.Context, groupRequests []*GroupRequestModel, tx ...any) (resultGroupRequests []*GroupRequestModel, err error) Take(ctx context.Context, groupID string, userID string, tx ...any) (groupRequest *GroupRequestModel, err error) - Page(ctx context.Context, userID string, pageNumber, showNumber int32, tx ...any) (total int32, groups []*GroupRequestModel, err error) + Page(ctx context.Context, userID string, pageNumber, showNumber int32, tx ...any) (total uint32, groups []*GroupRequestModel, err error) } diff --git a/pkg/common/db/unrelation/init_mongo.go b/pkg/common/db/unrelation/mongo.go similarity index 92% rename from pkg/common/db/unrelation/init_mongo.go rename to pkg/common/db/unrelation/mongo.go index d7cfcae66..a359e11d0 100644 --- a/pkg/common/db/unrelation/init_mongo.go +++ b/pkg/common/db/unrelation/mongo.go @@ -136,3 +136,17 @@ func (m *Mongo) createMongoIndex(collection string, isUnique bool, keys ...strin } return nil } + +func MongoTransaction(ctx context.Context, mgo *mongo.Client, fn func(ctx mongo.SessionContext) error) error { + sess, err := mgo.StartSession() + if err != nil { + return err + } + sCtx := mongo.NewSessionContext(ctx, sess) + defer sess.EndSession(sCtx) + if err := fn(sCtx); err != nil { + _ = sess.AbortTransaction(sCtx) + return err + } + return utils.Wrap(sess.CommitTransaction(sCtx), "") +} diff --git a/pkg/common/db/unrelation/mongo_model.go b/pkg/common/db/unrelation/mongo_model.go index 9cb4daaef..aee4ae29e 100644 --- a/pkg/common/db/unrelation/mongo_model.go +++ b/pkg/common/db/unrelation/mongo_model.go @@ -57,40 +57,6 @@ type GroupMember_x struct { var ErrMsgListNotExist = errors.New("user not have msg in mongoDB") -func (d *db.DataBases) GetMinSeqFromMongo(uid string) (MinSeq uint32, err error) { - return 1, nil - //var i, NB uint32 - //var seqUid string - //session := d.mgoSession.Clone() - //if session == nil { - // return MinSeq, errors.New("session == nil") - //} - //defer session.Close() - //c := session.DB(config.Config.Mongo.DBDatabase).C(cChat) - //MaxSeq, err := d.GetUserMaxSeq(uid) - //if err != nil && err != redis.ErrNil { - // return MinSeq, err - //} - //NB = uint32(MaxSeq / singleGocMsgNum) - //for i = 0; i <= NB; i++ { - // seqUid = indexGen(uid, i) - // n, err := c.Find(bson.M{"uid": seqUid}).Count() - // if err == nil && n != 0 { - // if i == 0 { - // MinSeq = 1 - // } else { - // MinSeq = uint32(i * singleGocMsgNum) - // } - // break - // } - //} - //return MinSeq, nil -} - -func (d *db.DataBases) GetMinSeqFromMongo2(uid string) (MinSeq uint32, err error) { - return 1, nil -} - // deleteMsgByLogic func (d *db.DataBases) DelMsgBySeqList(userID string, seqList []uint32, operationID string) (totalUnexistSeqList []uint32, err error) { log.Debug(operationID, utils.GetSelfFuncName(), "args ", userID, seqList) @@ -657,24 +623,6 @@ func (d *db.DataBases) SaveUserChat(uid string, sendTime int64, m *pbMsg.MsgData return nil } -func (d *db.DataBases) DelUserChat(uid string) error { - return nil - //session := d.mgoSession.Clone() - //if session == nil { - // return errors.New("session == nil") - //} - //defer session.Close() - // - //c := session.DB(config.Config.Mongo.DBDatabase).C(cChat) - // - //delTime := time.Now().Unix() - int64(config.Config.Mongo.DBRetainChatRecords)*24*3600 - //if err := c.Update(bson.M{"uid": uid}, bson.M{"$pull": bson.M{"msg": bson.M{"sendtime": bson.M{"$lte": delTime}}}}); err != nil { - // return err - //} - // - //return nil -} - func (d *db.DataBases) DelUserChatMongo2(uid string) error { ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat) @@ -687,19 +635,6 @@ func (d *db.DataBases) DelUserChatMongo2(uid string) error { return nil } -func (d *db.DataBases) MgoUserCount() (int, error) { - return 0, nil - //session := d.mgoSession.Clone() - //if session == nil { - // return 0, errors.New("session == nil") - //} - //defer session.Close() - // - //c := session.DB(config.Config.Mongo.DBDatabase).C(cChat) - // - //return c.Find(nil).Count() -} - func (d *db.DataBases) MgoSkipUID(count int) (string, error) { return "", nil //session := d.mgoSession.Clone() @@ -715,249 +650,6 @@ func (d *db.DataBases) MgoSkipUID(count int) (string, error) { //return sChat.UID, nil } -func (d *db.DataBases) GetGroupMember(groupID string) []string { - return nil - //groupInfo := GroupMember_x{} - //groupInfo.GroupID = groupID - //groupInfo.UIDList = make([]string, 0) - // - //session := d.mgoSession.Clone() - //if session == nil { - // return groupInfo.UIDList - //} - //defer session.Close() - // - //c := session.DB(config.Config.Mongo.DBDatabase).C(cGroup) - // - //if err := c.Find(bson.M{"groupid": groupInfo.GroupID}).One(&groupInfo); err != nil { - // return groupInfo.UIDList - //} - // - //return groupInfo.UIDList -} - -func (d *db.DataBases) AddGroupMember(groupID, uid string) error { - return nil - //session := d.mgoSession.Clone() - //if session == nil { - // return errors.New("session == nil") - //} - //defer session.Close() - // - //c := session.DB(config.Config.Mongo.DBDatabase).C(cGroup) - // - //n, err := c.Find(bson.M{"groupid": groupID}).Count() - //if err != nil { - // return err - //} - // - //if n == 0 { - // groupInfo := GroupMember_x{} - // groupInfo.GroupID = groupID - // groupInfo.UIDList = append(groupInfo.UIDList, uid) - // err = c.Insert(&groupInfo) - // if err != nil { - // return err - // } - //} else { - // err = c.Update(bson.M{"groupid": groupID}, bson.M{"$addToSet": bson.M{"uidlist": uid}}) - // if err != nil { - // return err - // } - //} - // - //return nil -} - -func (d *db.DataBases) DelGroupMember(groupID, uid string) error { - return nil - //session := d.mgoSession.Clone() - //if session == nil { - // return errors.New("session == nil") - //} - //defer session.Close() - // - //c := session.DB(config.Config.Mongo.DBDatabase).C(cGroup) - // - //if err := c.Update(bson.M{"groupid": groupID}, bson.M{"$pull": bson.M{"uidlist": uid}}); err != nil { - // return err - //} - // - //return nil -} - -//type SuperGroup struct { -// GroupID string `bson:"group_id" json:"groupID"` -// MemberIDList []string `bson:"member_id_list" json:"memberIDList"` -//} -// -//type UserToSuperGroup struct { -// UserID string `bson:"user_id" json:"userID"` -// GroupIDList []string `bson:"group_id_list" json:"groupIDList"` -//} - -func (d *db.DataBases) CreateSuperGroup(groupID string, initMemberIDList []string, memberNumCount int) error { - ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) - c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cSuperGroup) - session, err := d.mongoClient.StartSession() - if err != nil { - return utils.Wrap(err, "start session failed") - } - defer session.EndSession(ctx) - sCtx := mongo.NewSessionContext(ctx, session) - superGroup := SuperGroup{ - GroupID: groupID, - MemberIDList: initMemberIDList, - } - _, err = c.InsertOne(sCtx, superGroup) - if err != nil { - _ = session.AbortTransaction(ctx) - return utils.Wrap(err, "transaction failed") - } - var users []UserToSuperGroup - for _, v := range initMemberIDList { - users = append(users, UserToSuperGroup{ - UserID: v, - }) - } - upsert := true - opts := &options.UpdateOptions{ - Upsert: &upsert, - } - c = d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cUserToSuperGroup) - //_, err = c.UpdateMany(sCtx, bson.M{"user_id": bson.M{"$in": initMemberIDList}}, bson.M{"$addToSet": bson.M{"group_id_list": groupID}}, opts) - //if err != nil { - // session.AbortTransaction(ctx) - // return utils.Wrap(err, "transaction failed") - //} - for _, userID := range initMemberIDList { - _, err = c.UpdateOne(sCtx, bson.M{"user_id": userID}, bson.M{"$addToSet": bson.M{"group_id_list": groupID}}, opts) - if err != nil { - _ = session.AbortTransaction(ctx) - return utils.Wrap(err, "transaction failed") - } - - } - return err -} - -func (d *db.DataBases) GetSuperGroup(groupID string) (SuperGroup, error) { - ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) - c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cSuperGroup) - superGroup := SuperGroup{} - err := c.FindOne(ctx, bson.M{"group_id": groupID}).Decode(&superGroup) - return superGroup, err -} - -func (d *db.DataBases) AddUserToSuperGroup(groupID string, userIDList []string) error { - ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) - c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cSuperGroup) - session, err := d.mongoClient.StartSession() - if err != nil { - return utils.Wrap(err, "start session failed") - } - defer session.EndSession(ctx) - sCtx := mongo.NewSessionContext(ctx, session) - if err != nil { - return utils.Wrap(err, "start transaction failed") - } - _, err = c.UpdateOne(sCtx, bson.M{"group_id": groupID}, bson.M{"$addToSet": bson.M{"member_id_list": bson.M{"$each": userIDList}}}) - if err != nil { - _ = session.AbortTransaction(ctx) - return utils.Wrap(err, "transaction failed") - } - c = d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cUserToSuperGroup) - var users []UserToSuperGroup - for _, v := range userIDList { - users = append(users, UserToSuperGroup{ - UserID: v, - }) - } - upsert := true - opts := &options.UpdateOptions{ - Upsert: &upsert, - } - for _, userID := range userIDList { - _, err = c.UpdateOne(sCtx, bson.M{"user_id": userID}, bson.M{"$addToSet": bson.M{"group_id_list": groupID}}, opts) - if err != nil { - _ = session.AbortTransaction(ctx) - return utils.Wrap(err, "transaction failed") - } - } - _ = session.CommitTransaction(ctx) - return err -} - -func (d *db.DataBases) RemoverUserFromSuperGroup(groupID string, userIDList []string) error { - ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) - c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cSuperGroup) - session, err := d.mongoClient.StartSession() - if err != nil { - return utils.Wrap(err, "start session failed") - } - defer session.EndSession(ctx) - sCtx := mongo.NewSessionContext(ctx, session) - _, err = c.UpdateOne(ctx, bson.M{"group_id": groupID}, bson.M{"$pull": bson.M{"member_id_list": bson.M{"$in": userIDList}}}) - if err != nil { - _ = session.AbortTransaction(ctx) - return utils.Wrap(err, "transaction failed") - } - err = d.RemoveGroupFromUser(ctx, sCtx, groupID, userIDList) - if err != nil { - _ = session.AbortTransaction(ctx) - return utils.Wrap(err, "transaction failed") - } - _ = session.CommitTransaction(ctx) - return err -} - -func (d *db.DataBases) GetSuperGroupByUserID(userID string) (UserToSuperGroup, error) { - ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) - c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cUserToSuperGroup) - var user UserToSuperGroup - _ = c.FindOne(ctx, bson.M{"user_id": userID}).Decode(&user) - return user, nil -} - -func (d *db.DataBases) DeleteSuperGroup(groupID string) error { - ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) - c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cSuperGroup) - session, err := d.mongoClient.StartSession() - if err != nil { - return utils.Wrap(err, "start session failed") - } - defer session.EndSession(ctx) - sCtx := mongo.NewSessionContext(ctx, session) - superGroup := &SuperGroup{} - result := c.FindOneAndDelete(sCtx, bson.M{"group_id": groupID}) - err = result.Decode(superGroup) - if err != nil { - session.AbortTransaction(ctx) - return utils.Wrap(err, "transaction failed") - } - if err = d.RemoveGroupFromUser(ctx, sCtx, groupID, superGroup.MemberIDList); err != nil { - session.AbortTransaction(ctx) - return utils.Wrap(err, "transaction failed") - } - session.CommitTransaction(ctx) - return nil -} - -func (d *db.DataBases) RemoveGroupFromUser(ctx, sCtx context.Context, groupID string, userIDList []string) error { - var users []UserToSuperGroup - for _, v := range userIDList { - users = append(users, UserToSuperGroup{ - UserID: v, - }) - } - c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cUserToSuperGroup) - _, err := c.UpdateOne(sCtx, bson.M{"user_id": bson.M{"$in": userIDList}}, bson.M{"$pull": bson.M{"group_id_list": groupID}}) - if err != nil { - return utils.Wrap(err, "UpdateOne transaction failed") - } - return err -} - func generateTagID(tagName, userID string) string { return utils.Md5(tagName + userID + strconv.Itoa(rand.Int()) + time.Now().String()) } diff --git a/pkg/discovery_registry/discovery_register.go b/pkg/discovery_registry/discovery_register.go index be13103fc..56b2eaf34 100644 --- a/pkg/discovery_registry/discovery_register.go +++ b/pkg/discovery_registry/discovery_register.go @@ -1,54 +1,44 @@ package discoveryRegistry import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/utils" - "context" - "fmt" - "github.com/OpenIMSDK/getcdv3" - clientv3 "go.etcd.io/etcd/client/v3" "google.golang.org/grpc" - "time" - - "gopkg.in/yaml.v3" - "strings" ) type SvcDiscoveryRegistry interface { Register(serviceName, host string, port int, opts ...grpc.DialOption) error UnRegister() error GetConns(serviceName string, opts ...grpc.DialOption) ([]*grpc.ClientConn, error) - GetConn(serviceName string, strategy func(slice []*grpc.ClientConn) int, opts ...grpc.DialOption) (*grpc.ClientConn, error) + GetConn(serviceName string, opts ...grpc.DialOption) (*grpc.ClientConn, error) //RegisterConf(conf []byte) error //LoadConf() ([]byte, error) } -func registerConf(key, conf string) { - etcdAddr := strings.Join(config.Config.Etcd.EtcdAddr, ",") - cli, err := clientv3.New(clientv3.Config{ - Endpoints: strings.Split(etcdAddr, ","), DialTimeout: 5 * time.Second}) - - if err != nil { - panic(err.Error()) - } - //lease - if _, err := cli.Put(context.Background(), key, conf); err != nil { - fmt.Println("panic, params: ") - panic(err.Error()) - } -} - -func RegisterConf() { - bytes, err := yaml.Marshal(config.Config) - if err != nil { - panic(err.Error()) - } - secretMD5 := utils.Md5(config.Config.Etcd.Secret) - confBytes, err := utils.AesEncrypt(bytes, []byte(secretMD5[0:16])) - if err != nil { - panic(err.Error()) - } - fmt.Println("start register", secretMD5, getcdv3.GetPrefix(config.Config.Etcd.EtcdSchema, config.ConfName)) - registerConf(getcdv3.GetPrefix(config.Config.Etcd.EtcdSchema, config.ConfName), string(confBytes)) - fmt.Println("etcd register conf ok") -} +//func registerConf(key, conf string) { +// etcdAddr := strings.Join(config.Config.Etcd.EtcdAddr, ",") +// cli, err := clientv3.New(clientv3.Config{ +// Endpoints: strings.Split(etcdAddr, ","), DialTimeout: 5 * time.Second}) +// +// if err != nil { +// panic(err.Error()) +// } +// //lease +// if _, err := cli.Put(context.Background(), key, conf); err != nil { +// fmt.Println("panic, params: ") +// panic(err.Error()) +// } +//} +// +//func RegisterConf() { +// bytes, err := yaml.Marshal(config.Config) +// if err != nil { +// panic(err.Error()) +// } +// secretMD5 := utils.Md5(config.Config.Etcd.Secret) +// confBytes, err := utils.AesEncrypt(bytes, []byte(secretMD5[0:16])) +// if err != nil { +// panic(err.Error()) +// } +// fmt.Println("start register", secretMD5, getcdv3.GetPrefix(config.Config.Etcd.EtcdSchema, config.ConfName)) +// registerConf(getcdv3.GetPrefix(config.Config.Etcd.EtcdSchema, config.ConfName), string(confBytes)) +// fmt.Println("etcd register conf ok") +//} diff --git a/pkg/proto/group/group.pb.go b/pkg/proto/group/group.pb.go index ad028a12a..a125f304d 100644 --- a/pkg/proto/group/group.pb.go +++ b/pkg/proto/group/group.pb.go @@ -39,7 +39,7 @@ func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} } func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) } func (*CreateGroupReq) ProtoMessage() {} func (*CreateGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{0} + return fileDescriptor_group_97564bfcd2811fbb, []int{0} } func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b) @@ -98,7 +98,7 @@ func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} } func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) } func (*CreateGroupResp) ProtoMessage() {} func (*CreateGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{1} + return fileDescriptor_group_97564bfcd2811fbb, []int{1} } func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b) @@ -136,7 +136,7 @@ func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} } func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoReq) ProtoMessage() {} func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{2} + return fileDescriptor_group_97564bfcd2811fbb, []int{2} } func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b) @@ -174,7 +174,7 @@ func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} } func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoResp) ProtoMessage() {} func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{3} + return fileDescriptor_group_97564bfcd2811fbb, []int{3} } func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b) @@ -212,7 +212,7 @@ func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} } func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) } func (*SetGroupInfoReq) ProtoMessage() {} func (*SetGroupInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{4} + return fileDescriptor_group_97564bfcd2811fbb, []int{4} } func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b) @@ -249,7 +249,7 @@ func (m *SetGroupInfoResp) Reset() { *m = SetGroupInfoResp{} } func (m *SetGroupInfoResp) String() string { return proto.CompactTextString(m) } func (*SetGroupInfoResp) ProtoMessage() {} func (*SetGroupInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{5} + return fileDescriptor_group_97564bfcd2811fbb, []int{5} } func (m *SetGroupInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupInfoResp.Unmarshal(m, b) @@ -281,7 +281,7 @@ func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationL func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListReq) ProtoMessage() {} func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{6} + return fileDescriptor_group_97564bfcd2811fbb, []int{6} } func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b) @@ -316,7 +316,7 @@ func (m *GetGroupApplicationListReq) GetFromUserID() string { } type GetGroupApplicationListResp struct { - Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` + Total uint32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` GroupRequests []*sdk_ws.GroupRequest `protobuf:"bytes,2,rep,name=groupRequests" json:"groupRequests,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -327,7 +327,7 @@ func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplication func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListResp) ProtoMessage() {} func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{7} + return fileDescriptor_group_97564bfcd2811fbb, []int{7} } func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b) @@ -347,7 +347,7 @@ func (m *GetGroupApplicationListResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupApplicationListResp proto.InternalMessageInfo -func (m *GetGroupApplicationListResp) GetTotal() int32 { +func (m *GetGroupApplicationListResp) GetTotal() uint32 { if m != nil { return m.Total } @@ -362,8 +362,8 @@ func (m *GetGroupApplicationListResp) GetGroupRequests() []*sdk_ws.GroupRequest } type GetUserReqApplicationListReq struct { - UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` - Pagination *sdk_ws.RequestPagination `protobuf:"bytes,2,opt,name=pagination" json:"pagination,omitempty"` + Pagination *sdk_ws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -373,7 +373,7 @@ func (m *GetUserReqApplicationListReq) Reset() { *m = GetUserReqApplicat func (m *GetUserReqApplicationListReq) String() string { return proto.CompactTextString(m) } func (*GetUserReqApplicationListReq) ProtoMessage() {} func (*GetUserReqApplicationListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{8} + return fileDescriptor_group_97564bfcd2811fbb, []int{8} } func (m *GetUserReqApplicationListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserReqApplicationListReq.Unmarshal(m, b) @@ -393,13 +393,6 @@ func (m *GetUserReqApplicationListReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetUserReqApplicationListReq proto.InternalMessageInfo -func (m *GetUserReqApplicationListReq) GetUserID() string { - if m != nil { - return m.UserID - } - return "" -} - func (m *GetUserReqApplicationListReq) GetPagination() *sdk_ws.RequestPagination { if m != nil { return m.Pagination @@ -407,8 +400,15 @@ func (m *GetUserReqApplicationListReq) GetPagination() *sdk_ws.RequestPagination return nil } +func (m *GetUserReqApplicationListReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + type GetUserReqApplicationListResp struct { - Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` + Total uint32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` GroupRequests []*sdk_ws.GroupRequest `protobuf:"bytes,2,rep,name=groupRequests" json:"groupRequests,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -419,7 +419,7 @@ func (m *GetUserReqApplicationListResp) Reset() { *m = GetUserReqApplica func (m *GetUserReqApplicationListResp) String() string { return proto.CompactTextString(m) } func (*GetUserReqApplicationListResp) ProtoMessage() {} func (*GetUserReqApplicationListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{9} + return fileDescriptor_group_97564bfcd2811fbb, []int{9} } func (m *GetUserReqApplicationListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserReqApplicationListResp.Unmarshal(m, b) @@ -439,7 +439,7 @@ func (m *GetUserReqApplicationListResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetUserReqApplicationListResp proto.InternalMessageInfo -func (m *GetUserReqApplicationListResp) GetTotal() int32 { +func (m *GetUserReqApplicationListResp) GetTotal() uint32 { if m != nil { return m.Total } @@ -466,7 +466,7 @@ func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} } func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerReq) ProtoMessage() {} func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{10} + return fileDescriptor_group_97564bfcd2811fbb, []int{10} } func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b) @@ -517,7 +517,7 @@ func (m *TransferGroupOwnerResp) Reset() { *m = TransferGroupOwnerResp{} func (m *TransferGroupOwnerResp) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerResp) ProtoMessage() {} func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{11} + return fileDescriptor_group_97564bfcd2811fbb, []int{11} } func (m *TransferGroupOwnerResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransferGroupOwnerResp.Unmarshal(m, b) @@ -551,7 +551,7 @@ func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} } func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) } func (*JoinGroupReq) ProtoMessage() {} func (*JoinGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{12} + return fileDescriptor_group_97564bfcd2811fbb, []int{12} } func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b) @@ -609,7 +609,7 @@ func (m *JoinGroupResp) Reset() { *m = JoinGroupResp{} } func (m *JoinGroupResp) String() string { return proto.CompactTextString(m) } func (*JoinGroupResp) ProtoMessage() {} func (*JoinGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{13} + return fileDescriptor_group_97564bfcd2811fbb, []int{13} } func (m *JoinGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupResp.Unmarshal(m, b) @@ -643,7 +643,7 @@ func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationRes func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseReq) ProtoMessage() {} func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{14} + return fileDescriptor_group_97564bfcd2811fbb, []int{14} } func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b) @@ -701,7 +701,7 @@ func (m *GroupApplicationResponseResp) Reset() { *m = GroupApplicationRe func (m *GroupApplicationResponseResp) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseResp) ProtoMessage() {} func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{15} + return fileDescriptor_group_97564bfcd2811fbb, []int{15} } func (m *GroupApplicationResponseResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationResponseResp.Unmarshal(m, b) @@ -732,7 +732,7 @@ func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} } func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) } func (*QuitGroupReq) ProtoMessage() {} func (*QuitGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{16} + return fileDescriptor_group_97564bfcd2811fbb, []int{16} } func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b) @@ -769,7 +769,7 @@ func (m *QuitGroupResp) Reset() { *m = QuitGroupResp{} } func (m *QuitGroupResp) String() string { return proto.CompactTextString(m) } func (*QuitGroupResp) ProtoMessage() {} func (*QuitGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{17} + return fileDescriptor_group_97564bfcd2811fbb, []int{17} } func (m *QuitGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuitGroupResp.Unmarshal(m, b) @@ -790,9 +790,9 @@ func (m *QuitGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_QuitGroupResp proto.InternalMessageInfo type GetGroupMemberListReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - Filter int32 `protobuf:"varint,2,opt,name=filter" json:"filter,omitempty"` - Pagination *sdk_ws.RequestPagination `protobuf:"bytes,4,opt,name=pagination" json:"pagination,omitempty"` + Pagination *sdk_ws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` + GroupID string `protobuf:"bytes,2,opt,name=groupID" json:"groupID,omitempty"` + Filter int32 `protobuf:"varint,3,opt,name=filter" json:"filter,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -802,7 +802,7 @@ func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} } func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListReq) ProtoMessage() {} func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{18} + return fileDescriptor_group_97564bfcd2811fbb, []int{18} } func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b) @@ -822,6 +822,13 @@ func (m *GetGroupMemberListReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupMemberListReq proto.InternalMessageInfo +func (m *GetGroupMemberListReq) GetPagination() *sdk_ws.RequestPagination { + if m != nil { + return m.Pagination + } + return nil +} + func (m *GetGroupMemberListReq) GetGroupID() string { if m != nil { return m.GroupID @@ -836,15 +843,8 @@ func (m *GetGroupMemberListReq) GetFilter() int32 { return 0 } -func (m *GetGroupMemberListReq) GetPagination() *sdk_ws.RequestPagination { - if m != nil { - return m.Pagination - } - return nil -} - type GetGroupMemberListResp struct { - Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` + Total uint32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` Members []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,2,rep,name=members" json:"members,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -855,7 +855,7 @@ func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{} func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListResp) ProtoMessage() {} func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{19} + return fileDescriptor_group_97564bfcd2811fbb, []int{19} } func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b) @@ -875,7 +875,7 @@ func (m *GetGroupMemberListResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupMemberListResp proto.InternalMessageInfo -func (m *GetGroupMemberListResp) GetTotal() int32 { +func (m *GetGroupMemberListResp) GetTotal() uint32 { if m != nil { return m.Total } @@ -901,7 +901,7 @@ func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{} func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoReq) ProtoMessage() {} func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{20} + return fileDescriptor_group_97564bfcd2811fbb, []int{20} } func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b) @@ -946,7 +946,7 @@ func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoResp) ProtoMessage() {} func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{21} + return fileDescriptor_group_97564bfcd2811fbb, []int{21} } func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b) @@ -986,7 +986,7 @@ func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} } func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberReq) ProtoMessage() {} func (*KickGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{22} + return fileDescriptor_group_97564bfcd2811fbb, []int{22} } func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b) @@ -1037,7 +1037,7 @@ func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} } func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberResp) ProtoMessage() {} func (*KickGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{23} + return fileDescriptor_group_97564bfcd2811fbb, []int{23} } func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b) @@ -1058,8 +1058,8 @@ func (m *KickGroupMemberResp) XXX_DiscardUnknown() { var xxx_messageInfo_KickGroupMemberResp proto.InternalMessageInfo type GetJoinedGroupListReq struct { - FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` - Pagination *sdk_ws.RequestPagination `protobuf:"bytes,2,opt,name=pagination" json:"pagination,omitempty"` + Pagination *sdk_ws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` + FromUserID string `protobuf:"bytes,2,opt,name=fromUserID" json:"fromUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1069,7 +1069,7 @@ func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} } func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListReq) ProtoMessage() {} func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{24} + return fileDescriptor_group_97564bfcd2811fbb, []int{24} } func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b) @@ -1089,13 +1089,6 @@ func (m *GetJoinedGroupListReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetJoinedGroupListReq proto.InternalMessageInfo -func (m *GetJoinedGroupListReq) GetFromUserID() string { - if m != nil { - return m.FromUserID - } - return "" -} - func (m *GetJoinedGroupListReq) GetPagination() *sdk_ws.RequestPagination { if m != nil { return m.Pagination @@ -1103,8 +1096,15 @@ func (m *GetJoinedGroupListReq) GetPagination() *sdk_ws.RequestPagination { return nil } +func (m *GetJoinedGroupListReq) GetFromUserID() string { + if m != nil { + return m.FromUserID + } + return "" +} + type GetJoinedGroupListResp struct { - Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` + Total uint32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` Groups []*sdk_ws.GroupInfo `protobuf:"bytes,2,rep,name=groups" json:"groups,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1115,7 +1115,7 @@ func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{} func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListResp) ProtoMessage() {} func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{25} + return fileDescriptor_group_97564bfcd2811fbb, []int{25} } func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b) @@ -1135,7 +1135,7 @@ func (m *GetJoinedGroupListResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetJoinedGroupListResp proto.InternalMessageInfo -func (m *GetJoinedGroupListResp) GetTotal() int32 { +func (m *GetJoinedGroupListResp) GetTotal() uint32 { if m != nil { return m.Total } @@ -1162,7 +1162,7 @@ func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} } func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupReq) ProtoMessage() {} func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{26} + return fileDescriptor_group_97564bfcd2811fbb, []int{26} } func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b) @@ -1213,7 +1213,7 @@ func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} } func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupResp) ProtoMessage() {} func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{27} + return fileDescriptor_group_97564bfcd2811fbb, []int{27} } func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b) @@ -1234,8 +1234,8 @@ func (m *InviteUserToGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_InviteUserToGroupResp proto.InternalMessageInfo type GetGroupAllMemberReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - Pagination *sdk_ws.RequestPagination `protobuf:"bytes,2,opt,name=pagination" json:"pagination,omitempty"` + Pagination *sdk_ws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` + GroupID string `protobuf:"bytes,2,opt,name=groupID" json:"groupID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1245,7 +1245,7 @@ func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} } func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberReq) ProtoMessage() {} func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{28} + return fileDescriptor_group_97564bfcd2811fbb, []int{28} } func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b) @@ -1265,13 +1265,6 @@ func (m *GetGroupAllMemberReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupAllMemberReq proto.InternalMessageInfo -func (m *GetGroupAllMemberReq) GetGroupID() string { - if m != nil { - return m.GroupID - } - return "" -} - func (m *GetGroupAllMemberReq) GetPagination() *sdk_ws.RequestPagination { if m != nil { return m.Pagination @@ -1279,6 +1272,13 @@ func (m *GetGroupAllMemberReq) GetPagination() *sdk_ws.RequestPagination { return nil } +func (m *GetGroupAllMemberReq) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + type GetGroupAllMemberResp struct { Members []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members" json:"members,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1290,7 +1290,7 @@ func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} } func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberResp) ProtoMessage() {} func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{29} + return fileDescriptor_group_97564bfcd2811fbb, []int{29} } func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b) @@ -1330,7 +1330,7 @@ func (m *CMSGroup) Reset() { *m = CMSGroup{} } func (m *CMSGroup) String() string { return proto.CompactTextString(m) } func (*CMSGroup) ProtoMessage() {} func (*CMSGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{30} + return fileDescriptor_group_97564bfcd2811fbb, []int{30} } func (m *CMSGroup) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CMSGroup.Unmarshal(m, b) @@ -1384,7 +1384,7 @@ func (m *GetGroupsReq) Reset() { *m = GetGroupsReq{} } func (m *GetGroupsReq) String() string { return proto.CompactTextString(m) } func (*GetGroupsReq) ProtoMessage() {} func (*GetGroupsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{31} + return fileDescriptor_group_97564bfcd2811fbb, []int{31} } func (m *GetGroupsReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsReq.Unmarshal(m, b) @@ -1426,8 +1426,8 @@ func (m *GetGroupsReq) GetGroupID() string { } type GetGroupsResp struct { - Groups []*CMSGroup `protobuf:"bytes,1,rep,name=groups" json:"groups,omitempty"` - GroupNum int32 `protobuf:"varint,2,opt,name=GroupNum" json:"GroupNum,omitempty"` + Total uint32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` + Groups []*CMSGroup `protobuf:"bytes,2,rep,name=groups" json:"groups,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1437,7 +1437,7 @@ func (m *GetGroupsResp) Reset() { *m = GetGroupsResp{} } func (m *GetGroupsResp) String() string { return proto.CompactTextString(m) } func (*GetGroupsResp) ProtoMessage() {} func (*GetGroupsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{32} + return fileDescriptor_group_97564bfcd2811fbb, []int{32} } func (m *GetGroupsResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsResp.Unmarshal(m, b) @@ -1457,6 +1457,13 @@ func (m *GetGroupsResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupsResp proto.InternalMessageInfo +func (m *GetGroupsResp) GetTotal() uint32 { + if m != nil { + return m.Total + } + return 0 +} + func (m *GetGroupsResp) GetGroups() []*CMSGroup { if m != nil { return m.Groups @@ -1464,13 +1471,6 @@ func (m *GetGroupsResp) GetGroups() []*CMSGroup { return nil } -func (m *GetGroupsResp) GetGroupNum() int32 { - if m != nil { - return m.GroupNum - } - return 0 -} - type GetGroupMemberReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1482,7 +1482,7 @@ func (m *GetGroupMemberReq) Reset() { *m = GetGroupMemberReq{} } func (m *GetGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberReq) ProtoMessage() {} func (*GetGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{33} + return fileDescriptor_group_97564bfcd2811fbb, []int{33} } func (m *GetGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberReq.Unmarshal(m, b) @@ -1510,9 +1510,9 @@ func (m *GetGroupMemberReq) GetGroupID() string { } type GetGroupMembersCMSReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - UserName string `protobuf:"bytes,2,opt,name=userName" json:"userName,omitempty"` - Pagination *sdk_ws.RequestPagination `protobuf:"bytes,3,opt,name=pagination" json:"pagination,omitempty"` + Pagination *sdk_ws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` + GroupID string `protobuf:"bytes,2,opt,name=groupID" json:"groupID,omitempty"` + UserName string `protobuf:"bytes,3,opt,name=userName" json:"userName,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1522,7 +1522,7 @@ func (m *GetGroupMembersCMSReq) Reset() { *m = GetGroupMembersCMSReq{} } func (m *GetGroupMembersCMSReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersCMSReq) ProtoMessage() {} func (*GetGroupMembersCMSReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{34} + return fileDescriptor_group_97564bfcd2811fbb, []int{34} } func (m *GetGroupMembersCMSReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersCMSReq.Unmarshal(m, b) @@ -1542,6 +1542,13 @@ func (m *GetGroupMembersCMSReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupMembersCMSReq proto.InternalMessageInfo +func (m *GetGroupMembersCMSReq) GetPagination() *sdk_ws.RequestPagination { + if m != nil { + return m.Pagination + } + return nil +} + func (m *GetGroupMembersCMSReq) GetGroupID() string { if m != nil { return m.GroupID @@ -1556,16 +1563,9 @@ func (m *GetGroupMembersCMSReq) GetUserName() string { return "" } -func (m *GetGroupMembersCMSReq) GetPagination() *sdk_ws.RequestPagination { - if m != nil { - return m.Pagination - } - return nil -} - type GetGroupMembersCMSResp struct { - Members []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members" json:"members,omitempty"` - MemberNums int32 `protobuf:"varint,2,opt,name=memberNums" json:"memberNums,omitempty"` + Total uint32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` + Members []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,2,rep,name=members" json:"members,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1575,7 +1575,7 @@ func (m *GetGroupMembersCMSResp) Reset() { *m = GetGroupMembersCMSResp{} func (m *GetGroupMembersCMSResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersCMSResp) ProtoMessage() {} func (*GetGroupMembersCMSResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{35} + return fileDescriptor_group_97564bfcd2811fbb, []int{35} } func (m *GetGroupMembersCMSResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersCMSResp.Unmarshal(m, b) @@ -1595,6 +1595,13 @@ func (m *GetGroupMembersCMSResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupMembersCMSResp proto.InternalMessageInfo +func (m *GetGroupMembersCMSResp) GetTotal() uint32 { + if m != nil { + return m.Total + } + return 0 +} + func (m *GetGroupMembersCMSResp) GetMembers() []*sdk_ws.GroupMemberFullInfo { if m != nil { return m.Members @@ -1602,13 +1609,6 @@ func (m *GetGroupMembersCMSResp) GetMembers() []*sdk_ws.GroupMemberFullInfo { return nil } -func (m *GetGroupMembersCMSResp) GetMemberNums() int32 { - if m != nil { - return m.MemberNums - } - return 0 -} - type DismissGroupReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1620,7 +1620,7 @@ func (m *DismissGroupReq) Reset() { *m = DismissGroupReq{} } func (m *DismissGroupReq) String() string { return proto.CompactTextString(m) } func (*DismissGroupReq) ProtoMessage() {} func (*DismissGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{36} + return fileDescriptor_group_97564bfcd2811fbb, []int{36} } func (m *DismissGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DismissGroupReq.Unmarshal(m, b) @@ -1657,7 +1657,7 @@ func (m *DismissGroupResp) Reset() { *m = DismissGroupResp{} } func (m *DismissGroupResp) String() string { return proto.CompactTextString(m) } func (*DismissGroupResp) ProtoMessage() {} func (*DismissGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{37} + return fileDescriptor_group_97564bfcd2811fbb, []int{37} } func (m *DismissGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DismissGroupResp.Unmarshal(m, b) @@ -1690,7 +1690,7 @@ func (m *MuteGroupMemberReq) Reset() { *m = MuteGroupMemberReq{} } func (m *MuteGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*MuteGroupMemberReq) ProtoMessage() {} func (*MuteGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{38} + return fileDescriptor_group_97564bfcd2811fbb, []int{38} } func (m *MuteGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MuteGroupMemberReq.Unmarshal(m, b) @@ -1741,7 +1741,7 @@ func (m *MuteGroupMemberResp) Reset() { *m = MuteGroupMemberResp{} } func (m *MuteGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*MuteGroupMemberResp) ProtoMessage() {} func (*MuteGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{39} + return fileDescriptor_group_97564bfcd2811fbb, []int{39} } func (m *MuteGroupMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MuteGroupMemberResp.Unmarshal(m, b) @@ -1773,7 +1773,7 @@ func (m *CancelMuteGroupMemberReq) Reset() { *m = CancelMuteGroupMemberR func (m *CancelMuteGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*CancelMuteGroupMemberReq) ProtoMessage() {} func (*CancelMuteGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{40} + return fileDescriptor_group_97564bfcd2811fbb, []int{40} } func (m *CancelMuteGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CancelMuteGroupMemberReq.Unmarshal(m, b) @@ -1817,7 +1817,7 @@ func (m *CancelMuteGroupMemberResp) Reset() { *m = CancelMuteGroupMember func (m *CancelMuteGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*CancelMuteGroupMemberResp) ProtoMessage() {} func (*CancelMuteGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{41} + return fileDescriptor_group_97564bfcd2811fbb, []int{41} } func (m *CancelMuteGroupMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CancelMuteGroupMemberResp.Unmarshal(m, b) @@ -1848,7 +1848,7 @@ func (m *MuteGroupReq) Reset() { *m = MuteGroupReq{} } func (m *MuteGroupReq) String() string { return proto.CompactTextString(m) } func (*MuteGroupReq) ProtoMessage() {} func (*MuteGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{42} + return fileDescriptor_group_97564bfcd2811fbb, []int{42} } func (m *MuteGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MuteGroupReq.Unmarshal(m, b) @@ -1885,7 +1885,7 @@ func (m *MuteGroupResp) Reset() { *m = MuteGroupResp{} } func (m *MuteGroupResp) String() string { return proto.CompactTextString(m) } func (*MuteGroupResp) ProtoMessage() {} func (*MuteGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{43} + return fileDescriptor_group_97564bfcd2811fbb, []int{43} } func (m *MuteGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MuteGroupResp.Unmarshal(m, b) @@ -1916,7 +1916,7 @@ func (m *CancelMuteGroupReq) Reset() { *m = CancelMuteGroupReq{} } func (m *CancelMuteGroupReq) String() string { return proto.CompactTextString(m) } func (*CancelMuteGroupReq) ProtoMessage() {} func (*CancelMuteGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{44} + return fileDescriptor_group_97564bfcd2811fbb, []int{44} } func (m *CancelMuteGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CancelMuteGroupReq.Unmarshal(m, b) @@ -1953,7 +1953,7 @@ func (m *CancelMuteGroupResp) Reset() { *m = CancelMuteGroupResp{} } func (m *CancelMuteGroupResp) String() string { return proto.CompactTextString(m) } func (*CancelMuteGroupResp) ProtoMessage() {} func (*CancelMuteGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{45} + return fileDescriptor_group_97564bfcd2811fbb, []int{45} } func (m *CancelMuteGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CancelMuteGroupResp.Unmarshal(m, b) @@ -1986,7 +1986,7 @@ func (m *SetGroupMemberNicknameReq) Reset() { *m = SetGroupMemberNicknam func (m *SetGroupMemberNicknameReq) String() string { return proto.CompactTextString(m) } func (*SetGroupMemberNicknameReq) ProtoMessage() {} func (*SetGroupMemberNicknameReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{46} + return fileDescriptor_group_97564bfcd2811fbb, []int{46} } func (m *SetGroupMemberNicknameReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupMemberNicknameReq.Unmarshal(m, b) @@ -2037,7 +2037,7 @@ func (m *SetGroupMemberNicknameResp) Reset() { *m = SetGroupMemberNickna func (m *SetGroupMemberNicknameResp) String() string { return proto.CompactTextString(m) } func (*SetGroupMemberNicknameResp) ProtoMessage() {} func (*SetGroupMemberNicknameResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{47} + return fileDescriptor_group_97564bfcd2811fbb, []int{47} } func (m *SetGroupMemberNicknameResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupMemberNicknameResp.Unmarshal(m, b) @@ -2058,18 +2058,17 @@ func (m *SetGroupMemberNicknameResp) XXX_DiscardUnknown() { var xxx_messageInfo_SetGroupMemberNicknameResp proto.InternalMessageInfo type GetJoinedSuperGroupListReq struct { - Pagination *sdk_ws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` - UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetJoinedSuperGroupListReq) Reset() { *m = GetJoinedSuperGroupListReq{} } func (m *GetJoinedSuperGroupListReq) String() string { return proto.CompactTextString(m) } func (*GetJoinedSuperGroupListReq) ProtoMessage() {} func (*GetJoinedSuperGroupListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{48} + return fileDescriptor_group_97564bfcd2811fbb, []int{48} } func (m *GetJoinedSuperGroupListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedSuperGroupListReq.Unmarshal(m, b) @@ -2089,13 +2088,6 @@ func (m *GetJoinedSuperGroupListReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetJoinedSuperGroupListReq proto.InternalMessageInfo -func (m *GetJoinedSuperGroupListReq) GetPagination() *sdk_ws.RequestPagination { - if m != nil { - return m.Pagination - } - return nil -} - func (m *GetJoinedSuperGroupListReq) GetUserID() string { if m != nil { return m.UserID @@ -2104,8 +2096,7 @@ func (m *GetJoinedSuperGroupListReq) GetUserID() string { } type GetJoinedSuperGroupListResp struct { - Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` - Groups []*sdk_ws.GroupInfo `protobuf:"bytes,2,rep,name=groups" json:"groups,omitempty"` + Groups []*sdk_ws.GroupInfo `protobuf:"bytes,1,rep,name=groups" json:"groups,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2115,7 +2106,7 @@ func (m *GetJoinedSuperGroupListResp) Reset() { *m = GetJoinedSuperGroup func (m *GetJoinedSuperGroupListResp) String() string { return proto.CompactTextString(m) } func (*GetJoinedSuperGroupListResp) ProtoMessage() {} func (*GetJoinedSuperGroupListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{49} + return fileDescriptor_group_97564bfcd2811fbb, []int{49} } func (m *GetJoinedSuperGroupListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedSuperGroupListResp.Unmarshal(m, b) @@ -2135,13 +2126,6 @@ func (m *GetJoinedSuperGroupListResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetJoinedSuperGroupListResp proto.InternalMessageInfo -func (m *GetJoinedSuperGroupListResp) GetTotal() int32 { - if m != nil { - return m.Total - } - return 0 -} - func (m *GetJoinedSuperGroupListResp) GetGroups() []*sdk_ws.GroupInfo { if m != nil { return m.Groups @@ -2160,7 +2144,7 @@ func (m *GetSuperGroupsInfoReq) Reset() { *m = GetSuperGroupsInfoReq{} } func (m *GetSuperGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetSuperGroupsInfoReq) ProtoMessage() {} func (*GetSuperGroupsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{50} + return fileDescriptor_group_97564bfcd2811fbb, []int{50} } func (m *GetSuperGroupsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSuperGroupsInfoReq.Unmarshal(m, b) @@ -2198,7 +2182,7 @@ func (m *GetSuperGroupsInfoResp) Reset() { *m = GetSuperGroupsInfoResp{} func (m *GetSuperGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (*GetSuperGroupsInfoResp) ProtoMessage() {} func (*GetSuperGroupsInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{51} + return fileDescriptor_group_97564bfcd2811fbb, []int{51} } func (m *GetSuperGroupsInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSuperGroupsInfoResp.Unmarshal(m, b) @@ -2241,7 +2225,7 @@ func (m *SetGroupMemberInfoReq) Reset() { *m = SetGroupMemberInfoReq{} } func (m *SetGroupMemberInfoReq) String() string { return proto.CompactTextString(m) } func (*SetGroupMemberInfoReq) ProtoMessage() {} func (*SetGroupMemberInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{52} + return fileDescriptor_group_97564bfcd2811fbb, []int{52} } func (m *SetGroupMemberInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupMemberInfoReq.Unmarshal(m, b) @@ -2313,7 +2297,7 @@ func (m *SetGroupMemberInfoResp) Reset() { *m = SetGroupMemberInfoResp{} func (m *SetGroupMemberInfoResp) String() string { return proto.CompactTextString(m) } func (*SetGroupMemberInfoResp) ProtoMessage() {} func (*SetGroupMemberInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{53} + return fileDescriptor_group_97564bfcd2811fbb, []int{53} } func (m *SetGroupMemberInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupMemberInfoResp.Unmarshal(m, b) @@ -2344,7 +2328,7 @@ func (m *GetGroupAbstractInfoReq) Reset() { *m = GetGroupAbstractInfoReq func (m *GetGroupAbstractInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupAbstractInfoReq) ProtoMessage() {} func (*GetGroupAbstractInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{54} + return fileDescriptor_group_97564bfcd2811fbb, []int{54} } func (m *GetGroupAbstractInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAbstractInfoReq.Unmarshal(m, b) @@ -2373,7 +2357,7 @@ func (m *GetGroupAbstractInfoReq) GetGroupIDs() []string { type GroupAbstractInfo struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - GroupMemberNumber int32 `protobuf:"varint,2,opt,name=groupMemberNumber" json:"groupMemberNumber,omitempty"` + GroupMemberNumber uint32 `protobuf:"varint,2,opt,name=groupMemberNumber" json:"groupMemberNumber,omitempty"` GroupMemberListHash uint64 `protobuf:"varint,3,opt,name=groupMemberListHash" json:"groupMemberListHash,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2384,7 +2368,7 @@ func (m *GroupAbstractInfo) Reset() { *m = GroupAbstractInfo{} } func (m *GroupAbstractInfo) String() string { return proto.CompactTextString(m) } func (*GroupAbstractInfo) ProtoMessage() {} func (*GroupAbstractInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{55} + return fileDescriptor_group_97564bfcd2811fbb, []int{55} } func (m *GroupAbstractInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupAbstractInfo.Unmarshal(m, b) @@ -2411,7 +2395,7 @@ func (m *GroupAbstractInfo) GetGroupID() string { return "" } -func (m *GroupAbstractInfo) GetGroupMemberNumber() int32 { +func (m *GroupAbstractInfo) GetGroupMemberNumber() uint32 { if m != nil { return m.GroupMemberNumber } @@ -2436,7 +2420,7 @@ func (m *GetGroupAbstractInfoResp) Reset() { *m = GetGroupAbstractInfoRe func (m *GetGroupAbstractInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupAbstractInfoResp) ProtoMessage() {} func (*GetGroupAbstractInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{56} + return fileDescriptor_group_97564bfcd2811fbb, []int{56} } func (m *GetGroupAbstractInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAbstractInfoResp.Unmarshal(m, b) @@ -2475,7 +2459,7 @@ func (m *GetUserInGroupMembersReq) Reset() { *m = GetUserInGroupMembersR func (m *GetUserInGroupMembersReq) String() string { return proto.CompactTextString(m) } func (*GetUserInGroupMembersReq) ProtoMessage() {} func (*GetUserInGroupMembersReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{57} + return fileDescriptor_group_97564bfcd2811fbb, []int{57} } func (m *GetUserInGroupMembersReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInGroupMembersReq.Unmarshal(m, b) @@ -2520,7 +2504,7 @@ func (m *GetUserInGroupMembersResp) Reset() { *m = GetUserInGroupMembers func (m *GetUserInGroupMembersResp) String() string { return proto.CompactTextString(m) } func (*GetUserInGroupMembersResp) ProtoMessage() {} func (*GetUserInGroupMembersResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_d88c7f5350508ce3, []int{58} + return fileDescriptor_group_97564bfcd2811fbb, []int{58} } func (m *GetUserInGroupMembersResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInGroupMembersResp.Unmarshal(m, b) @@ -3158,7 +3142,7 @@ func _Group_GetGroupMemberList_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/group.group/FindGroupMemberAll", + FullMethod: "/group.group/GetGroupMemberList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GroupServer).GetGroupMemberList(ctx, req.(*GetGroupMemberListReq)) @@ -3212,7 +3196,7 @@ func _Group_GetJoinedGroupList_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/group.group/FindJoinedGroup", + FullMethod: "/group.group/GetJoinedGroupList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GroupServer).GetJoinedGroupList(ctx, req.(*GetJoinedGroupListReq)) @@ -3589,123 +3573,121 @@ var _Group_serviceDesc = grpc.ServiceDesc{ Metadata: "group/group.proto", } -func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_d88c7f5350508ce3) } +func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_97564bfcd2811fbb) } -var fileDescriptor_group_d88c7f5350508ce3 = []byte{ - // 1835 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x5f, 0x53, 0xdc, 0xc8, - 0x11, 0x2f, 0x2d, 0x06, 0x9b, 0x36, 0x1c, 0x30, 0xb0, 0x20, 0x04, 0x06, 0x6e, 0x8e, 0xba, 0x50, - 0xc9, 0x79, 0x49, 0xd9, 0xc9, 0x55, 0xfe, 0x5c, 0xd5, 0xc5, 0x86, 0x18, 0x93, 0xb0, 0x10, 0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, 0xfd, 0x12, 0x66, - 0x5d, 0x11, 0xb0, 0xc9, 0xd1, 0xcc, 0xac, 0x71, 0x7b, 0x6f, 0x56, 0x59, 0x46, 0xf0, 0xd9, 0x79, - 0x29, 0xfc, 0x11, 0xd6, 0x0f, 0x48, 0x9c, 0x28, 0x62, 0x93, 0x2b, 0x8d, 0x05, 0x96, 0x61, 0xaa, - 0x97, 0xea, 0x6d, 0x70, 0xbd, 0xc5, 0x57, 0xc1, 0x32, 0xb5, 0xdb, 0x59, 0x06, 0x7f, 0x84, 0x07, - 0x03, 0x4e, 0xff, 0xae, 0xef, 0xfe, 0x27, 0x03, 0xea, 0xa7, 0x91, 0x13, 0xb0, 0x0b, 0x12, 0x71, - 0xbe, 0x93, 0x24, 0xc1, 0x92, 0x5b, 0x9b, 0x70, 0x57, 0x84, 0xba, 0xb8, 0x76, 0xf6, 0x89, 0xbe, - 0x84, 0xcf, 0x42, 0xbf, 0x73, 0xa2, 0x24, 0x67, 0xea, 0xcf, 0x02, 0x35, 0xe1, 0x0b, 0xc8, 0x8d, - 0xca, 0x37, 0x91, 0xf2, 0xe5, 0xa9, 0xd8, 0x84, 0x65, 0x9d, 0x0a, 0x8c, 0xe2, 0xbf, 0x19, 0x30, - 0xf3, 0xab, 0xd0, 0x0b, 0x64, 0x59, 0xaa, 0x56, 0x6a, 0x03, 0x20, 0x22, 0x57, 0x4d, 0xc2, 0x98, - 0xe3, 0x92, 0x2c, 0xc0, 0xfa, 0x94, 0x64, 0xfd, 0x5d, 0xe8, 0x05, 0xad, 0xb0, 0x17, 0xb5, 0x09, - 0x57, 0x64, 0xd2, 0x56, 0x28, 0x68, 0x1b, 0x66, 0xbd, 0xe0, 0xda, 0x8b, 0x0b, 0x05, 0x27, 0x4f, - 0xc4, 0x73, 0x30, 0xab, 0xe8, 0xc3, 0x28, 0xfe, 0xa7, 0x01, 0x6b, 0xc5, 0xa8, 0x4d, 0x16, 0xc2, - 0x80, 0x91, 0xa1, 0x0a, 0x0f, 0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 0x56, 0x3b, 0x66, 0xb2, 0x1e, 0x0c, 0x58, 0x65, 0x14, 0xb5, 0xc1, 0x74, - 0x2b, 0x26, 0x18, 0x08, 0xe7, 0x52, 0x4a, 0x3b, 0x7f, 0xb1, 0xbe, 0x18, 0xca, 0x93, 0xea, 0xed, - 0x96, 0x26, 0x07, 0x52, 0x6f, 0xed, 0x94, 0x43, 0xea, 0x5d, 0x31, 0x72, 0x38, 0x85, 0x45, 0xb7, - 0xdc, 0xcc, 0x23, 0xbd, 0x94, 0x8c, 0xb2, 0x8d, 0x41, 0xcb, 0xbc, 0xc0, 0xcc, 0x5d, 0xe6, 0xfb, - 0x6a, 0xb4, 0x2a, 0x44, 0xca, 0xdd, 0xbd, 0x65, 0x55, 0x2d, 0xc9, 0x2b, 0x17, 0x7a, 0x61, 0xf5, - 0xca, 0xe5, 0x2e, 0x5d, 0xbd, 0xb2, 0xae, 0x89, 0x3e, 0x86, 0x05, 0xaf, 0xd8, 0x86, 0xa2, 0x35, - 0x21, 0xa3, 0x6b, 0x89, 0xad, 0xf5, 0xea, 0xc5, 0x34, 0xa9, 0x65, 0x72, 0xca, 0xa4, 0x56, 0xdb, - 0x2a, 0x99, 0xd4, 0xf9, 0xee, 0xa6, 0xe4, 0xcd, 0x04, 0xd3, 0x57, 0x78, 0x53, 0xf4, 0x20, 0x15, - 0xde, 0x94, 0xcd, 0xc0, 0xb7, 0x30, 0xd3, 0x51, 0xd0, 0xb7, 0xcc, 0xf1, 0x02, 0x7e, 0x97, 0x39, - 0x5e, 0x84, 0xea, 0x89, 0xe3, 0xba, 0x79, 0x4c, 0x2b, 0x1d, 0x57, 0x46, 0xce, 0xd2, 0x71, 0x1a, - 0x18, 0x8c, 0x5e, 0x43, 0xbd, 0xad, 0xc3, 0xc8, 0x68, 0x33, 0xab, 0xa9, 0x15, 0x78, 0xdc, 0xda, - 0x1a, 0xcc, 0x90, 0x5a, 0x5c, 0x6a, 0x29, 0x2d, 0xae, 0x62, 0x66, 0x69, 0xf1, 0x1c, 0x30, 0x4e, - 0x6e, 0x57, 0xd0, 0x49, 0xde, 0xae, 0x8c, 0xbb, 0xe5, 0xed, 0x34, 0x10, 0x5b, 0xd4, 0x42, 0x1d, - 0xba, 0x54, 0x6b, 0x61, 0x05, 0xf2, 0x55, 0x6b, 0x61, 0x25, 0x40, 0x4d, 0xa3, 0xa3, 0x80, 0x0f, - 0xd5, 0xe8, 0x28, 0xe3, 0x4d, 0x35, 0x3a, 0x74, 0xc0, 0xf2, 0x0d, 0x2c, 0x33, 0x2d, 0x58, 0x47, - 0x5b, 0x85, 0x9a, 0x5f, 0x6a, 0x1b, 0xac, 0xcf, 0x87, 0x70, 0xa4, 0x1a, 0xb3, 0x12, 0xa4, 0x92, - 0x1a, 0x6b, 0x31, 0xa9, 0xd4, 0x58, 0x8f, 0xc5, 0xd0, 0x6f, 0x61, 0xc9, 0xd5, 0x80, 0x18, 0x54, - 0xac, 0x3f, 0x05, 0xa0, 0x66, 0x6d, 0x0e, 0x5c, 0x4f, 0xa3, 0x53, 0x8b, 0x33, 0x64, 0x74, 0x56, - 0xa1, 0x1a, 0x19, 0x9d, 0x95, 0x30, 0xe5, 0xe9, 0xe6, 0xeb, 0x07, 0x27, 0x94, 0x04, 0x67, 0x87, - 0x4d, 0xe5, 0x1f, 0x9a, 0x5c, 0xe8, 0xe7, 0xfc, 0xf7, 0x7c, 0x8a, 0x93, 0x1e, 0xff, 0x2f, 0x00, - 0x00, 0xff, 0xff, 0xe8, 0xd2, 0xc8, 0xfe, 0x43, 0x1d, 0x00, 0x00, +var fileDescriptor_group_97564bfcd2811fbb = []byte{ + // 1795 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0xdd, 0x53, 0x14, 0x49, + 0x12, 0x8f, 0x1e, 0x04, 0x21, 0x65, 0x04, 0x0a, 0x06, 0x9a, 0x06, 0x01, 0x4b, 0xc2, 0x23,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0x06, 0x8b, 0xbb, 0xb0, 0x08, 0x47, 0xaa, 0x77, 0x61, 0x09, 0x3a, 0x55, 0xef, 0xc2, + 0x52, 0x28, 0x1a, 0x67, 0x47, 0x06, 0x1f, 0xaa, 0xd9, 0x91, 0xc7, 0x9b, 0x6a, 0x76, 0x14, 0x01, + 0xcb, 0xd7, 0x30, 0xcb, 0x0a, 0x01, 0x35, 0x5a, 0xc9, 0xdc, 0xf9, 0x39, 0x68, 0x6f, 0x5c, 0x1f, + 0xc0, 0x11, 0x5b, 0xcc, 0x72, 0x90, 0x4a, 0x5a, 0x5c, 0x88, 0x49, 0xa5, 0xc5, 0xc5, 0x58, 0x0c, + 0xfd, 0x0f, 0x66, 0xec, 0x02, 0x10, 0x83, 0xb2, 0xf7, 0x4f, 0x06, 0xa8, 0x19, 0xcb, 0x7d, 0xd7, + 0xe3, 0xec, 0x2c, 0xc4, 0x19, 0x32, 0x3b, 0xcb, 0x50, 0x8d, 0xcc, 0xce, 0x52, 0x98, 0xf2, 0x78, + 0xf9, 0xd5, 0xb5, 0x3d, 0x4a, 0xbc, 0xfd, 0xed, 0x86, 0xf2, 0x27, 0x23, 0x17, 0xfa, 0x07, 0xff, + 0x3d, 0x18, 0xe1, 0xa4, 0xbb, 0xbf, 0x05, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x23, 0x51, 0x2e, 0xd7, + 0x1c, 0x00, 0x00, } diff --git a/pkg/proto/group/group.proto b/pkg/proto/group/group.proto index e463419a6..75da6054d 100644 --- a/pkg/proto/group/group.proto +++ b/pkg/proto/group/group.proto @@ -37,17 +37,17 @@ message GetGroupApplicationListReq { string fromUserID = 2; //owner or admin } message GetGroupApplicationListResp { - int32 total = 1; + uint32 total = 1; repeated server_api_params.GroupRequest groupRequests = 2; } message GetUserReqApplicationListReq{ - string userID = 1; - server_api_params.RequestPagination pagination = 2; + server_api_params.RequestPagination pagination = 1; + string userID = 2; } message GetUserReqApplicationListResp{ - int32 total = 1; + uint32 total = 1; repeated server_api_params.GroupRequest groupRequests = 2; } @@ -90,15 +90,14 @@ message QuitGroupResp{ } - message GetGroupMemberListReq { - string groupID = 1; - int32 filter = 2; - server_api_params.RequestPagination pagination = 4; + server_api_params.RequestPagination pagination = 1; + string groupID = 2; + int32 filter = 3; } message GetGroupMemberListResp { - int32 total = 1; + uint32 total = 1; repeated server_api_params.GroupMemberFullInfo members = 2; } @@ -124,11 +123,11 @@ message KickGroupMemberResp { message GetJoinedGroupListReq { - string fromUserID = 1; - server_api_params.RequestPagination pagination = 2; + server_api_params.RequestPagination pagination = 1; + string fromUserID = 2; } message GetJoinedGroupListResp{ - int32 total = 1; + uint32 total = 1; repeated server_api_params.GroupInfo groups = 2; } @@ -144,17 +143,17 @@ message InviteUserToGroupResp { message GetGroupAllMemberReq { - string groupID = 1; - server_api_params.RequestPagination pagination = 2; + server_api_params.RequestPagination pagination = 1; + string groupID = 2; } message GetGroupAllMemberResp { repeated server_api_params.GroupMemberFullInfo members = 1; } message CMSGroup { - server_api_params.GroupInfo groupInfo = 1; - string groupOwnerUserName = 2; - string groupOwnerUserID = 3; + server_api_params.GroupInfo groupInfo = 1; + string groupOwnerUserName = 2; + string groupOwnerUserID = 3; } @@ -165,23 +164,23 @@ message GetGroupsReq { } message GetGroupsResp { - repeated CMSGroup groups = 1; - int32 GroupNum = 2; + uint32 total = 1; + repeated CMSGroup groups = 2; } message GetGroupMemberReq { - string groupID = 1; + string groupID = 1; } message GetGroupMembersCMSReq { - string groupID = 1; - string userName = 2; - server_api_params.RequestPagination pagination = 3; + server_api_params.RequestPagination pagination = 1; + string groupID = 2; + string userName = 3; } message GetGroupMembersCMSResp { - repeated server_api_params.GroupMemberFullInfo members = 1; - int32 memberNums = 2; + uint32 total = 1; + repeated server_api_params.GroupMemberFullInfo members = 2; } message DismissGroupReq{ @@ -240,13 +239,11 @@ message SetGroupMemberNicknameResp{ } message GetJoinedSuperGroupListReq { - server_api_params.RequestPagination pagination = 1; - string userID = 2; + string userID = 1; } message GetJoinedSuperGroupListResp { - int32 total = 1; - repeated server_api_params.GroupInfo groups = 2; + repeated server_api_params.GroupInfo groups = 1; } message GetSuperGroupsInfoReq { @@ -271,12 +268,12 @@ message SetGroupMemberInfoResp{ } message GetGroupAbstractInfoReq{ - repeated string groupIDs = 1; + repeated string groupIDs = 1; } message GroupAbstractInfo{ string groupID = 1; - int32 groupMemberNumber = 2; + uint32 groupMemberNumber = 2; uint64 groupMemberListHash = 3; }