Merge remote-tracking branch 'origin/errcode' into errcode

# Conflicts:
#	go.mod
#	go.sum
This commit is contained in:
skiffer-git
2023-02-07 20:30:55 +08:00
66 changed files with 2565 additions and 1711 deletions
+212 -42
View File
@@ -1,10 +1,14 @@
package cache
import (
"Open_IM/pkg/common/db/table"
"Open_IM/pkg/common/db/relation"
"Open_IM/pkg/common/tracelog"
"Open_IM/pkg/utils"
"context"
"encoding/json"
"github.com/dtm-labs/rockscache"
"github.com/go-redis/redis/v8"
"golang.org/x/tools/go/ssa/testdata/src/strconv"
"time"
)
@@ -26,61 +30,227 @@ func NewConversationRedis(rcClient *rockscache.Client) *ConversationRedis {
return &ConversationRedis{rcClient: rcClient}
}
func (c *ConversationRedis) GetUserConversationIDListFromCache(userID string, fn DBFun) ([]string, error) {
conversationIDListStr, err := c.rcClient.Fetch(conversationIDListCache+userID, time.Second*30*60, fn)
var conversationIDList []string
err = json.Unmarshal([]byte(conversationIDListStr), &conversationIDList)
if err != nil {
return nil, utils.Wrap(err, "")
}
return conversationIDList, nil
func NewConversationCache(rdb redis.UniversalClient, conversationDB *relation.ConversationGorm, options rockscache.Options) *ConversationCache {
return &ConversationCache{conversationDB: conversationDB, expireTime: conversationExpireTime, rcClient: rockscache.NewClient(rdb, options)}
}
func (c *ConversationRedis) DelUserConversationIDListFromCache(userID string) error {
return utils.Wrap(c.rcClient.TagAsDeleted(conversationIDListCache+userID), "DelUserConversationIDListFromCache err")
func (c *ConversationCache) getConversationKey(ownerUserID, conversationID string) string {
return conversationKey + ownerUserID + ":" + conversationID
}
func (c *ConversationRedis) GetConversationFromCache(ownerUserID, conversationID string, fn DBFun) (*table.ConversationModel, error) {
conversationStr, err := c.rcClient.Fetch(conversationCache+ownerUserID+":"+conversationID, time.Second*30*60, fn)
if err != nil {
return nil, utils.Wrap(err, "Fetch failed")
}
conversation := table.ConversationModel{}
err = json.Unmarshal([]byte(conversationStr), &conversation)
if err != nil {
return nil, utils.Wrap(err, "Unmarshal failed")
}
return &conversation, nil
func (c *ConversationCache) getConversationIDsKey(ownerUserID string) string {
return conversationIDsKey + ownerUserID
}
func (c *ConversationRedis) GetConversationsFromCache(ownerUserID string, conversationIDList []string, fn DBFun) ([]*table.ConversationModel, error) {
var conversationList []*table.ConversationModel
for _, conversationID := range conversationIDList {
conversation, err := c.GetConversationFromCache(ownerUserID, conversationID, fn)
func (c *ConversationCache) getRecvMsgOptKey(ownerUserID, conversationID string) string {
return recvMsgOptKey + ownerUserID + ":" + conversationID
}
func (c *ConversationCache) getSuperGroupRecvNotNotifyUserIDsKey(groupID string) string {
return superGroupRecvMsgNotNotifyUserIDsKey + groupID
}
func (c *ConversationCache) 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 {
// return "", err
// }
// bytes, err := json.Marshal(conversationIDs)
// if err != nil {
// return "", utils.Wrap(err, "")
// }
// return string(bytes), nil
//}
//defer func() {
// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationIDs", conversationIDs)
//}()
//conversationIDsStr, err := c.rcClient.Fetch(c.getConversationIDsKey(ownerUserID), time.Second*30*60, getConversationIDs)
//err = json.Unmarshal([]byte(conversationIDsStr), &conversationIDs)
//if err != nil {
// return nil, utils.Wrap(err, "")
//}
//return conversationIDs, nil
return GetCache(c.rcClient, c.getConversationIDsKey(ownerUserID), time.Second*30*60, func() ([]string, error) {
return f(ownerUserID)
})
}
func (c *ConversationCache) GetUserConversationIDs1(ctx context.Context, ownerUserID string) (conversationIDs []string, err error) {
//getConversationIDs := func() (string, error) {
// conversationIDs, err := relation.GetConversationIDsByUserID(ownerUserID)
// if err != nil {
// return "", err
// }
// bytes, err := json.Marshal(conversationIDs)
// if err != nil {
// return "", utils.Wrap(err, "")
// }
// return string(bytes), nil
//}
//defer func() {
// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationIDs", conversationIDs)
//}()
//conversationIDsStr, err := c.rcClient.Fetch(c.getConversationIDsKey(ownerUserID), time.Second*30*60, getConversationIDs)
//err = json.Unmarshal([]byte(conversationIDsStr), &conversationIDs)
//if err != nil {
// return nil, utils.Wrap(err, "")
//}
//return conversationIDs, nil
return GetCache1[[]string](c.rcClient, c.getConversationIDsKey(ownerUserID), time.Second*30*60, fn)
}
func GetCache1[T any](rcClient *rockscache.Client, key string, expire time.Duration, fn func() (any, error)) (T, error) {
v, err := rcClient.Fetch(key, expire, func() (string, error) {
v, err := fn()
if err != nil {
return nil, utils.Wrap(err, "GetConversationFromCache failed")
return "", err
}
conversationList = append(conversationList, conversation)
bs, err := json.Marshal(v)
if err != nil {
return "", utils.Wrap(err, "")
}
return string(bs), nil
})
var t T
if err != nil {
return t, err
}
return conversationList, nil
err = json.Unmarshal([]byte(v), &t)
if err != nil {
return t, utils.Wrap(err, "")
}
return t, nil
}
func (c *ConversationRedis) GetUserAllConversationList(ownerUserID string, fn DBFun) ([]*table.ConversationModel, error) {
IDList, err := c.GetUserConversationIDListFromCache(ownerUserID, fn)
func GetCache[T any](rcClient *rockscache.Client, key string, expire time.Duration, fn func() (T, error)) (T, error) {
v, err := rcClient.Fetch(key, expire, func() (string, error) {
v, err := fn()
if err != nil {
return "", err
}
bs, err := json.Marshal(v)
if err != nil {
return "", utils.Wrap(err, "")
}
return string(bs), nil
})
var t T
if err != nil {
return t, err
}
err = json.Unmarshal([]byte(v), &t)
if err != nil {
return t, utils.Wrap(err, "")
}
return t, nil
}
func (c *ConversationCache) 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) {
getConversation := func() (string, error) {
conversation, err := relation.GetConversation(ownerUserID, conversationID)
if err != nil {
return "", err
}
bytes, err := json.Marshal(conversation)
if err != nil {
return "", utils.Wrap(err, "conversation Marshal failed")
}
return string(bytes), nil
}
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationID", conversationID, "conversation", *conversation)
}()
conversationStr, err := c.rcClient.Fetch(c.getConversationKey(ownerUserID, conversationID), c.expireTime, getConversation)
if err != nil {
return nil, err
}
var conversationList []*table.ConversationModel
for _, conversationID := range IDList {
conversation, err := c.GetConversationFromCache(ownerUserID, conversationID, fn)
if err != nil {
return nil, utils.Wrap(err, "GetConversationFromCache failed")
}
conversationList = append(conversationList, conversation)
}
return conversationList, nil
conversation = &relation2.ConversationModel{}
err = json.Unmarshal([]byte(conversationStr), &conversation)
return conversation, utils.Wrap(err, "Unmarshal failed")
}
func (c *ConversationRedis) DelConversationFromCache(ownerUserID, conversationID string) error {
return utils.Wrap(c.rcClient.TagAsDeleted(conversationCache+ownerUserID+":"+conversationID), "DelConversationFromCache err")
func (c *ConversationCache) 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) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationIDs", conversationIDs, "conversations", conversations)
}()
for _, conversationID := range conversationIDs {
conversation, err := c.GetConversation(ctx, ownerUserID, conversationID)
if err != nil {
return nil, err
}
conversations = append(conversations, *conversation)
}
return conversations, nil
}
func (c *ConversationCache) GetUserAllConversations(ctx context.Context, ownerUserID string) (conversations []relation2.ConversationModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversations", conversations)
}()
IDs, err := c.GetUserConversationIDs(ctx, ownerUserID)
if err != nil {
return nil, err
}
var conversationIDs []relation2.ConversationModel
for _, conversationID := range IDs {
conversation, err := c.GetConversation(ctx, ownerUserID, conversationID)
if err != nil {
return nil, err
}
conversationIDs = append(conversationIDs, *conversation)
}
return conversationIDs, nil
}
func (c *ConversationCache) GetUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string) (opt int, err error) {
getConversation := func() (string, error) {
conversation, err := relation.GetConversation(ownerUserID, conversationID)
if err != nil {
return "", err
}
return strconv.Itoa(int(conversation.RecvMsgOpt)), nil
}
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationID", conversationID, "opt", opt)
}()
optStr, err := c.rcClient.Fetch(c.getConversationKey(ownerUserID, conversationID), c.expireTime, getConversation)
if err != nil {
return 0, err
}
return strconv.Atoi(optStr)
}
func (c *ConversationCache) 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) {
return nil, nil
}
func (c *ConversationCache) DelSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) (err error) {
return nil
}
func (c *ConversationCache) GetSuperGroupRecvMsgNotNotifyUserIDsHash(ctx context.Context, groupID string) (hash uint32, err error) {
return
}
func (c *ConversationCache) DelSuperGroupRecvMsgNotNotifyUserIDsHash(ctx context.Context, groupID string) {
return
}
+13
View File
@@ -0,0 +1,13 @@
package cache
import (
"Open_IM/pkg/common/db/relation"
"github.com/dtm-labs/rockscache"
"time"
)
type ExtendMsgSetCache struct {
friendDB *relation.FriendGorm
expireTime time.Duration
rcClient *rockscache.Client
}
+422 -138
View File
@@ -1,10 +1,13 @@
package controller
import (
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db/cache"
"Open_IM/pkg/common/db/relation"
relation2 "Open_IM/pkg/common/db/table/relation"
unrelation2 "Open_IM/pkg/common/db/table/unrelation"
"Open_IM/pkg/common/db/unrelation"
"Open_IM/pkg/utils"
"context"
"github.com/dtm-labs/rockscache"
_ "github.com/dtm-labs/rockscache"
@@ -14,29 +17,43 @@ import (
)
type GroupInterface interface {
FindGroupsByID(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error)
// group
FindGroup(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error)
SearchGroup(ctx context.Context, name string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error)
TakeGroup(ctx context.Context, groupID string) (group *relation2.GroupModel, err error)
FindJoinedGroup(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error)
UpdateGroup(ctx context.Context, groupID string, data map[string]any) error
DismissGroup(ctx context.Context, groupID string) error // 解散群,并删除群成员
// groupMember
CreateGroup(ctx context.Context, groups []*relation2.GroupModel, groupMember []*relation2.GroupMemberModel) error
DeleteGroupByIDs(ctx context.Context, groupIDs []string) error
TakeGroupByID(ctx context.Context, groupID string) (group *relation2.GroupModel, err error)
TakeGroupMemberByID(ctx context.Context, groupID string, userID string) (groupMember *relation2.GroupModel, err error)
GetJoinedGroupList(ctx context.Context, userID string) ([]*relation2.GroupModel, error)
GetGroupMemberList(ctx context.Context, groupID string) ([]*relation2.GroupMemberModel, error)
GetGroupMemberListByUserID(ctx context.Context, groupID string, userIDs []string) ([]*relation2.GroupMemberModel, error)
GetGroupMemberFilterList(ctx context.Context, groupID string, filter int32, begin int32, maxNumber int32) ([]*relation2.GroupModel, error) // relation.GetGroupMemberByGroupID(req.GroupID, req.Filter, req.NextSeq, 30)
FindGroupMembersByID(ctx context.Context, groupID string, userIDs []string) (groups []*relation2.GroupMemberModel, err error)
DelGroupMember(ctx context.Context, groupID string, userIDs []string) error
GetGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]int, error)
GetGroupOwnerUserID(ctx context.Context, groupIDs []string) (map[string]string, error)
GetGroupRecvApplicationList(ctx context.Context, userID string) ([]*relation2.GroupRequestModel, error)
TakeGroupMember(ctx context.Context, groupID string, userID string) (groupMember *relation2.GroupMemberModel, err error)
FindGroupMember(ctx context.Context, groupID string, userIDs []string) ([]*relation2.GroupMemberModel, error)
FindGroupMemberAll(ctx context.Context, groupID string) ([]*relation2.GroupMemberModel, error)
FindGroupMemberFilterList(ctx context.Context, groupID string, filter int32, begin int32, maxNumber int32) ([]*relation2.GroupMemberModel, error) // relation.GetGroupMemberByGroupID(req.GroupID, req.Filter, req.NextSeq, 30)
SearchGroupMember(ctx context.Context, groupID, name string, pageNumber, showNumber int32) (int32, []*relation2.GroupMemberModel, error)
TakeGroupOwner(ctx context.Context, groupID string) (*relation2.GroupMemberModel, error)
FindGroupOwnerUser(ctx context.Context, groupID []string) ([]*relation2.GroupMemberModel, error)
CreateGroupMember(ctx context.Context, groupMember []*relation2.GroupMemberModel) error
CreateGroupRequest(ctx context.Context, requests []*relation2.GroupRequestModel) 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
MapGroupHash(ctx context.Context, groupIDs []string) (map[string]uint64, error)
MapGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]int, error)
MapGroupOwnerUserID(ctx context.Context, groupIDs []string) (map[string]string, error)
TransferGroupOwner(ctx context.Context, groupID string, oldOwnerUserID, newOwnerUserID string) error // 转让群
UpdateGroupMember(ctx context.Context, groupID, userID string, data map[string]any) error
//mongo
CreateGroupRequest(ctx context.Context, requests []*relation2.GroupRequestModel) error
GetGroupRecvApplicationList(ctx context.Context, userID string) ([]*relation2.GroupRequestModel, error) // ?
TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relation2.GroupRequestModel, error)
FindUserGroupRequest(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupRequestModel, error)
// superGroup
TakeSuperGroup(ctx context.Context, groupID string) (superGroup *unrelation2.SuperGroupModel, err error)
CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error
DelSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error
DeleteSuperGroup(ctx context.Context, groupID string) error
DeleteSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error
AddUserToSuperGroup(ctx context.Context, groupID string, userIDs []string) error
GetSuperGroupByID(ctx context.Context, groupID string) (superGroup *unrelation.SuperGroup, err error)
FindJoinSuperGroup(ctx context.Context, userID string, pageNumber, showNumber int32) (total int32, groupIDs []string, err error)
MapSuperGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]uint32, error)
}
var _ GroupInterface = (*GroupController)(nil)
@@ -45,82 +62,112 @@ type GroupController struct {
database GroupDataBaseInterface
}
func (g *GroupController) TakeGroupMemberByID(ctx context.Context, groupID string, userID string) (groupMember *relation2.GroupModel, err error) {
func (g *GroupController) FindGroup(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) FindGroupMembersByID(ctx context.Context, groupID string, userIDs []string) (groups []*relation2.GroupModel, err error) {
func (g *GroupController) SearchGroup(ctx context.Context, name string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) DelGroupMember(ctx context.Context, groupID string, userIDs []string) error {
func (g *GroupController) TakeGroup(ctx context.Context, groupID string) (group *relation2.GroupModel, err error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) GetGroupRecvApplicationList(ctx context.Context, userID string) ([]*relation2.GroupRequestModel, error) {
/*
var groupRequestList []db.GroupRequest
memberList, err := GetGroupMemberListByUserID(userID)
if err != nil {
return nil, err
}
for _, v := range memberList {
if v.RoleLevel > constant.GroupOrdinaryUsers {
list, err := GetGroupRequestByGroupID(v.GroupID)
if err != nil {
// fmt.Println("111 GetGroupRequestByGroupID failed ", err.Error())
continue
}
// fmt.Println("222 GetGroupRequestByGroupID ok ", list)
groupRequestList = append(groupRequestList, list...)
// fmt.Println("333 GetGroupRequestByGroupID ok ", groupRequestList)
}
}
return groupRequestList, nil
*/
func (g *GroupController) FindJoinedGroup(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) DelSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error {
func (g *GroupController) UpdateGroup(ctx context.Context, groupID string, data map[string]any) error {
//TODO implement me
panic("implement me")
}
func (g *GroupController) GetJoinedGroupList(ctx context.Context, userID string) ([]*relation2.GroupModel, error) {
func (g *GroupController) DismissGroup(ctx context.Context, groupID string) error {
//TODO implement me
panic("implement me")
}
func (g *GroupController) GetGroupMemberList(ctx context.Context, groupID string) ([]*relation2.GroupModel, error) {
func (g *GroupController) CreateGroup(ctx context.Context, groups []*relation2.GroupModel, groupMember []*relation2.GroupMemberModel) error {
//TODO implement me
panic("implement me")
}
func (g *GroupController) GetGroupMemberListByUserID(ctx context.Context, groupID string, userIDs []string) ([]*relation2.GroupModel, error) {
func (g *GroupController) TakeGroupMember(ctx context.Context, groupID string, userID string) (groupMember *relation2.GroupMemberModel, err error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) GetGroupMemberFilterList(ctx context.Context, groupID string, filter int32, begin int32, maxNumber int32) ([]*relation2.GroupModel, error) {
func (g *GroupController) FindGroupMember(ctx context.Context, groupID string, userIDs []string) ([]*relation2.GroupMemberModel, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) GetGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]int, error) {
func (g *GroupController) FindGroupMemberAll(ctx context.Context, groupID string) ([]*relation2.GroupMemberModel, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) GetGroupOwnerUserID(ctx context.Context, groupIDs []string) (map[string]string, error) {
func (g *GroupController) FindGroupMemberFilterList(ctx context.Context, groupID string, filter int32, begin int32, maxNumber int32) ([]*relation2.GroupMemberModel, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) CreateGroupMember(ctx context.Context, groupMember []*relation2.GroupModel) error {
func (g *GroupController) SearchGroupMember(ctx context.Context, groupID, name string, pageNumber, showNumber int32) (int32, []*relation2.GroupMemberModel, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) TakeGroupOwner(ctx context.Context, groupID string) (*relation2.GroupMemberModel, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) FindGroupOwnerUser(ctx context.Context, groupID []string) ([]*relation2.GroupMemberModel, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) CreateGroupMember(ctx context.Context, groupMember []*relation2.GroupMemberModel) error {
//TODO implement me
panic("implement me")
}
func (g *GroupController) HandlerGroupRequest(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32, member *relation2.GroupMemberModel) error {
//TODO implement me
panic("implement me")
}
func (g *GroupController) DeleteGroupMember(ctx context.Context, groupID string, userIDs []string) error {
//TODO implement me
panic("implement me")
}
func (g *GroupController) MapGroupHash(ctx context.Context, groupIDs []string) (map[string]uint64, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) MapGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]int, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) MapGroupOwnerUserID(ctx context.Context, groupIDs []string) (map[string]string, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) TransferGroupOwner(ctx context.Context, groupID string, oldOwnerUserID, newOwnerUserID string) error {
//TODO implement me
panic("implement me")
}
func (g *GroupController) UpdateGroupMember(ctx context.Context, groupID, userID string, data map[string]any) error {
//TODO implement me
panic("implement me")
}
@@ -130,49 +177,98 @@ func (g *GroupController) CreateGroupRequest(ctx context.Context, requests []*re
panic("implement me")
}
func (g *GroupController) GetGroupRecvApplicationList(ctx context.Context, userID string) ([]*relation2.GroupRequestModel, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relation2.GroupRequestModel, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) FindUserGroupRequest(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupRequestModel, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) TakeSuperGroup(ctx context.Context, groupID string) (superGroup *unrelation2.SuperGroupModel, err error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error {
//TODO implement me
panic("implement me")
}
func (g *GroupController) DeleteSuperGroup(ctx context.Context, groupID string) error {
//TODO implement me
panic("implement me")
}
func (g *GroupController) DeleteSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error {
//TODO implement me
panic("implement me")
}
func (g *GroupController) AddUserToSuperGroup(ctx context.Context, groupID string, userIDs []string) error {
//TODO implement me
panic("implement me")
}
func NewGroupController(db *gorm.DB, rdb redis.UniversalClient, mgoClient *mongo.Client) GroupInterface {
groupController := &GroupController{database: newGroupDatabase(db, rdb, mgoClient)}
return groupController
func (g *GroupController) FindJoinSuperGroup(ctx context.Context, userID string, pageNumber, showNumber int32) (total int32, groupIDs []string, err error) {
//TODO implement me
panic("implement me")
}
func (g *GroupController) FindGroupsByID(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error) {
return g.database.FindGroupsByID(ctx, groupIDs)
}
func (g *GroupController) CreateGroup(ctx context.Context, groups []*relation2.GroupModel, groupMember []*relation2.GroupModel) error {
return g.database.CreateGroup(ctx, groups, groupMember)
}
func (g *GroupController) DeleteGroupByIDs(ctx context.Context, groupIDs []string) error {
return g.database.DeleteGroupByIDs(ctx, groupIDs)
}
func (g *GroupController) TakeGroupByID(ctx context.Context, groupID string) (group *relation2.GroupModel, err error) {
return g.database.TakeGroupByID(ctx, groupID)
}
func (g *GroupController) GetSuperGroupByID(ctx context.Context, groupID string) (superGroup *unrelation.SuperGroup, err error) {
return g.database.GetSuperGroupByID(ctx, groupID)
}
func (g *GroupController) CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error {
return g.database.CreateSuperGroup(ctx, groupID, initMemberIDList)
func (g *GroupController) MapSuperGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]uint32, error) {
//TODO implement me
panic("implement me")
}
type GroupDataBaseInterface interface {
FindGroupsByID(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error)
CreateGroup(ctx context.Context, groups []*relation2.GroupModel, groupMember []*relation2.GroupModel) error
DeleteGroupByIDs(ctx context.Context, groupIDs []string) error
TakeGroupByID(ctx context.Context, groupID string) (group *relation2.GroupModel, err error)
GetSuperGroupByID(ctx context.Context, groupID string) (superGroup *unrelation.SuperGroup, err error)
// group
FindGroup(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error)
SearchGroup(ctx context.Context, name string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error)
TakeGroup(ctx context.Context, groupID string) (group *relation2.GroupModel, err error)
FindJoinedGroup(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error)
UpdateGroup(ctx context.Context, groupID string, data map[string]any) error
DismissGroup(ctx context.Context, groupID string) error // 解散群,并删除群成员
// groupMember
CreateGroup(ctx context.Context, groups []*relation2.GroupModel, groupMember []*relation2.GroupMemberModel) error
TakeGroupMember(ctx context.Context, groupID string, userID string) (groupMember *relation2.GroupMemberModel, err error)
FindGroupMember(ctx context.Context, groupID string, userIDs []string) ([]*relation2.GroupMemberModel, error)
FindGroupMemberAll(ctx context.Context, groupID string) ([]*relation2.GroupMemberModel, error)
FindGroupMemberFilterList(ctx context.Context, groupID string, filter int32, begin int32, maxNumber int32) ([]*relation2.GroupMemberModel, error) // relation.GetGroupMemberByGroupID(req.GroupID, req.Filter, req.NextSeq, 30)
SearchGroupMember(ctx context.Context, groupID, name string, pageNumber, showNumber int32) (int32, []*relation2.GroupMemberModel, error)
TakeGroupOwner(ctx context.Context, groupID string) (*relation2.GroupMemberModel, error)
FindGroupOwnerUser(ctx context.Context, groupID []string) ([]*relation2.GroupMemberModel, error)
CreateGroupMember(ctx context.Context, groupMember []*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
MapGroupHash(ctx context.Context, groupIDs []string) (map[string]uint64, error)
MapGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]int, error)
MapGroupOwnerUserID(ctx context.Context, groupIDs []string) (map[string]string, error)
TransferGroupOwner(ctx context.Context, groupID string, oldOwnerUserID, newOwnerUserID string) error // 转让群
UpdateGroupMember(ctx context.Context, groupID, userID string, data map[string]any) error
CreateGroupRequest(ctx context.Context, requests []*relation2.GroupRequestModel) error
GetGroupRecvApplicationList(ctx context.Context, userID string) ([]*relation2.GroupRequestModel, error) // ?
TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relation2.GroupRequestModel, error)
FindUserGroupRequest(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupRequestModel, error)
// superGroup
TakeSuperGroup(ctx context.Context, groupID string) (superGroup *unrelation2.SuperGroupModel, err error)
CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error
DeleteSuperGroup(ctx context.Context, groupID string) error
DeleteSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error
AddUserToSuperGroup(ctx context.Context, groupID string, userIDs []string) error
FindJoinSuperGroup(ctx context.Context, userID string, pageNumber, showNumber int32) (total int32, groupIDs []string, err error)
MapSuperGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]uint32, error)
}
var _ *GroupDataBase = (GroupDataBaseInterface)(nil)
type GroupDataBase struct {
groupDB *relation.GroupGorm
groupMemberDB *relation.GroupMemberGorm
@@ -205,82 +301,270 @@ func newGroupDatabase(db *gorm.DB, rdb redis.UniversalClient, mgoClient *mongo.C
return database
}
func (g *GroupDataBase) FindGroupsByID(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error) {
return g.cache.GetGroupsInfo(ctx, groupIDs)
//func (g *GroupDataBase) FindGroupsByID(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error) {
// return g.cache.GetGroupsInfo(ctx, groupIDs)
//}
//
//func (g *GroupDataBase) CreateGroup(ctx context.Context, groups []*relation2.GroupModel, groupMembers []*relation2.GroupMemberModel) error {
// return g.db.Transaction(func(tx *gorm.DB) error {
// if len(groups) > 0 {
// if err := g.groupDB.Create(ctx, groups, tx); err != nil {
// return err
// }
// }
// if len(groupMembers) > 0 {
// if err := g.groupMemberDB.Create(ctx, groupMembers, tx); err != nil {
// return err
// }
// }
// return nil
// })
//}
//
//func (g *GroupDataBase) DeleteGroupByIDs(ctx context.Context, groupIDs []string) error {
// return g.groupDB.DB.Transaction(func(tx *gorm.DB) error {
// if err := g.groupDB.Delete(ctx, groupIDs, tx); err != nil {
// return err
// }
// if err := g.cache.DelGroupsInfo(ctx, groupIDs); err != nil {
// return err
// }
// return nil
// })
//}
//
//func (g *GroupDataBase) TakeGroupByID(ctx context.Context, groupID string) (group *relation2.GroupModel, err error) {
// return g.cache.GetGroupInfo(ctx, groupID)
//}
//
//func (g *GroupDataBase) Update(ctx context.Context, groups []*relation2.GroupModel) error {
// return g.db.Transaction(func(tx *gorm.DB) error {
// if err := g.groupDB.Update(ctx, groups, tx); err != nil {
// return err
// }
// var groupIDs []string
// for _, group := range groups {
// groupIDs = append(groupIDs, group.GroupID)
// }
// if err := g.cache.DelGroupsInfo(ctx, groupIDs); err != nil {
// return err
// }
// return nil
// })
//}
//
//func (g *GroupDataBase) GetJoinedGroupList(ctx context.Context, userID string) ([]*relation2.GroupModel, error) {
//
// return nil, nil
//}
//
//func (g *GroupDataBase) CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error {
// sess, err := g.mongoDB.MgoClient.StartSession()
// if err != nil {
// return err
// }
// defer sess.EndSession(ctx)
// sCtx := mongo.NewSessionContext(ctx, sess)
// if err = g.mongoDB.CreateSuperGroup(sCtx, groupID, initMemberIDList); err != nil {
// _ = sess.AbortTransaction(ctx)
// return err
// }
//
// if err = g.cache.BatchDelJoinedSuperGroupIDs(ctx, initMemberIDList); err != nil {
// _ = sess.AbortTransaction(ctx)
// return err
// }
// return sess.CommitTransaction(ctx)
//}
//
//func (g *GroupDataBase) GetSuperGroupByID(ctx context.Context, groupID string) (superGroup *unrelation.SuperGroup, err error) {
// return g.mongoDB.GetSuperGroup(ctx, groupID)
//}
func (g *GroupDataBase) FindGroup(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error) {
return g.groupDB.Find(ctx, groupIDs)
}
func (g *GroupDataBase) SearchGroup(ctx context.Context, name string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error) {
return g.groupDB.Search(ctx, name, pageNumber, showNumber)
}
func (g *GroupDataBase) TakeGroup(ctx context.Context, groupID string) (group *relation2.GroupModel, err error) {
return g.groupDB.Take(ctx, groupID)
}
func (g *GroupDataBase) FindJoinedGroup(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error) {
total, members, err := g.groupMemberDB.PageByUser(ctx, userID, pageNumber, showNumber)
if err != nil {
return 0, nil, err
}
if len(members) == 0 {
return total, []*relation2.GroupModel{}, nil
}
groupIDs := utils.Slice(members, func(e *relation2.GroupMemberModel) string {
return e.GroupID
})
groups, err := g.groupDB.Find(ctx, groupIDs)
if err != nil {
return 0, nil, err
}
utils.OrderPtr(groupIDs, &groups, func(e *relation2.GroupModel) string {
return e.GroupID
})
return total, groups, nil
}
func (g *GroupDataBase) UpdateGroup(ctx context.Context, groupID string, data map[string]any) error {
return g.groupDB.UpdateMap(ctx, groupID, data)
}
func (g *GroupDataBase) DismissGroup(ctx context.Context, groupID string) error {
return utils.Wrap(g.db.Transaction(func(tx *gorm.DB) error {
if err := g.groupDB.UpdateStatus(ctx, groupID, constant.GroupStatusDismissed, tx); err != nil {
return err
}
return g.groupMemberDB.DeleteGroup(ctx, []string{groupID}, tx)
}), "")
}
func (g *GroupDataBase) CreateGroup(ctx context.Context, groups []*relation2.GroupModel, groupMembers []*relation2.GroupMemberModel) error {
return g.db.Transaction(func(tx *gorm.DB) error {
if len(groups) > 0 {
if len(groups) > 0 && len(groupMembers) > 0 {
return g.db.Transaction(func(tx *gorm.DB) error {
if err := g.groupDB.Create(ctx, groups, tx); err != nil {
return err
}
}
if len(groupMembers) > 0 {
if err := g.groupMemberDB.Create(ctx, groupMembers, tx); err != nil {
return err
}
}
return nil
})
return g.groupMemberDB.Create(ctx, groupMembers, tx)
})
}
if len(groups) > 0 {
return g.groupDB.Create(ctx, groups)
}
if len(groupMembers) > 0 {
return g.groupMemberDB.Create(ctx, groupMembers)
}
return nil
}
func (g *GroupDataBase) DeleteGroupByIDs(ctx context.Context, groupIDs []string) error {
return g.groupDB.DB.Transaction(func(tx *gorm.DB) error {
if err := g.groupDB.Delete(ctx, groupIDs, tx); err != nil {
return err
}
if err := g.cache.DelGroupsInfo(ctx, groupIDs); err != nil {
return err
}
return nil
})
func (g *GroupDataBase) TakeGroupMember(ctx context.Context, groupID string, userID string) (groupMember *relation2.GroupMemberModel, err error) {
return g.groupMemberDB.Take(ctx, groupID, userID)
}
func (g *GroupDataBase) TakeGroupByID(ctx context.Context, groupID string) (group *relation2.GroupModel, err error) {
return g.cache.GetGroupInfo(ctx, groupID)
func (g *GroupDataBase) FindGroupMember(ctx context.Context, groupID string, userIDs []string) ([]*relation2.GroupMemberModel, error) {
return g.groupMemberDB.FindGroupUser(ctx, []string{groupID}, userIDs, nil)
}
func (g *GroupDataBase) Update(ctx context.Context, groups []*relation2.GroupModel) error {
return g.db.Transaction(func(tx *gorm.DB) error {
if err := g.groupDB.Update(ctx, groups, tx); err != nil {
return err
}
var groupIDs []string
for _, group := range groups {
groupIDs = append(groupIDs, group.GroupID)
}
if err := g.cache.DelGroupsInfo(ctx, groupIDs); err != nil {
return err
}
return nil
})
func (g *GroupDataBase) FindGroupMemberAll(ctx context.Context, groupID string) ([]*relation2.GroupMemberModel, error) {
return g.groupMemberDB.FindGroupUser(ctx, []string{groupID}, nil, nil)
}
func (g *GroupDataBase) GetJoinedGroupList(ctx context.Context, userID string) ([]*relation2.GroupModel, error) {
func (g *GroupDataBase) FindGroupMemberFilterList(ctx context.Context, groupID string, filter int32, begin int32, maxNumber int32) ([]*relation2.GroupMemberModel, error) {
//TODO implement me
panic("implement me")
}
return nil, nil
func (g *GroupDataBase) SearchGroupMember(ctx context.Context, groupID string, name string, pageNumber, showNumber int32) (int32, []*relation2.GroupMemberModel, error) {
return g.groupMemberDB.SearchMember(ctx, groupID, name, pageNumber, showNumber)
}
func (g *GroupDataBase) TakeGroupOwner(ctx context.Context, groupID string) (*relation2.GroupMemberModel, error) {
return g.groupMemberDB.TakeOwner(ctx, groupID)
}
func (g *GroupDataBase) FindGroupOwnerUser(ctx context.Context, groupIDs []string) ([]*relation2.GroupMemberModel, error) {
return g.groupMemberDB.FindGroupUser(ctx, groupIDs, nil, []int32{constant.GroupOwner})
}
func (g *GroupDataBase) CreateGroupMember(ctx context.Context, groupMember []*relation2.GroupMemberModel) error {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) HandlerGroupRequest(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32, member *relation2.GroupMemberModel) error {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) DeleteGroupMember(ctx context.Context, groupID string, userIDs []string) error {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) MapGroupHash(ctx context.Context, groupIDs []string) (map[string]uint64, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) MapGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]int, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) MapGroupOwnerUserID(ctx context.Context, groupIDs []string) (map[string]string, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) TransferGroupOwner(ctx context.Context, groupID string, oldOwnerUserID, newOwnerUserID string) error {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) UpdateGroupMember(ctx context.Context, groupID, userID string, data map[string]any) error {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) CreateGroupRequest(ctx context.Context, requests []*relation2.GroupRequestModel) error {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) GetGroupRecvApplicationList(ctx context.Context, userID string) ([]*relation2.GroupRequestModel, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relation2.GroupRequestModel, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) FindUserGroupRequest(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupRequestModel, error) {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) TakeSuperGroup(ctx context.Context, groupID string) (superGroup *unrelation2.SuperGroupModel, err error) {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error {
sess, err := g.mongoDB.MgoClient.StartSession()
if err != nil {
return err
}
defer sess.EndSession(ctx)
sCtx := mongo.NewSessionContext(ctx, sess)
if err = g.mongoDB.CreateSuperGroup(sCtx, groupID, initMemberIDList); err != nil {
_ = sess.AbortTransaction(ctx)
return err
}
if err = g.cache.BatchDelJoinedSuperGroupIDs(ctx, initMemberIDList); err != nil {
_ = sess.AbortTransaction(ctx)
return err
}
return sess.CommitTransaction(ctx)
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) GetSuperGroupByID(ctx context.Context, groupID string) (superGroup *unrelation.SuperGroup, err error) {
return g.mongoDB.GetSuperGroup(ctx, groupID)
func (g *GroupDataBase) DeleteSuperGroup(ctx context.Context, groupID string) error {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) DeleteSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) AddUserToSuperGroup(ctx context.Context, groupID string, userIDs []string) error {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) FindJoinSuperGroup(ctx context.Context, userID string, pageNumber, showNumber int32) (total int32, groupIDs []string, err error) {
//TODO implement me
panic("implement me")
}
func (g *GroupDataBase) MapSuperGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]uint32, error) {
//TODO implement me
panic("implement me")
}
+24 -4
View File
@@ -1,6 +1,7 @@
package localcache
import (
"Open_IM/pkg/common/constant"
"Open_IM/pkg/proto/group"
"context"
"google.golang.org/grpc"
@@ -27,12 +28,31 @@ func NewGroupMemberIDsLocalCache(rpc *grpc.ClientConn) GroupLocalCache {
}
}
func (g *GroupLocalCache) GetGroupMemberIDs(ctx context.Context, groupID string) []string {
func (g *GroupLocalCache) GetGroupMemberIDs(ctx context.Context, groupID string) ([]string, error) {
g.lock.Lock()
defer g.lock.Unlock()
resp, err := g.group.GetGroupAbstractInfo(ctx, &group.GetGroupAbstractInfoReq{
GroupIDs: nil,
GroupIDs: []string{groupID},
})
if err != nil {
return nil
return nil, err
}
return []string{}
if len(resp.GroupAbstractInfos) < 0 {
return nil, constant.ErrGroupIDNotFound
}
localHashInfo, ok := g.cache[groupID]
if ok && localHashInfo.memberListHash == resp.GroupAbstractInfos[0].GroupMemberListHash {
return localHashInfo.userIDs, nil
}
groupMembersResp, err := g.group.GetGroupMemberList(ctx, &group.GetGroupMemberListReq{
GroupID: groupID,
})
if err != nil {
return nil, err
}
g.cache[groupID] = GroupMemberIDsHash{
memberListHash: resp.GroupAbstractInfos[0].GroupMemberListHash,
userIDs: groupMembersResp.Members,
}
return g.cache[groupID].userIDs, nil
}
+2 -2
View File
@@ -37,7 +37,7 @@ package relation
//
//}
//
//func GetGroupMemberListByUserID(userID string) ([]GroupMember, error) {
//func FindGroupMember(userID string) ([]GroupMember, error) {
// var groupMemberList []GroupMember
// err := DB.DB.MysqlDB.DefaultGormDB().Table("group_members").Where("user_id=?", userID).Find(&groupMemberList).Error
// if err != nil {
@@ -167,7 +167,7 @@ package relation
//}
//
//func GetJoinedGroupIDListByUserID(userID string) ([]string, error) {
// memberList, err := GetGroupMemberListByUserID(userID)
// memberList, err := FindGroupMember(userID)
// if err != nil {
// return nil, err
// }
+38 -212
View File
@@ -31,6 +31,13 @@ func (g *GroupMemberGorm) Delete(ctx context.Context, groupMembers []*relation.G
return utils.Wrap(getDBConn(g.DB, tx).Delete(groupMembers).Error, "")
}
func (g *GroupMemberGorm) DeleteGroup(ctx context.Context, groupIDs []string, tx ...*gorm.DB) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs)
}()
return utils.Wrap(getDBConn(g.DB, tx).Where("group_id in (?)", groupIDs).Delete(&relation.GroupMemberModel{}).Error, "")
}
func (g *GroupMemberGorm) UpdateByMap(ctx context.Context, groupID string, userID string, args map[string]interface{}, tx ...*gorm.DB) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "userID", userID, "args", args)
@@ -54,6 +61,23 @@ func (g *GroupMemberGorm) Find(ctx context.Context, groupMembers []*relation.Gro
return groupList, utils.Wrap(getDBConn(g.DB, tx).Where("(group_id, user_id) in ?", where).Find(&groupList).Error, "")
}
func (g *GroupMemberGorm) FindGroupUser(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, tx ...*gorm.DB) (groupList []*relation.GroupMemberModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs, "userIDs", userIDs, "groupList", groupList)
}()
db := getDBConn(g.DB, tx)
if len(groupList) > 0 {
db = db.Where("group_id in (?)", groupIDs)
}
if len(userIDs) > 0 {
db = db.Where("user_id in (?)", userIDs)
}
if len(roleLevels) > 0 {
db = db.Where("role_level in (?)", roleLevels)
}
return groupList, utils.Wrap(db.Find(&groupList).Error, "")
}
func (g *GroupMemberGorm) Take(ctx context.Context, groupID string, userID string, tx ...*gorm.DB) (groupMember *relation.GroupMemberModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "userID", userID, "groupMember", *groupMember)
@@ -62,7 +86,7 @@ func (g *GroupMemberGorm) Take(ctx context.Context, groupID string, userID strin
return groupMember, utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ? and user_id = ?", groupID, userID).Take(groupMember).Error, "")
}
func (g *GroupMemberGorm) TakeOwnerInfo(ctx context.Context, groupID string, tx ...*gorm.DB) (groupMember *relation.GroupMemberModel, err error) {
func (g *GroupMemberGorm) TakeOwner(ctx context.Context, groupID string, tx ...*gorm.DB) (groupMember *relation.GroupMemberModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "groupMember", *groupMember)
}()
@@ -70,214 +94,16 @@ func (g *GroupMemberGorm) TakeOwnerInfo(ctx context.Context, groupID string, tx
return groupMember, utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ? and role_level = ?", groupID, constant.GroupOwner).Take(groupMember).Error, "")
}
//func InsertIntoGroupMember(toInsertInfo GroupMemberModel) error {
// toInsertInfo.JoinTime = time.Now()
// if toInsertInfo.RoleLevel == 0 {
// toInsertInfo.RoleLevel = constant.GroupOrdinaryUsers
// }
// toInsertInfo.MuteEndTime = time.Unix(int64(time.Now().Second()), 0)
// err := GroupMemberDB.Table("group_members").Create(toInsertInfo).Error
// if err != nil {
// return err
// }
// return nil
//}
//
//func BatchInsertIntoGroupMember(toInsertInfoList []*GroupMemberModel) error {
// for _, toInsertInfo := range toInsertInfoList {
// toInsertInfo.JoinTime = time.Now()
// if toInsertInfo.RoleLevel == 0 {
// toInsertInfo.RoleLevel = constant.GroupOrdinaryUsers
// }
// toInsertInfo.MuteEndTime = time.Unix(int64(time.Now().Second()), 0)
// }
// return GroupMemberDB.Create(toInsertInfoList).Error
//
//}
//
//func GetGroupMemberListByUserID(userID string) ([]GroupMemberModel, error) {
// var groupMemberList []GroupMemberModel
// err := GroupMemberDB.Table("group_members").Where("user_id=?", userID).Find(&groupMemberList).Error
// if err != nil {
// return nil, err
// }
// return groupMemberList, nil
//}
//
//func GetGroupMemberListByGroupID(groupID string) ([]GroupMemberModel, error) {
// var groupMemberList []GroupMemberModel
// err := GroupMemberDB.Table("group_members").Where("group_id=?", groupID).Find(&groupMemberList).Error
// if err != nil {
// return nil, err
// }
// return groupMemberList, nil
//}
//
//func GetGroupMemberIDListByGroupID(groupID string) ([]string, error) {
// var groupMemberIDList []string
// err := GroupMemberDB.Table("group_members").Where("group_id=?", groupID).Pluck("user_id", &groupMemberIDList).Error
// if err != nil {
// return nil, err
// }
// return groupMemberIDList, nil
//}
//
//func GetGroupMemberListByGroupIDAndRoleLevel(groupID string, roleLevel int32) ([]GroupMemberModel, error) {
// var groupMemberList []GroupMemberModel
// err := GroupMemberDB.Table("group_members").Where("group_id=? and role_level=?", groupID, roleLevel).Find(&groupMemberList).Error
// if err != nil {
// return nil, err
// }
// return groupMemberList, nil
//}
//
//func GetGroupMemberInfoByGroupIDAndUserID(groupID, userID string) (*GroupMemberModel, error) {
// var groupMember GroupMemberModel
// err := GroupMemberDB.Table("group_members").Where("group_id=? and user_id=? ", groupID, userID).Limit(1).Take(&groupMember).Error
// if err != nil {
// return nil, err
// }
// return &groupMember, nil
//}
//
//func DeleteGroupMemberByGroupIDAndUserID(groupID, userID string) error {
// return GroupMemberDB.Table("group_members").Where("group_id=? and user_id=? ", groupID, userID).Delete(GroupMemberModel{}).Error
//}
//
//func DeleteGroupMemberByGroupID(groupID string) error {
// return GroupMemberDB.Table("group_members").Where("group_id=? ", groupID).Delete(GroupMemberModel{}).Error
//}
//
//func UpdateGroupMemberInfo(groupMemberInfo GroupMemberModel) error {
// return GroupMemberDB.Table("group_members").Where("group_id=? and user_id=?", groupMemberInfo.GroupID, groupMemberInfo.UserID).Updates(&groupMemberInfo).Error
//}
//
//func UpdateGroupMemberInfoByMap(groupMemberInfo GroupMemberModel, m map[string]interface{}) error {
// return GroupMemberDB.Table("group_members").Where("group_id=? and user_id=?", groupMemberInfo.GroupID, groupMemberInfo.UserID).Updates(m).Error
//}
//
//func GetOwnerManagerByGroupID(groupID string) ([]GroupMemberModel, error) {
// var groupMemberList []GroupMemberModel
// err := GroupMemberDB.Table("group_members").Where("group_id=? and role_level>?", groupID, constant.GroupOrdinaryUsers).Find(&groupMemberList).Error
// if err != nil {
// return nil, err
// }
// return groupMemberList, nil
//}
//
//func GetGroupMemberNumByGroupID(groupID string) (int64, error) {
// var number int64
// err := GroupMemberDB.Table("group_members").Where("group_id=?", groupID).Count(&number).Error
// if err != nil {
// return 0, utils.Wrap(err, "")
// }
// return number, nil
//}
//
//func GetGroupOwnerInfoByGroupID(groupID string) (*GroupMemberModel, error) {
// omList, err := GetOwnerManagerByGroupID(groupID)
// if err != nil {
// return nil, err
// }
// for _, v := range omList {
// if v.RoleLevel == constant.GroupOwner {
// return &v, nil
// }
// }
// return nil, utils.Wrap(constant.ErrGroupNoOwner, "")
//}
//
//func IsExistGroupMember(groupID, userID string) bool {
// var number int64
// err := GroupMemberDB.Table("group_members").Where("group_id = ? and user_id = ?", groupID, userID).Count(&number).Error
// if err != nil {
// return false
// }
// if number != 1 {
// return false
// }
// return true
//}
//
//func CheckIsExistGroupMember(ctx context.Context, groupID, userID string) error {
// var number int64
// err := GroupMemberDB.Table("group_members").Where("group_id = ? and user_id = ?", groupID, userID).Count(&number).Error
// if err != nil {
// return constant.ErrDB.Wrap()
// }
// if number != 1 {
// return constant.ErrData.Wrap()
// }
// return nil
//}
//
//func GetGroupMemberByGroupID(groupID string, filter int32, begin int32, maxNumber int32) ([]GroupMember, error) {
// var memberList []GroupMember
// var err error
// if filter >= 0 {
// memberList, err = GetGroupMemberListByGroupIDAndRoleLevel(groupID, filter) //sorted by join time
// } else {
// memberList, err = GetGroupMemberListByGroupID(groupID)
// }
//
// if err != nil {
// return nil, err
// }
// if begin >= int32(len(memberList)) {
// return nil, nil
// }
//
// var end int32
// if begin+int32(maxNumber) < int32(len(memberList)) {
// end = begin + maxNumber
// } else {
// end = int32(len(memberList))
// }
// return memberList[begin:end], nil
//}
//
//func GetJoinedGroupIDListByUserID(userID string) ([]string, error) {
// memberList, err := GetGroupMemberListByUserID(userID)
// if err != nil {
// return nil, err
// }
// var groupIDList []string
// for _, v := range memberList {
// groupIDList = append(groupIDList, v.GroupID)
// }
// return groupIDList, nil
//}
//
//func IsGroupOwnerAdmin(groupID, UserID string) bool {
// groupMemberList, err := GetOwnerManagerByGroupID(groupID)
// if err != nil {
// return false
// }
// for _, v := range groupMemberList {
// if v.UserID == UserID && v.RoleLevel > constant.GroupOrdinaryUsers {
// return true
// }
// }
// return false
//}
//
//func GetGroupMembersByGroupIdCMS(groupId string, userName string, showNumber, pageNumber int32) ([]GroupMember, error) {
// var groupMembers []GroupMember
// err := GroupMemberDB.Table("group_members").Where("group_id=?", groupId).Where(fmt.Sprintf(" nickname like '%%%s%%' ", userName)).Limit(int(showNumber)).Offset(int(showNumber * (pageNumber - 1))).Find(&groupMembers).Error
// if err != nil {
// return nil, err
// }
// return groupMembers, nil
//}
//
//func GetGroupMembersCount(groupID, userName string) (int64, error) {
// var count int64
// if err := GroupMemberDB.Table("group_members").Where("group_id=?", groupID).Where(fmt.Sprintf(" nickname like '%%%s%%' ", userName)).Count(&count).Error; err != nil {
// return count, err
// }
// return count, nil
//}
//
//func UpdateGroupMemberInfoDefaultZero(groupMemberInfo GroupMember, args map[string]interface{}) error {
// return GroupMemberDB.Model(groupMemberInfo).Updates(args).Error
//}
func (g *GroupMemberGorm) PageByUser(ctx context.Context, userID string, pageNumber, showNumber int32, tx ...*gorm.DB) (total int32, groupList []*relation.GroupMemberModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "total", total, "groupList", groupList)
}()
return gormPage[relation.GroupMemberModel](getDBConn(g.DB, tx).Where("user_id = ?", userID), pageNumber, showNumber)
}
func (g *GroupMemberGorm) SearchMember(ctx context.Context, groupID string, name string, pageNumber, showNumber int32, tx ...*gorm.DB) (total int32, groupList []*relation.GroupMemberModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "name", name, "pageNumber", pageNumber, "showNumber", showNumber, "total", total, "groupList", groupList)
}()
return gormSearch[relation.GroupMemberModel](getDBConn(g.DB, tx).Where("group_id = ?", groupID), "nickname", name, pageNumber, showNumber)
}
+20 -6
View File
@@ -30,20 +30,27 @@ func (g *GroupGorm) Delete(ctx context.Context, groupIDs []string, tx ...*gorm.D
return utils.Wrap(getDBConn(g.DB, tx).Where("group_id in (?)", groupIDs).Delete(&relation.GroupModel{}).Error, "")
}
func (g *GroupGorm) UpdateByMap(ctx context.Context, groupID string, args map[string]interface{}, tx ...*gorm.DB) (err error) {
func (g *GroupGorm) UpdateMap(ctx context.Context, groupID string, args map[string]interface{}, tx ...*gorm.DB) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "args", args)
}()
return utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ?", groupID).Model(g).Updates(args).Error, "")
return utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ?", groupID).Model(&relation.GroupModel{}).Updates(args).Error, "")
}
func (g *GroupGorm) Update(ctx context.Context, groups []*relation.GroupModel, tx ...*gorm.DB) (err error) {
func (g *GroupGorm) UpdateStatus(ctx context.Context, groupID string, status int32, tx ...*gorm.DB) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groups", groups)
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "status", status)
}()
return utils.Wrap(getDBConn(g.DB, tx).Updates(&groups).Error, "")
return utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ?", groupID).Model(&relation.GroupModel{}).Updates(map[string]any{"status": status}).Error, "")
}
//func (g *GroupGorm) Update(ctx context.Context, groups []*relation.GroupModel, tx ...*gorm.DB) (err error) {
// defer func() {
// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groups", groups)
// }()
// return utils.Wrap(getDBConn(g.DB, tx).Updates(&groups).Error, "")
//}
func (g *GroupGorm) Find(ctx context.Context, groupIDs []string, tx ...*gorm.DB) (groups []*relation.GroupModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs, "groups", groups)
@@ -54,7 +61,14 @@ func (g *GroupGorm) Find(ctx context.Context, groupIDs []string, tx ...*gorm.DB)
func (g *GroupGorm) Take(ctx context.Context, groupID string, tx ...*gorm.DB) (group *relation.GroupModel, err error) {
group = &relation.GroupModel{}
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "group", *group)
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "group", group)
}()
return group, utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ?", groupID).Take(group).Error, "")
}
func (g *GroupGorm) Search(ctx context.Context, name string, pageNumber, showNumber int32, tx ...*gorm.DB) (total int32, groups []*relation.GroupModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "name", name, "pageNumber", pageNumber, "showNumber", showNumber, "total", total, "groups", groups)
}()
return gormSearch[relation.GroupModel](getDBConn(g.DB, tx), "name", name, pageNumber, showNumber)
}
@@ -55,7 +55,7 @@ package relation
//received
//func GetRecvGroupApplicationList(userID string) ([]GroupRequest, error) {
// var groupRequestList []GroupRequest
// memberList, err := GetGroupMemberListByUserID(userID)
// memberList, err := FindGroupMember(userID)
// if err != nil {
// return nil, utils.Wrap(err, utils.GetSelfFuncName())
// }
+25
View File
@@ -0,0 +1,25 @@
package relation
import (
"Open_IM/pkg/utils"
"gorm.io/gorm"
)
func gormPage[E any](db *gorm.DB, pageNumber, showNumber int32) (int32, []*E, error) {
var count int64
if err := db.Model(new(E)).Count(&count).Error; err != nil {
return 0, nil, utils.Wrap(err, "")
}
var es []*E
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
}
func gormSearch[E any](db *gorm.DB, field string, value string, pageNumber, showNumber int32) (int32, []*E, error) {
if field != "" && value != "" {
db = db.Where(field+" like ?", "%"+value+"%")
}
return gormPage[E](db, pageNumber, showNumber)
}
+1 -1
View File
@@ -12,7 +12,7 @@ type GroupModel struct {
Notification string `gorm:"column:notification;size:255" json:"notification"`
Introduction string `gorm:"column:introduction;size:255" json:"introduction"`
FaceURL string `gorm:"column:face_url;size:255" json:"faceURL"`
CreateTime time.Time `gorm:"column:create_time;index:create_time"`
CreateTime time.Time `gorm:"column:create_time;index:create_time;autoCreateTime"`
Ex string `gorm:"column:ex" json:"ex;size:1024" json:"ex"`
Status int32 `gorm:"column:status"`
CreatorUserID string `gorm:"column:creator_user_id;size:64"`
@@ -1,6 +1,8 @@
package unrelation
import (
commonPb "Open_IM/pkg/proto/sdk_ws"
"context"
"strconv"
"strings"
)
@@ -51,3 +53,17 @@ func (e *ExtendMsgSet) SplitSourceIDAndGetIndex() int32 {
index, _ := strconv.Atoi(l[len(l)-1])
return int32(index)
}
type GetAllExtendMsgSetOpts struct {
ExcludeExtendMsgs bool
}
type ExtendMsgSetInterface interface {
CreateExtendMsgSet(ctx context.Context, set *ExtendMsgSet) error
GetAllExtendMsgSet(ctx context.Context, ID string, opts *GetAllExtendMsgSetOpts) (sets []*ExtendMsgSet, err error)
GetExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, maxMsgUpdateTime int64) (*ExtendMsgSet, error)
InsertExtendMsg(ctx context.Context, sourceID string, sessionType int32, msg *ExtendMsg) error
InsertOrUpdateReactionExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensionList map[string]*commonPb.KeyValue) error
DeleteReactionExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensionList map[string]*commonPb.KeyValue) error
GetExtendMsg(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, maxMsgUpdateTime int64) (extendMsg *ExtendMsg, err error)
}
@@ -1,5 +1,7 @@
package unrelation
import "go.mongodb.org/mongo-driver/mongo"
const (
CSuperGroup = "super_group"
CUserToSuperGroup = "user_to_super_group"
@@ -24,4 +26,5 @@ func (UserToSuperGroupModel) TableName() string {
}
type SuperGroupModelInterface interface {
CreateSuperGroup(sCtx mongo.SessionContext, groupID string, initMemberIDs []string) error
}
@@ -1,4 +1,4 @@
package getcdv3
package discoveryRegistry
import (
"Open_IM/pkg/common/config"
@@ -7,12 +7,18 @@ import (
"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 {
GetConns(serviceName string, opts ...grpc.DialOption) ([]*grpc.ClientConn, error)
GetConn(serviceName string, strategy func(slice []*grpc.ClientConn) int, opts ...grpc.DialOption) (*grpc.ClientConn, error)
}
func registerConf(key, conf string) {
etcdAddr := strings.Join(config.Config.Etcd.EtcdAddr, ",")
cli, err := clientv3.New(clientv3.Config{
+180 -189
View File
@@ -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_5c8d3aafef0e7d21, []int{0}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{1}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{2}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{3}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{4}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{5}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{6}
return fileDescriptor_group_d88c7f5350508ce3, []int{6}
}
func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b)
@@ -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_5c8d3aafef0e7d21, []int{7}
return fileDescriptor_group_d88c7f5350508ce3, []int{7}
}
func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b)
@@ -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_5c8d3aafef0e7d21, []int{8}
return fileDescriptor_group_d88c7f5350508ce3, []int{8}
}
func (m *GetUserReqApplicationListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserReqApplicationListReq.Unmarshal(m, b)
@@ -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_5c8d3aafef0e7d21, []int{9}
return fileDescriptor_group_d88c7f5350508ce3, []int{9}
}
func (m *GetUserReqApplicationListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserReqApplicationListResp.Unmarshal(m, b)
@@ -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_5c8d3aafef0e7d21, []int{10}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{11}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{12}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{13}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{14}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{15}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{16}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{17}
return fileDescriptor_group_d88c7f5350508ce3, []int{17}
}
func (m *QuitGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QuitGroupResp.Unmarshal(m, b)
@@ -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_5c8d3aafef0e7d21, []int{18}
return fileDescriptor_group_d88c7f5350508ce3, []int{18}
}
func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b)
@@ -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_5c8d3aafef0e7d21, []int{19}
return fileDescriptor_group_d88c7f5350508ce3, []int{19}
}
func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b)
@@ -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_5c8d3aafef0e7d21, []int{20}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{21}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{22}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{23}
return fileDescriptor_group_d88c7f5350508ce3, []int{23}
}
func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b)
@@ -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_5c8d3aafef0e7d21, []int{24}
return fileDescriptor_group_d88c7f5350508ce3, []int{24}
}
func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b)
@@ -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_5c8d3aafef0e7d21, []int{25}
return fileDescriptor_group_d88c7f5350508ce3, []int{25}
}
func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b)
@@ -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_5c8d3aafef0e7d21, []int{26}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{27}
return fileDescriptor_group_d88c7f5350508ce3, []int{27}
}
func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b)
@@ -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_5c8d3aafef0e7d21, []int{28}
return fileDescriptor_group_d88c7f5350508ce3, []int{28}
}
func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b)
@@ -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_5c8d3aafef0e7d21, []int{29}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{30}
return fileDescriptor_group_d88c7f5350508ce3, []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_5c8d3aafef0e7d21, []int{31}
return fileDescriptor_group_d88c7f5350508ce3, []int{31}
}
func (m *GetGroupsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupsReq.Unmarshal(m, b)
@@ -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_5c8d3aafef0e7d21, []int{32}
return fileDescriptor_group_d88c7f5350508ce3, []int{32}
}
func (m *GetGroupsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupsResp.Unmarshal(m, b)
@@ -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_5c8d3aafef0e7d21, []int{33}
return fileDescriptor_group_d88c7f5350508ce3, []int{33}
}
func (m *GetGroupMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMemberReq.Unmarshal(m, b)
@@ -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_5c8d3aafef0e7d21, []int{34}
return fileDescriptor_group_d88c7f5350508ce3, []int{34}
}
func (m *GetGroupMembersCMSReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMembersCMSReq.Unmarshal(m, b)
@@ -1565,8 +1565,7 @@ func (m *GetGroupMembersCMSReq) GetPagination() *sdk_ws.RequestPagination {
type GetGroupMembersCMSResp struct {
Members []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members" json:"members,omitempty"`
Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,2,opt,name=pagination" json:"pagination,omitempty"`
MemberNums int32 `protobuf:"varint,3,opt,name=memberNums" json:"memberNums,omitempty"`
MemberNums int32 `protobuf:"varint,2,opt,name=memberNums" json:"memberNums,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -1576,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_5c8d3aafef0e7d21, []int{35}
return fileDescriptor_group_d88c7f5350508ce3, []int{35}
}
func (m *GetGroupMembersCMSResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMembersCMSResp.Unmarshal(m, b)
@@ -1603,13 +1602,6 @@ func (m *GetGroupMembersCMSResp) GetMembers() []*sdk_ws.GroupMemberFullInfo {
return nil
}
func (m *GetGroupMembersCMSResp) GetPagination() *sdk_ws.ResponsePagination {
if m != nil {
return m.Pagination
}
return nil
}
func (m *GetGroupMembersCMSResp) GetMemberNums() int32 {
if m != nil {
return m.MemberNums
@@ -1628,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_5c8d3aafef0e7d21, []int{36}
return fileDescriptor_group_d88c7f5350508ce3, []int{36}
}
func (m *DismissGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DismissGroupReq.Unmarshal(m, b)
@@ -1665,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_5c8d3aafef0e7d21, []int{37}
return fileDescriptor_group_d88c7f5350508ce3, []int{37}
}
func (m *DismissGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DismissGroupResp.Unmarshal(m, b)
@@ -1698,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_5c8d3aafef0e7d21, []int{38}
return fileDescriptor_group_d88c7f5350508ce3, []int{38}
}
func (m *MuteGroupMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MuteGroupMemberReq.Unmarshal(m, b)
@@ -1749,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_5c8d3aafef0e7d21, []int{39}
return fileDescriptor_group_d88c7f5350508ce3, []int{39}
}
func (m *MuteGroupMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MuteGroupMemberResp.Unmarshal(m, b)
@@ -1781,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_5c8d3aafef0e7d21, []int{40}
return fileDescriptor_group_d88c7f5350508ce3, []int{40}
}
func (m *CancelMuteGroupMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelMuteGroupMemberReq.Unmarshal(m, b)
@@ -1825,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_5c8d3aafef0e7d21, []int{41}
return fileDescriptor_group_d88c7f5350508ce3, []int{41}
}
func (m *CancelMuteGroupMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelMuteGroupMemberResp.Unmarshal(m, b)
@@ -1856,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_5c8d3aafef0e7d21, []int{42}
return fileDescriptor_group_d88c7f5350508ce3, []int{42}
}
func (m *MuteGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MuteGroupReq.Unmarshal(m, b)
@@ -1893,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_5c8d3aafef0e7d21, []int{43}
return fileDescriptor_group_d88c7f5350508ce3, []int{43}
}
func (m *MuteGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MuteGroupResp.Unmarshal(m, b)
@@ -1924,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_5c8d3aafef0e7d21, []int{44}
return fileDescriptor_group_d88c7f5350508ce3, []int{44}
}
func (m *CancelMuteGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelMuteGroupReq.Unmarshal(m, b)
@@ -1961,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_5c8d3aafef0e7d21, []int{45}
return fileDescriptor_group_d88c7f5350508ce3, []int{45}
}
func (m *CancelMuteGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelMuteGroupResp.Unmarshal(m, b)
@@ -1994,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_5c8d3aafef0e7d21, []int{46}
return fileDescriptor_group_d88c7f5350508ce3, []int{46}
}
func (m *SetGroupMemberNicknameReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupMemberNicknameReq.Unmarshal(m, b)
@@ -2045,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_5c8d3aafef0e7d21, []int{47}
return fileDescriptor_group_d88c7f5350508ce3, []int{47}
}
func (m *SetGroupMemberNicknameResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupMemberNicknameResp.Unmarshal(m, b)
@@ -2077,7 +2069,7 @@ func (m *GetJoinedSuperGroupListReq) Reset() { *m = GetJoinedSuperGroupL
func (m *GetJoinedSuperGroupListReq) String() string { return proto.CompactTextString(m) }
func (*GetJoinedSuperGroupListReq) ProtoMessage() {}
func (*GetJoinedSuperGroupListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_5c8d3aafef0e7d21, []int{48}
return fileDescriptor_group_d88c7f5350508ce3, []int{48}
}
func (m *GetJoinedSuperGroupListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetJoinedSuperGroupListReq.Unmarshal(m, b)
@@ -2123,7 +2115,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_5c8d3aafef0e7d21, []int{49}
return fileDescriptor_group_d88c7f5350508ce3, []int{49}
}
func (m *GetJoinedSuperGroupListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetJoinedSuperGroupListResp.Unmarshal(m, b)
@@ -2168,7 +2160,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_5c8d3aafef0e7d21, []int{50}
return fileDescriptor_group_d88c7f5350508ce3, []int{50}
}
func (m *GetSuperGroupsInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSuperGroupsInfoReq.Unmarshal(m, b)
@@ -2206,7 +2198,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_5c8d3aafef0e7d21, []int{51}
return fileDescriptor_group_d88c7f5350508ce3, []int{51}
}
func (m *GetSuperGroupsInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSuperGroupsInfoResp.Unmarshal(m, b)
@@ -2249,7 +2241,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_5c8d3aafef0e7d21, []int{52}
return fileDescriptor_group_d88c7f5350508ce3, []int{52}
}
func (m *SetGroupMemberInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupMemberInfoReq.Unmarshal(m, b)
@@ -2321,7 +2313,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_5c8d3aafef0e7d21, []int{53}
return fileDescriptor_group_d88c7f5350508ce3, []int{53}
}
func (m *SetGroupMemberInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupMemberInfoResp.Unmarshal(m, b)
@@ -2352,7 +2344,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_5c8d3aafef0e7d21, []int{54}
return fileDescriptor_group_d88c7f5350508ce3, []int{54}
}
func (m *GetGroupAbstractInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupAbstractInfoReq.Unmarshal(m, b)
@@ -2392,7 +2384,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_5c8d3aafef0e7d21, []int{55}
return fileDescriptor_group_d88c7f5350508ce3, []int{55}
}
func (m *GroupAbstractInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupAbstractInfo.Unmarshal(m, b)
@@ -2444,7 +2436,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_5c8d3aafef0e7d21, []int{56}
return fileDescriptor_group_d88c7f5350508ce3, []int{56}
}
func (m *GetGroupAbstractInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupAbstractInfoResp.Unmarshal(m, b)
@@ -2483,7 +2475,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_5c8d3aafef0e7d21, []int{57}
return fileDescriptor_group_d88c7f5350508ce3, []int{57}
}
func (m *GetUserInGroupMembersReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserInGroupMembersReq.Unmarshal(m, b)
@@ -2528,7 +2520,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_5c8d3aafef0e7d21, []int{58}
return fileDescriptor_group_d88c7f5350508ce3, []int{58}
}
func (m *GetUserInGroupMembersResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserInGroupMembersResp.Unmarshal(m, b)
@@ -3166,7 +3158,7 @@ func _Group_GetGroupMemberList_Handler(srv interface{}, ctx context.Context, dec
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/group.group/GetGroupMemberList",
FullMethod: "/group.group/FindGroupMemberAll",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GroupServer).GetGroupMemberList(ctx, req.(*GetGroupMemberListReq))
@@ -3220,7 +3212,7 @@ func _Group_GetJoinedGroupList_Handler(srv interface{}, ctx context.Context, dec
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/group.group/GetJoinedGroupList",
FullMethod: "/group.group/FindJoinedGroup",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GroupServer).GetJoinedGroupList(ctx, req.(*GetJoinedGroupListReq))
@@ -3597,124 +3589,123 @@ var _Group_serviceDesc = grpc.ServiceDesc{
Metadata: "group/group.proto",
}
func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_5c8d3aafef0e7d21) }
func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_d88c7f5350508ce3) }
var fileDescriptor_group_5c8d3aafef0e7d21 = []byte{
// 1851 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00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 0x00, 0x00,
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, 0x6b,
0xb1, 0x53, 0x71, 0xca, 0x45, 0xc4, 0xee, 0x20, 0xcb, 0x68, 0xa5, 0x41, 0xa3, 0x05, 0x97, 0xcb,
0x79, 0x48, 0x9e, 0xf3, 0xe7, 0x21, 0x8f, 0x79, 0x4b, 0xe5, 0x23, 0xe4, 0x13, 0xe5, 0x93, 0xa4,
0x34, 0x1a, 0xcd, 0x8e, 0xa4, 0xd1, 0xee, 0x06, 0xef, 0xbd, 0x6c, 0xa1, 0x9e, 0xee, 0x99, 0x9e,
0xfe, 0x37, 0xbf, 0x6e, 0x60, 0xc1, 0x8d, 0xc2, 0x1e, 0xdd, 0xe5, 0xbf, 0x0d, 0x1a, 0x85, 0x71,
0x88, 0x26, 0xf9, 0x87, 0xb5, 0x73, 0x42, 0x49, 0xf0, 0xf0, 0xb0, 0xf9, 0xb0, 0x45, 0xa2, 0x6b,
0x12, 0xed, 0xd2, 0x4b, 0x77, 0x97, 0x33, 0xec, 0xb2, 0xce, 0xe5, 0xd9, 0x0d, 0xdb, 0xbd, 0x61,
0xa9, 0x80, 0xd5, 0x18, 0xca, 0x19, 0x39, 0x94, 0x92, 0x48, 0xf0, 0xe3, 0xff, 0x18, 0xf0, 0xd9,
0x5e, 0x44, 0x9c, 0x98, 0x1c, 0x24, 0x27, 0xd9, 0xe4, 0x0a, 0x6d, 0xc1, 0x7d, 0x2f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
@@ -181,8 +181,7 @@ message GetGroupMembersCMSReq {
message GetGroupMembersCMSResp {
repeated server_api_params.GroupMemberFullInfo members = 1;
server_api_params.ResponsePagination pagination = 2;
int32 memberNums = 3;
int32 memberNums = 2;
}
message DismissGroupReq{
+93 -47
View File
@@ -5,7 +5,7 @@ import (
"sort"
)
// DistinctAny remove duplicate elements
// DistinctAny 去重
func DistinctAny[E any, K comparable](es []E, fn func(e E) K) []E {
v := make([]E, 0, len(es))
tmp := map[K]struct{}{}
@@ -20,14 +20,14 @@ func DistinctAny[E any, K comparable](es []E, fn func(e E) K) []E {
return v
}
// Distinct remove duplicate elements
// Distinct 去重
func Distinct[T comparable](ts []T) []T {
return DistinctAny(ts, func(t T) T {
return t
})
}
// Delete delete slice element, support negative number to delete the penultimate
// Delete 删除切片元素, 支持负数删除倒数第几个
func Delete[E any](es []E, index ...int) []E {
switch len(index) {
case 0:
@@ -59,7 +59,7 @@ func Delete[E any](es []E, index ...int) []E {
}
}
// DeleteAt delete slice element, support negative number to delete the penultimate
// DeleteAt 删除切片元素, 支持负数删除倒数第几个
func DeleteAt[E any](es *[]E, index ...int) []E {
v := Delete(*es, index...)
*es = v
@@ -67,7 +67,7 @@ func DeleteAt[E any](es *[]E, index ...int) []E {
}
// IndexAny get the index of the element
func IndexAny[E any, K comparable](es []E, e E, fn func(e E) K) int {
func IndexAny[E any, K comparable](e E, es []E, fn func(e E) K) int {
k := fn(e)
for i := 0; i < len(es); i++ {
if fn(es[i]) == k {
@@ -78,18 +78,18 @@ func IndexAny[E any, K comparable](es []E, e E, fn func(e E) K) int {
}
// IndexOf get the index of the element
func IndexOf[E comparable](es []E, e E) int {
return IndexAny(es, e, func(t E) E {
func IndexOf[E comparable](e E, es ...E) int {
return IndexAny(e, es, func(t E) E {
return t
})
}
// Contain include element or not
func Contain[E comparable](es []E, e E) bool {
return IndexOf(es, e) >= 0
// Contain 是否包含
func Contain[E comparable](e E, es ...E) bool {
return IndexOf(e, es...) >= 0
}
// DuplicateAny judge whether it is repeated
// DuplicateAny 是否有重复的
func DuplicateAny[E any, K comparable](es []E, fn func(e E) K) bool {
t := make(map[K]struct{})
for _, e := range es {
@@ -102,14 +102,14 @@ func DuplicateAny[E any, K comparable](es []E, fn func(e E) K) bool {
return false
}
// Duplicate judge whether it is repeated
// Duplicate 是否有重复的
func Duplicate[E comparable](es []E) bool {
return DuplicateAny(es, func(e E) E {
return e
})
}
// SliceToMapOkAny slice to map
// SliceToMapOkAny slice to map (自定义类型, 筛选)
func SliceToMapOkAny[E any, K comparable, V any](es []E, fn func(e E) (K, V, bool)) map[K]V {
kv := make(map[K]V)
for i := 0; i < len(es); i++ {
@@ -121,7 +121,7 @@ func SliceToMapOkAny[E any, K comparable, V any](es []E, fn func(e E) (K, V, boo
return kv
}
// SliceToMapAny slice to map
// SliceToMapAny slice to map (自定义类型)
func SliceToMapAny[E any, K comparable, V any](es []E, fn func(e E) (K, V)) map[K]V {
return SliceToMapOkAny(es, func(e E) (K, V, bool) {
k, v := fn(e)
@@ -144,6 +144,15 @@ func SliceSetAny[E any, K comparable](es []E, fn func(e E) K) map[K]struct{} {
})
}
// Slice 批量转换切片类型
func Slice[E any, T any](es []E, fn func(e E) T) []T {
v := make([]T, len(es))
for i := 0; i < len(es); i++ {
v = append(v, fn(es[i]))
}
return v
}
// SliceSet slice to map[E]struct{}
func SliceSet[E comparable](es []E) map[E]struct{} {
return SliceSetAny(es, func(e E) E {
@@ -182,7 +191,7 @@ func Max[E Ordered](e ...E) E {
return v
}
// BothExistAny get elements common to multiple slices
// BothExistAny 获取切片中共同存在的元素(交集)
func BothExistAny[E any, K comparable](es [][]E, fn func(e E) K) []E {
if len(es) == 0 {
return []E{}
@@ -225,43 +234,40 @@ func BothExistAny[E any, K comparable](es [][]E, fn func(e E) K) []E {
return v
}
// BothExist get elements common to multiple slices
// BothExist 获取切片中共同存在的元素(交集)
func BothExist[E comparable](es ...[]E) []E {
return BothExistAny(es, func(e E) E {
return e
})
}
// CompleteAny complete inclusion
func CompleteAny[K comparable, E any](ks []K, es []E, fn func(e E) K) bool {
a := SliceSetAny(es, fn)
for k := range SliceSet(ks) {
if !HasKey(a, k) {
return false
}
delete(a, k)
}
return len(a) == 0
}
//// CompleteAny a中存在b的所有元素, 同时b中的所有元素a
//func CompleteAny[K comparable, E any](ks []K, es []E, fn func(e E) K) bool {
// if len(ks) == 0 && len(es) == 0 {
// return true
// }
// kn := make(map[K]uint8)
// for _, e := range Distinct(ks) {
// kn[e]++
// }
// for k := range SliceSetAny(es, fn) {
// kn[k]++
// }
// for _, n := range kn {
// if n != 2 {
// return false
// }
// }
// return true
//}
// Complete a和b去重后是否相等(忽略顺序)
func Complete[E comparable](a []E, b []E) bool {
if len(a) == 0 && len(b) == 0 {
return true
}
if (len(a) == 0 && len(b) != 0) || (len(a) != 0 && len(b) == 0) {
return false
}
t := SliceSet(a)
for _, e := range b {
if _, ok := t[e]; !ok {
return false
}
}
return true
return len(Single(a, b)) == 0
}
// MapKey get map keys
func MapKey[K comparable, V any](kv map[K]V) []K {
// Keys get map keys
func Keys[K comparable, V any](kv map[K]V) []K {
ks := make([]K, 0, len(kv))
for k := range kv {
ks = append(ks, k)
@@ -269,8 +275,8 @@ func MapKey[K comparable, V any](kv map[K]V) []K {
return ks
}
// MapValue get map values
func MapValue[K comparable, V any](kv map[K]V) []V {
// Values get map values
func Values[K comparable, V any](kv map[K]V) []V {
vs := make([]V, 0, len(kv))
for k := range kv {
vs = append(vs, kv[k])
@@ -306,6 +312,7 @@ func If[T any](isa bool, a, b T) T {
return b
}
// Equal 比较切片是否相对(包括元素顺序)
func Equal[E comparable](a []E, b []E) bool {
if len(a) != len(b) {
return false
@@ -318,11 +325,50 @@ func Equal[E comparable](a []E, b []E) bool {
return true
}
// Single
// Single a中存在,b中不存在 或 b中存在,a中不存在
func Single[E comparable](a, b []E) []E {
kn := make(map[E]uint8)
for _, e := range Distinct(a) {
kn[e]++
}
for _, e := range Distinct(b) {
kn[e]++
}
v := make([]E, 0, len(kn))
for k, n := range kn {
if n == 1 {
v = append(v, k)
}
}
return v
}
return nil
// Order 将ts按es排序
func Order[E comparable, T any](es []E, ts []T, fn func(t T) E) []T {
if len(es) == 0 || len(ts) == 0 {
return ts
}
kv := make(map[E][]T)
for i := 0; i < len(ts); i++ {
t := ts[i]
k := fn(t)
kv[k] = append(kv[k], t)
}
rs := make([]T, 0, len(ts))
for _, e := range es {
vs := kv[e]
delete(kv, e)
rs = append(rs, vs...)
}
for k := range kv {
rs = append(rs, kv[k]...)
}
return rs
}
func OrderPtr[E comparable, T any](es []E, ts *[]T, fn func(t T) E) []T {
*ts = Order(es, *ts, fn)
return *ts
}
func UniqueJoin(s ...string) string {
+2 -2
View File
@@ -75,9 +75,9 @@ func TestCompleteAny(t *testing.T) {
DeleteAt(&list, -1)
DeleteAt(&ids, -1)
ok := CompleteAny(ids, list, func(t Item) int {
ok := Complete(ids, Slice(list, func(t Item) int {
return t.ID
})
}))
fmt.Printf("%+v\n", ok)