Documentation ¶
Index ¶
- func IsMysqlDuplicateKey(err error) bool
- func NewBlackGorm(db *gorm.DB) relation.BlackModelInterface
- func NewChatLogGorm(db *gorm.DB) relation.ChatLogModelInterface
- func NewConversationGorm(db *gorm.DB) relation.ConversationModelInterface
- func NewFriendGorm(db *gorm.DB) relation.FriendModelInterface
- func NewFriendRequestGorm(db *gorm.DB) relation.FriendRequestModelInterface
- func NewGormDB() (*gorm.DB, error)
- func NewGroupDB(db *gorm.DB) relation.GroupModelInterface
- func NewGroupMemberDB(db *gorm.DB) relation.GroupMemberModelInterface
- func NewGroupRequest(db *gorm.DB) relation.GroupRequestModelInterface
- func NewLogGorm(db *gorm.DB) relationtb.LogInterface
- func NewObjectInfo(db *gorm.DB) relation.ObjectInfoModelInterface
- func NewUserGorm(db *gorm.DB) relation.UserModelInterface
- type BlackGorm
- func (b *BlackGorm) Create(ctx context.Context, blacks []*relation.BlackModel) (err error)
- func (b *BlackGorm) Delete(ctx context.Context, blacks []*relation.BlackModel) (err error)
- func (b *BlackGorm) Find(ctx context.Context, blacks []*relation.BlackModel) (blackList []*relation.BlackModel, err error)
- func (b *BlackGorm) FindBlackUserIDs(ctx context.Context, ownerUserID string) (blackUserIDs []string, err error)
- func (b *BlackGorm) FindOwnerBlackInfos(ctx context.Context, ownerUserID string, userIDs []string) (blacks []*relation.BlackModel, err error)
- func (b *BlackGorm) FindOwnerBlacks(ctx context.Context, ownerUserID string, pageNumber, showNumber int32) (blacks []*relation.BlackModel, total int64, err error)
- func (b *BlackGorm) Take(ctx context.Context, ownerUserID, blockUserID string) (black *relation.BlackModel, err error)
- func (b *BlackGorm) Update(ctx context.Context, blacks []*relation.BlackModel) (err error)
- func (b *BlackGorm) UpdateByMap(ctx context.Context, ownerUserID, blockUserID string, ...) (err error)
- type ChatLogGorm
- type ConversationGorm
- func (c *ConversationGorm) Create(ctx context.Context, conversations []*relation.ConversationModel) (err error)
- func (c *ConversationGorm) Delete(ctx context.Context, groupIDs []string) (err error)
- func (c *ConversationGorm) Find(ctx context.Context, ownerUserID string, conversationIDs []string) (conversations []*relation.ConversationModel, err error)
- func (c *ConversationGorm) FindConversationID(ctx context.Context, userID string, conversationIDList []string) (existConversationID []string, err error)
- func (c *ConversationGorm) FindRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) (userIDs []string, err error)
- func (c *ConversationGorm) FindSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) (userIDs []string, err error)
- func (c *ConversationGorm) FindUserID(ctx context.Context, userIDs []string, conversationIDs []string) (existUserID []string, err error)
- func (c *ConversationGorm) FindUserIDAllConversationID(ctx context.Context, userID string) (conversationIDList []string, err error)
- func (c *ConversationGorm) FindUserIDAllConversations(ctx context.Context, userID string) (conversations []*relation.ConversationModel, err error)
- func (c *ConversationGorm) GetAllConversationIDs(ctx context.Context) (conversationIDs []string, err error)
- func (c *ConversationGorm) GetAllConversationIDsNumber(ctx context.Context) (int64, error)
- func (c *ConversationGorm) GetConversationIDsNeedDestruct(ctx context.Context) (conversations []*relation.ConversationModel, err error)
- func (c *ConversationGorm) GetConversationNotReceiveMessageUserIDs(ctx context.Context, conversationID string) ([]string, error)
- func (c *ConversationGorm) GetConversationRecvMsgOpt(ctx context.Context, userID string, conversationID string) (int32, error)
- func (c *ConversationGorm) GetConversationsByConversationID(ctx context.Context, conversationIDs []string) (conversations []*relation.ConversationModel, err error)
- func (c *ConversationGorm) GetUserAllHasReadSeqs(ctx context.Context, ownerUserID string) (hasReadSeqs map[string]int64, err error)
- func (c *ConversationGorm) GetUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string) (opt int, err error)
- func (c *ConversationGorm) NewTx(tx any) relation.ConversationModelInterface
- func (c *ConversationGorm) PageConversationIDs(ctx context.Context, pageNumber, showNumber int32) (conversationIDs []string, err error)
- func (c *ConversationGorm) Take(ctx context.Context, userID, conversationID string) (conversation *relation.ConversationModel, err error)
- func (c *ConversationGorm) Update(ctx context.Context, conversation *relation.ConversationModel) (err error)
- func (c *ConversationGorm) UpdateByMap(ctx context.Context, userIDList []string, conversationID string, ...) (rows int64, err error)
- type FriendGorm
- func (f *FriendGorm) Create(ctx context.Context, friends []*relation.FriendModel) (err error)
- func (f *FriendGorm) Delete(ctx context.Context, ownerUserID string, friendUserIDs []string) (err error)
- func (f *FriendGorm) FindFriendUserIDs(ctx context.Context, ownerUserID string) (friendUserIDs []string, err error)
- func (f *FriendGorm) FindFriends(ctx context.Context, ownerUserID string, friendUserIDs []string) (friends []*relation.FriendModel, err error)
- func (f *FriendGorm) FindInWhoseFriends(ctx context.Context, friendUserID string, pageNumber, showNumber int32) (friends []*relation.FriendModel, total int64, err error)
- func (f *FriendGorm) FindOwnerFriends(ctx context.Context, ownerUserID string, pageNumber, showNumber int32) (friends []*relation.FriendModel, total int64, err error)
- func (f *FriendGorm) FindReversalFriends(ctx context.Context, friendUserID string, ownerUserIDs []string) (friends []*relation.FriendModel, err error)
- func (f *FriendGorm) FindUserState(ctx context.Context, userID1, userID2 string) (friends []*relation.FriendModel, err error)
- func (f *FriendGorm) NewTx(tx any) relation.FriendModelInterface
- func (f *FriendGorm) Take(ctx context.Context, ownerUserID, friendUserID string) (friend *relation.FriendModel, err error)
- func (f *FriendGorm) Update(ctx context.Context, friends []*relation.FriendModel) (err error)
- func (f *FriendGorm) UpdateByMap(ctx context.Context, ownerUserID string, friendUserID string, ...) (err error)
- func (f *FriendGorm) UpdateRemark(ctx context.Context, ownerUserID, friendUserID, remark string) (err error)
- type FriendRequestGorm
- func (f *FriendRequestGorm) Create(ctx context.Context, friendRequests []*relation.FriendRequestModel) (err error)
- func (f *FriendRequestGorm) Delete(ctx context.Context, fromUserID, toUserID string) (err error)
- func (f *FriendRequestGorm) Find(ctx context.Context, fromUserID, toUserID string) (friendRequest *relation.FriendRequestModel, err error)
- func (f *FriendRequestGorm) FindBothFriendRequests(ctx context.Context, fromUserID, toUserID string) (friends []*relation.FriendRequestModel, err error)
- func (f *FriendRequestGorm) FindFromUserID(ctx context.Context, fromUserID string, pageNumber, showNumber int32) (friendRequests []*relation.FriendRequestModel, total int64, err error)
- func (f *FriendRequestGorm) FindToUserID(ctx context.Context, toUserID string, pageNumber, showNumber int32) (friendRequests []*relation.FriendRequestModel, total int64, err error)
- func (f *FriendRequestGorm) NewTx(tx any) relation.FriendRequestModelInterface
- func (f *FriendRequestGorm) Take(ctx context.Context, fromUserID, toUserID string) (friendRequest *relation.FriendRequestModel, err error)
- func (f *FriendRequestGorm) Update(ctx context.Context, friendRequest *relation.FriendRequestModel) (err error)
- func (f *FriendRequestGorm) UpdateByMap(ctx context.Context, fromUserID string, toUserID string, ...) (err error)
- type GroupGorm
- func (g *GroupGorm) CountRangeEverydayTotal(ctx context.Context, start time.Time, end time.Time) (map[string]int64, error)
- func (g *GroupGorm) CountTotal(ctx context.Context, before *time.Time) (count int64, err error)
- func (g *GroupGorm) Create(ctx context.Context, groups []*relation.GroupModel) (err error)
- func (g *GroupGorm) Find(ctx context.Context, groupIDs []string) (groups []*relation.GroupModel, err error)
- func (g *GroupGorm) FindNotDismissedGroup(ctx context.Context, groupIDs []string) (groups []*relation.GroupModel, err error)
- func (g *GroupGorm) GetGroupIDsByGroupType(ctx context.Context, groupType int) (groupIDs []string, err error)
- func (g *GroupGorm) NewTx(tx any) relation.GroupModelInterface
- func (g *GroupGorm) Search(ctx context.Context, keyword string, pageNumber, showNumber int32) (total uint32, groups []*relation.GroupModel, err error)
- func (g *GroupGorm) Take(ctx context.Context, groupID string) (group *relation.GroupModel, err error)
- func (g *GroupGorm) UpdateMap(ctx context.Context, groupID string, args map[string]interface{}) (err error)
- func (g *GroupGorm) UpdateStatus(ctx context.Context, groupID string, status int32) (err error)
- type GroupMemberGorm
- func (g *GroupMemberGorm) Create(ctx context.Context, groupMemberList []*relation.GroupMemberModel) (err error)
- func (g *GroupMemberGorm) Delete(ctx context.Context, groupID string, userIDs []string) (err error)
- func (g *GroupMemberGorm) DeleteGroup(ctx context.Context, groupIDs []string) (err error)
- func (g *GroupMemberGorm) Find(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32) (groupMembers []*relation.GroupMemberModel, err error)
- func (g *GroupMemberGorm) FindJoinUserID(ctx context.Context, groupIDs []string) (groupUsers map[string][]string, err error)
- func (g *GroupMemberGorm) FindMemberUserID(ctx context.Context, groupID string) (userIDs []string, err error)
- func (g *GroupMemberGorm) FindUserJoinedGroupID(ctx context.Context, userID string) (groupIDs []string, err error)
- func (g *GroupMemberGorm) FindUserManagedGroupID(ctx context.Context, userID string) (groupIDs []string, err error)
- func (g *GroupMemberGorm) FindUsersJoinedGroupID(ctx context.Context, userIDs []string) (map[string][]string, error)
- func (g *GroupMemberGorm) MapGroupMemberNum(ctx context.Context, groupIDs []string) (count map[string]uint32, err error)
- func (g *GroupMemberGorm) NewTx(tx any) relation.GroupMemberModelInterface
- func (g *GroupMemberGorm) SearchMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, ...) (total uint32, groupList []*relation.GroupMemberModel, err error)
- func (g *GroupMemberGorm) Take(ctx context.Context, groupID string, userID string) (groupMember *relation.GroupMemberModel, err error)
- func (g *GroupMemberGorm) TakeGroupMemberNum(ctx context.Context, groupID string) (count int64, err error)
- func (g *GroupMemberGorm) TakeOwner(ctx context.Context, groupID string) (groupMember *relation.GroupMemberModel, err error)
- func (g *GroupMemberGorm) Update(ctx context.Context, groupID string, userID string, data map[string]any) (err error)
- func (g *GroupMemberGorm) UpdateRoleLevel(ctx context.Context, groupID string, userID string, roleLevel int32) (rowsAffected int64, err error)
- type GroupRequestGorm
- func (g *GroupRequestGorm) Create(ctx context.Context, groupRequests []*relation.GroupRequestModel) (err error)
- func (g *GroupRequestGorm) Delete(ctx context.Context, groupID string, userID string) (err error)
- func (g *GroupRequestGorm) FindGroupRequests(ctx context.Context, groupID string, userIDs []string) (total int64, groupRequests []*relation.GroupRequestModel, err error)
- func (g *GroupRequestGorm) NewTx(tx any) relation.GroupRequestModelInterface
- func (g *GroupRequestGorm) Page(ctx context.Context, userID string, pageNumber, showNumber int32) (total uint32, groups []*relation.GroupRequestModel, err error)
- func (g *GroupRequestGorm) PageGroup(ctx context.Context, groupIDs []string, pageNumber, showNumber int32) (total uint32, groups []*relation.GroupRequestModel, err error)
- func (g *GroupRequestGorm) Take(ctx context.Context, groupID string, userID string) (groupRequest *relation.GroupRequestModel, err error)
- func (g *GroupRequestGorm) UpdateHandler(ctx context.Context, groupID string, userID string, handledMsg string, ...) (err error)
- type LogGorm
- func (l *LogGorm) Create(ctx context.Context, log []*relationtb.Log) error
- func (l *LogGorm) Delete(ctx context.Context, logIDs []string, userID string) error
- func (l *LogGorm) Get(ctx context.Context, logIDs []string, userID string) ([]*relationtb.Log, error)
- func (l *LogGorm) Search(ctx context.Context, keyword string, start time.Time, end time.Time, ...) (uint32, []*relationtb.Log, error)
- type MetaDB
- type ObjectInfoGorm
- type UserGorm
- func (u *UserGorm) CountRangeEverydayTotal(ctx context.Context, start time.Time, end time.Time) (map[string]int64, error)
- func (u *UserGorm) CountTotal(ctx context.Context, before *time.Time) (count int64, err error)
- func (u *UserGorm) Create(ctx context.Context, users []*relation.UserModel) (err error)
- func (u *UserGorm) Find(ctx context.Context, userIDs []string) (users []*relation.UserModel, err error)
- func (u *UserGorm) GetAllUserID(ctx context.Context, pageNumber, showNumber int32) (userIDs []string, err error)
- func (u *UserGorm) GetUserGlobalRecvMsgOpt(ctx context.Context, userID string) (opt int, err error)
- func (u *UserGorm) Page(ctx context.Context, pageNumber, showNumber int32) (users []*relation.UserModel, count int64, err error)
- func (u *UserGorm) Take(ctx context.Context, userID string) (user *relation.UserModel, err error)
- func (u *UserGorm) Update(ctx context.Context, user *relation.UserModel) (err error)
- func (u *UserGorm) UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsMysqlDuplicateKey ¶
func NewBlackGorm ¶
func NewBlackGorm(db *gorm.DB) relation.BlackModelInterface
func NewChatLogGorm ¶
func NewChatLogGorm(db *gorm.DB) relation.ChatLogModelInterface
func NewConversationGorm ¶
func NewConversationGorm(db *gorm.DB) relation.ConversationModelInterface
func NewFriendGorm ¶
func NewFriendGorm(db *gorm.DB) relation.FriendModelInterface
func NewFriendRequestGorm ¶
func NewFriendRequestGorm(db *gorm.DB) relation.FriendRequestModelInterface
func NewGroupDB ¶
func NewGroupDB(db *gorm.DB) relation.GroupModelInterface
func NewGroupMemberDB ¶
func NewGroupMemberDB(db *gorm.DB) relation.GroupMemberModelInterface
func NewGroupRequest ¶
func NewGroupRequest(db *gorm.DB) relation.GroupRequestModelInterface
func NewLogGorm ¶ added in v3.3.2
func NewLogGorm(db *gorm.DB) relationtb.LogInterface
func NewObjectInfo ¶
func NewObjectInfo(db *gorm.DB) relation.ObjectInfoModelInterface
func NewUserGorm ¶
func NewUserGorm(db *gorm.DB) relation.UserModelInterface
Types ¶
type BlackGorm ¶
type BlackGorm struct {
*MetaDB
}
func (*BlackGorm) Find ¶
func (b *BlackGorm) Find( ctx context.Context, blacks []*relation.BlackModel, ) (blackList []*relation.BlackModel, err error)
func (*BlackGorm) FindBlackUserIDs ¶
func (*BlackGorm) FindOwnerBlackInfos ¶
func (*BlackGorm) FindOwnerBlacks ¶
type ChatLogGorm ¶
type ChatLogGorm struct {
*MetaDB
}
func (*ChatLogGorm) Create ¶
func (c *ChatLogGorm) Create(msg *pbmsg.MsgDataToMQ) error
type ConversationGorm ¶
type ConversationGorm struct {
*MetaDB
}
func (*ConversationGorm) Create ¶
func (c *ConversationGorm) Create(ctx context.Context, conversations []*relation.ConversationModel) (err error)
func (*ConversationGorm) Delete ¶
func (c *ConversationGorm) Delete(ctx context.Context, groupIDs []string) (err error)
func (*ConversationGorm) Find ¶
func (c *ConversationGorm) Find( ctx context.Context, ownerUserID string, conversationIDs []string, ) (conversations []*relation.ConversationModel, err error)
func (*ConversationGorm) FindConversationID ¶
func (*ConversationGorm) FindRecvMsgNotNotifyUserIDs ¶
func (*ConversationGorm) FindSuperGroupRecvMsgNotNotifyUserIDs ¶
func (*ConversationGorm) FindUserID ¶
func (*ConversationGorm) FindUserIDAllConversationID ¶
func (*ConversationGorm) FindUserIDAllConversations ¶
func (c *ConversationGorm) FindUserIDAllConversations( ctx context.Context, userID string, ) (conversations []*relation.ConversationModel, err error)
func (*ConversationGorm) GetAllConversationIDs ¶
func (c *ConversationGorm) GetAllConversationIDs(ctx context.Context) (conversationIDs []string, err error)
func (*ConversationGorm) GetAllConversationIDsNumber ¶ added in v3.4.0
func (c *ConversationGorm) GetAllConversationIDsNumber(ctx context.Context) (int64, error)
func (*ConversationGorm) GetConversationIDsNeedDestruct ¶
func (c *ConversationGorm) GetConversationIDsNeedDestruct( ctx context.Context, ) (conversations []*relation.ConversationModel, err error)
func (*ConversationGorm) GetConversationNotReceiveMessageUserIDs ¶ added in v3.3.2
func (*ConversationGorm) GetConversationRecvMsgOpt ¶ added in v3.3.2
func (*ConversationGorm) GetConversationsByConversationID ¶
func (c *ConversationGorm) GetConversationsByConversationID( ctx context.Context, conversationIDs []string, ) (conversations []*relation.ConversationModel, err error)
func (*ConversationGorm) GetUserAllHasReadSeqs ¶
func (*ConversationGorm) GetUserRecvMsgOpt ¶
func (*ConversationGorm) NewTx ¶
func (c *ConversationGorm) NewTx(tx any) relation.ConversationModelInterface
func (*ConversationGorm) PageConversationIDs ¶ added in v3.4.0
func (*ConversationGorm) Take ¶
func (c *ConversationGorm) Take( ctx context.Context, userID, conversationID string, ) (conversation *relation.ConversationModel, err error)
func (*ConversationGorm) Update ¶
func (c *ConversationGorm) Update(ctx context.Context, conversation *relation.ConversationModel) (err error)
func (*ConversationGorm) UpdateByMap ¶
type FriendGorm ¶
type FriendGorm struct {
*MetaDB
}
func (*FriendGorm) Create ¶
func (f *FriendGorm) Create(ctx context.Context, friends []*relation.FriendModel) (err error)
插入多条记录.
func (*FriendGorm) Delete ¶
func (f *FriendGorm) Delete(ctx context.Context, ownerUserID string, friendUserIDs []string) (err error)
删除ownerUserID指定的好友.
func (*FriendGorm) FindFriendUserIDs ¶
func (*FriendGorm) FindFriends ¶
func (f *FriendGorm) FindFriends( ctx context.Context, ownerUserID string, friendUserIDs []string, ) (friends []*relation.FriendModel, err error)
获取 owner指定的好友列表 如果有friendUserIDs不存在,也不返回错误.
func (*FriendGorm) FindInWhoseFriends ¶
func (f *FriendGorm) FindInWhoseFriends( ctx context.Context, friendUserID string, pageNumber, showNumber int32, ) (friends []*relation.FriendModel, total int64, err error)
获取哪些人添加了friendUserID 支持翻页.
func (*FriendGorm) FindOwnerFriends ¶
func (f *FriendGorm) FindOwnerFriends( ctx context.Context, ownerUserID string, pageNumber, showNumber int32, ) (friends []*relation.FriendModel, total int64, err error)
获取ownerUserID好友列表 支持翻页.
func (*FriendGorm) FindReversalFriends ¶
func (f *FriendGorm) FindReversalFriends( ctx context.Context, friendUserID string, ownerUserIDs []string, ) (friends []*relation.FriendModel, err error)
获取哪些人添加了friendUserID 如果有ownerUserIDs不存在,也不返回错误.
func (*FriendGorm) FindUserState ¶
func (f *FriendGorm) FindUserState( ctx context.Context, userID1, userID2 string, ) (friends []*relation.FriendModel, err error)
查找好友关系,如果是双向关系,则都返回.
func (*FriendGorm) NewTx ¶
func (f *FriendGorm) NewTx(tx any) relation.FriendModelInterface
func (*FriendGorm) Take ¶
func (f *FriendGorm) Take( ctx context.Context, ownerUserID, friendUserID string, ) (friend *relation.FriendModel, err error)
获取单个好友信息,如没找到 返回错误.
func (*FriendGorm) Update ¶
func (f *FriendGorm) Update(ctx context.Context, friends []*relation.FriendModel) (err error)
更新好友信息的非零值.
func (*FriendGorm) UpdateByMap ¶
func (f *FriendGorm) UpdateByMap( ctx context.Context, ownerUserID string, friendUserID string, args map[string]interface{}, ) (err error)
更新ownerUserID单个好友信息 更新零值.
func (*FriendGorm) UpdateRemark ¶
func (f *FriendGorm) UpdateRemark(ctx context.Context, ownerUserID, friendUserID, remark string) (err error)
更新好友备注(也支持零值 ).
type FriendRequestGorm ¶
type FriendRequestGorm struct {
*MetaDB
}
func (*FriendRequestGorm) Create ¶
func (f *FriendRequestGorm) Create(ctx context.Context, friendRequests []*relation.FriendRequestModel) (err error)
插入多条记录.
func (*FriendRequestGorm) Delete ¶
func (f *FriendRequestGorm) Delete(ctx context.Context, fromUserID, toUserID string) (err error)
删除记录.
func (*FriendRequestGorm) Find ¶
func (f *FriendRequestGorm) Find( ctx context.Context, fromUserID, toUserID string, ) (friendRequest *relation.FriendRequestModel, err error)
获取来指定用户的好友申请 未找到 不返回错误.
func (*FriendRequestGorm) FindBothFriendRequests ¶
func (f *FriendRequestGorm) FindBothFriendRequests(ctx context.Context, fromUserID, toUserID string) (friends []*relation.FriendRequestModel, err error)
func (*FriendRequestGorm) FindFromUserID ¶
func (f *FriendRequestGorm) FindFromUserID( ctx context.Context, fromUserID string, pageNumber, showNumber int32, ) (friendRequests []*relation.FriendRequestModel, total int64, err error)
获取fromUserID发出去的好友申请列表.
func (*FriendRequestGorm) FindToUserID ¶
func (f *FriendRequestGorm) FindToUserID( ctx context.Context, toUserID string, pageNumber, showNumber int32, ) (friendRequests []*relation.FriendRequestModel, total int64, err error)
获取toUserID收到的好友申请列表.
func (*FriendRequestGorm) NewTx ¶
func (f *FriendRequestGorm) NewTx(tx any) relation.FriendRequestModelInterface
func (*FriendRequestGorm) Take ¶
func (f *FriendRequestGorm) Take( ctx context.Context, fromUserID, toUserID string, ) (friendRequest *relation.FriendRequestModel, err error)
func (*FriendRequestGorm) Update ¶
func (f *FriendRequestGorm) Update(ctx context.Context, friendRequest *relation.FriendRequestModel) (err error)
更新记录 (非零值).
func (*FriendRequestGorm) UpdateByMap ¶
func (f *FriendRequestGorm) UpdateByMap( ctx context.Context, fromUserID string, toUserID string, args map[string]interface{}, ) (err error)
更新零值.
type GroupGorm ¶
type GroupGorm struct {
*MetaDB
}
func (*GroupGorm) CountRangeEverydayTotal ¶
func (*GroupGorm) CountTotal ¶
func (*GroupGorm) FindNotDismissedGroup ¶
func (*GroupGorm) GetGroupIDsByGroupType ¶
type GroupMemberGorm ¶
type GroupMemberGorm struct {
*MetaDB
}
func (*GroupMemberGorm) Create ¶
func (g *GroupMemberGorm) Create(ctx context.Context, groupMemberList []*relation.GroupMemberModel) (err error)
func (*GroupMemberGorm) DeleteGroup ¶
func (g *GroupMemberGorm) DeleteGroup(ctx context.Context, groupIDs []string) (err error)
func (*GroupMemberGorm) Find ¶
func (g *GroupMemberGorm) Find( ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, ) (groupMembers []*relation.GroupMemberModel, err error)
func (*GroupMemberGorm) FindJoinUserID ¶
func (*GroupMemberGorm) FindMemberUserID ¶
func (*GroupMemberGorm) FindUserJoinedGroupID ¶
func (*GroupMemberGorm) FindUserManagedGroupID ¶
func (*GroupMemberGorm) FindUsersJoinedGroupID ¶
func (*GroupMemberGorm) MapGroupMemberNum ¶
func (*GroupMemberGorm) NewTx ¶
func (g *GroupMemberGorm) NewTx(tx any) relation.GroupMemberModelInterface
func (*GroupMemberGorm) SearchMember ¶
func (*GroupMemberGorm) Take ¶
func (g *GroupMemberGorm) Take( ctx context.Context, groupID string, userID string, ) (groupMember *relation.GroupMemberModel, err error)
func (*GroupMemberGorm) TakeGroupMemberNum ¶
func (*GroupMemberGorm) TakeOwner ¶
func (g *GroupMemberGorm) TakeOwner( ctx context.Context, groupID string, ) (groupMember *relation.GroupMemberModel, err error)
func (*GroupMemberGorm) UpdateRoleLevel ¶
type GroupRequestGorm ¶
type GroupRequestGorm struct {
*MetaDB
}
func (*GroupRequestGorm) Create ¶
func (g *GroupRequestGorm) Create(ctx context.Context, groupRequests []*relation.GroupRequestModel) (err error)
func (*GroupRequestGorm) FindGroupRequests ¶
func (g *GroupRequestGorm) FindGroupRequests(ctx context.Context, groupID string, userIDs []string) (total int64, groupRequests []*relation.GroupRequestModel, err error)
func (*GroupRequestGorm) NewTx ¶
func (g *GroupRequestGorm) NewTx(tx any) relation.GroupRequestModelInterface
func (*GroupRequestGorm) Page ¶
func (g *GroupRequestGorm) Page( ctx context.Context, userID string, pageNumber, showNumber int32, ) (total uint32, groups []*relation.GroupRequestModel, err error)
func (*GroupRequestGorm) PageGroup ¶
func (g *GroupRequestGorm) PageGroup( ctx context.Context, groupIDs []string, pageNumber, showNumber int32, ) (total uint32, groups []*relation.GroupRequestModel, err error)
func (*GroupRequestGorm) Take ¶
func (g *GroupRequestGorm) Take( ctx context.Context, groupID string, userID string, ) (groupRequest *relation.GroupRequestModel, err error)
func (*GroupRequestGorm) UpdateHandler ¶
type LogGorm ¶ added in v3.3.2
type LogGorm struct {
// contains filtered or unexported fields
}
type ObjectInfoGorm ¶
type ObjectInfoGorm struct {
*MetaDB
}
func (*ObjectInfoGorm) NewTx ¶
func (o *ObjectInfoGorm) NewTx(tx any) relation.ObjectInfoModelInterface
func (*ObjectInfoGorm) SetObject ¶
func (o *ObjectInfoGorm) SetObject(ctx context.Context, obj *relation.ObjectModel) (err error)
func (*ObjectInfoGorm) Take ¶
func (o *ObjectInfoGorm) Take(ctx context.Context, name string) (info *relation.ObjectModel, err error)
type UserGorm ¶
type UserGorm struct {
*MetaDB
}
func (*UserGorm) CountRangeEverydayTotal ¶
func (*UserGorm) CountTotal ¶
func (*UserGorm) Find ¶
func (u *UserGorm) Find(ctx context.Context, userIDs []string) (users []*relation.UserModel, err error)
获取指定用户信息 不存在,也不返回错误.
func (*UserGorm) GetAllUserID ¶
func (u *UserGorm) GetAllUserID(ctx context.Context, pageNumber, showNumber int32) (userIDs []string, err error)
获取所有用户ID.
func (*UserGorm) GetUserGlobalRecvMsgOpt ¶
func (*UserGorm) Page ¶
func (u *UserGorm) Page( ctx context.Context, pageNumber, showNumber int32, ) (users []*relation.UserModel, count int64, err error)
获取用户信息 不存在,不返回错误.
Click to show internal directories.
Click to hide internal directories.