Documentation ¶
Index ¶
- Variables
- func Aggregate(ctx context.Context, database, collection string, pipeline []bson.M, ...) error
- func AggregateByPage(ctx context.Context, database, collection, countField string, ...) error
- func CountDocuments(ctx context.Context, database, collection string, ...) (int64, error)
- func DeleteById(ctx context.Context, database, collection string, id interface{}) error
- func DeleteMany(ctx context.Context, database, collection string, ...) (int64, error)
- func DeleteOne(ctx context.Context, database, collection string, ...) (int64, error)
- func Find(ctx context.Context, database, collection string, ...) error
- func FindById(ctx context.Context, database, collection string, id, result interface{}) error
- func FindByIds(ctx context.Context, database, collection string, ids, result interface{}) error
- func FindByPage(ctx context.Context, database, collection string, paging *db.Paging, ...) error
- func FindOne(ctx context.Context, database, collection string, ...) error
- func Insert(ctx context.Context, database string, document interface{}) (string, error)
- func Inserts(ctx context.Context, database string, documents []interface{}) ([]string, error)
- func UpdateById(ctx context.Context, database, collection string, id, update interface{}, ...) error
- func UpdateMany(ctx context.Context, database, collection string, ...) error
- func UpdateOne(ctx context.Context, database, collection string, ...) error
- type AccountDao
- type ContactDao
- func (d *ContactDao) Delete(ctx context.Context, uid, friendId int) error
- func (d *ContactDao) GetContactIds(ctx context.Context, uid int) []int
- func (d *ContactDao) GetFriendRemark(ctx context.Context, uid int, friendId int) string
- func (d *ContactDao) IsFriend(ctx context.Context, uid int, friendId int, cache bool) bool
- func (d *ContactDao) List(ctx context.Context, uid int) ([]*entity.Contact, []*entity.User, error)
- func (d *ContactDao) LoadContactCache(ctx context.Context, uid int) error
- func (d *ContactDao) MoveGroup(ctx context.Context, uid int, friendId int, groupId string) error
- func (d *ContactDao) Remarks(ctx context.Context, uid int, fids []int) (map[int]string, error)
- func (d *ContactDao) SetFriendRemark(ctx context.Context, uid int, friendId int, remark string) error
- func (d *ContactDao) UpdateRemark(ctx context.Context, uid int, friendId int, remark string) error
- type ContactGroupDao
- type EmoticonDao
- func (d *EmoticonDao) AddUserSysEmoticon(ctx context.Context, uid int, emoticonId string) error
- func (d *EmoticonDao) DeleteCollect(ctx context.Context, uid int, ids []int) (int64, error)
- func (d *EmoticonDao) GetDetailsAll(ctx context.Context, uid int) ([]*entity.EmoticonItem, error)
- func (d *EmoticonDao) GetSystemEmoticonList(ctx context.Context) ([]*entity.Emoticon, error)
- func (d *EmoticonDao) GetUserInstallIds(ctx context.Context, uid int) []string
- func (d *EmoticonDao) RemoveUserSysEmoticon(ctx context.Context, uid int, emoticonId string) error
- type GroupApplyDao
- type GroupDao
- func (d *GroupDao) Create(ctx context.Context, create *do.GroupCreate) (int, error)
- func (d *GroupDao) Dismiss(ctx context.Context, groupId int, uid int) error
- func (d *GroupDao) FindGroupByGroupId(ctx context.Context, groupId int) (*entity.Group, error)
- func (d *GroupDao) FindGroupListByGroupIds(ctx context.Context, groupIds []int) ([]*entity.Group, error)
- func (d *GroupDao) Invite(ctx context.Context, invite *do.GroupInvite) error
- func (d *GroupDao) List(ctx context.Context, userId int) ([]*entity.Group, []*entity.GroupMember, []*entity.TalkSession, error)
- func (d *GroupDao) RemoveMember(ctx context.Context, remove *do.GroupMemberRemove) error
- func (d *GroupDao) SearchOvertList(ctx context.Context, overt *do.SearchOvert) ([]*entity.Group, error)
- func (d *GroupDao) Secede(ctx context.Context, groupId int, uid int) error
- func (d *GroupDao) Update(ctx context.Context, update *do.GroupUpdate) error
- type GroupMemberDao
- func (d *GroupMemberDao) CheckUserGroup(ctx context.Context, ids []int, userId int) ([]int, error)
- func (d *GroupMemberDao) CountGroupMemberNum(ctx context.Context, ids []int) ([]*entity.CountGroupMember, error)
- func (d *GroupMemberDao) CountMemberTotal(ctx context.Context, gid int) int64
- func (d *GroupMemberDao) FindByUserId(ctx context.Context, gid, uid int) (*entity.GroupMember, error)
- func (d *GroupMemberDao) FindGroupIds(ctx context.Context, userId int) ([]int, error)
- func (d *GroupMemberDao) FindGroupMemberListByUserId(ctx context.Context, userId int) ([]*entity.GroupMember, error)
- func (d *GroupMemberDao) GetMemberIds(ctx context.Context, groupId int) []int
- func (d *GroupMemberDao) GetMemberRemark(ctx context.Context, groupId int, userId int) string
- func (d *GroupMemberDao) GetMembers(ctx context.Context, groupId int) ([]*entity.GroupMember, []*entity.User, error)
- func (d *GroupMemberDao) GetUserGroupIds(ctx context.Context, uid int) []int
- func (d *GroupMemberDao) Handover(ctx context.Context, groupId int, userId int, memberId int) error
- func (d *GroupMemberDao) IsLeader(ctx context.Context, gid, uid int) bool
- func (d *GroupMemberDao) IsMaster(ctx context.Context, gid, uid int) bool
- func (d *GroupMemberDao) IsMember(ctx context.Context, gid, uid int, cache bool) bool
- func (d *GroupMemberDao) SetLeaderStatus(ctx context.Context, groupId int, userId int, leader int) error
- func (d *GroupMemberDao) SetMuteStatus(ctx context.Context, groupId int, userId int, status int) error
- type GroupNoticeDao
- type IMongoDB
- type InviteDao
- type MongoDB
- func (m *MongoDB[T]) Aggregate(ctx context.Context, pipeline []bson.M, result interface{}) error
- func (m *MongoDB[T]) AggregateByPage(ctx context.Context, countField string, paging *db.Paging, ...) error
- func (m *MongoDB[T]) CountDocuments(ctx context.Context, filter map[string]interface{}) (int64, error)
- func (m *MongoDB[T]) DeleteById(ctx context.Context, id interface{}) error
- func (m *MongoDB[T]) DeleteMany(ctx context.Context, filter map[string]interface{}) (int64, error)
- func (m *MongoDB[T]) DeleteOne(ctx context.Context, filter map[string]interface{}) (int64, error)
- func (m *MongoDB[T]) Find(ctx context.Context, filter map[string]interface{}, sortFields ...string) ([]*T, error)
- func (m *MongoDB[T]) FindById(ctx context.Context, id interface{}) (*T, error)
- func (m *MongoDB[T]) FindByIds(ctx context.Context, ids interface{}) ([]*T, error)
- func (m *MongoDB[T]) FindByPage(ctx context.Context, paging *db.Paging, filter map[string]interface{}, ...) ([]*T, error)
- func (m *MongoDB[T]) FindOne(ctx context.Context, filter map[string]interface{}, sortFields ...string) (*T, error)
- func (m *MongoDB[T]) Insert(ctx context.Context, document interface{}) (string, error)
- func (m *MongoDB[T]) Inserts(ctx context.Context, documents []interface{}) ([]string, error)
- func (m *MongoDB[T]) UpdateById(ctx context.Context, id, update interface{}, isUpsert ...bool) error
- func (m *MongoDB[T]) UpdateMany(ctx context.Context, filter map[string]interface{}, update interface{}, ...) error
- func (m *MongoDB[T]) UpdateOne(ctx context.Context, filter map[string]interface{}, update interface{}, ...) error
- type NoteAnnexDao
- func (d *NoteAnnexDao) AnnexList(ctx context.Context, uid int, noteId string) ([]*entity.NoteAnnex, error)
- func (d *NoteAnnexDao) ForeverDelete(ctx context.Context, uid int, id string) error
- func (d *NoteAnnexDao) RecoverList(ctx context.Context, uid int) ([]*entity.NoteAnnex, []*entity.Note, error)
- func (d *NoteAnnexDao) UpdateStatus(ctx context.Context, uid int, id string, status int) error
- type NoteClassDao
- func (d *NoteClassDao) Create(ctx context.Context, uid int, name string) (string, error)
- func (d *NoteClassDao) Delete(ctx context.Context, uid int, cid string) error
- func (d *NoteClassDao) GroupCount(ctx context.Context, uid int) (map[string]int, error)
- func (d *NoteClassDao) List(ctx context.Context, uid int) ([]*entity.NoteClass, error)
- func (d *NoteClassDao) MaxSort(ctx context.Context, uid int) (int, error)
- func (d *NoteClassDao) MinSort(ctx context.Context, uid int) (int, error)
- func (d *NoteClassDao) SetDefaultClass(ctx context.Context, uid int) error
- func (d *NoteClassDao) Sort(ctx context.Context, uid int, cid string, mode int) error
- func (d *NoteClassDao) Update(ctx context.Context, uid int, cid, name string) error
- type NoteDao
- func (d *NoteDao) Asterisk(ctx context.Context, uid int, noteId string, mode int) error
- func (d *NoteDao) Create(ctx context.Context, create *do.NoteCreate) (string, error)
- func (d *NoteDao) Detail(ctx context.Context, uid int, noteId string) (*entity.Note, *entity.NoteDetail, error)
- func (d *NoteDao) ForeverDelete(ctx context.Context, uid int, noteId string) error
- func (d *NoteDao) List(ctx context.Context, list *do.NoteList) ([]*entity.Note, []*entity.NoteClass, error)
- func (d *NoteDao) Move(ctx context.Context, uid int, noteId, classId string) error
- func (d *NoteDao) Tag(ctx context.Context, uid int, noteId string, tags []int) error
- func (d *NoteDao) Update(ctx context.Context, edit *do.NoteEdit) error
- func (d *NoteDao) UpdateStatus(ctx context.Context, uid int, noteId string, status int) error
- type NoteDetailDao
- type NoteTagDao
- func (d *NoteTagDao) Create(ctx context.Context, uid int, tag string) (string, error)
- func (d *NoteTagDao) Delete(ctx context.Context, uid int, tagId string) error
- func (d *NoteTagDao) List(ctx context.Context, uid int) ([]*entity.NoteTag, map[string]int, error)
- func (d *NoteTagDao) Update(ctx context.Context, uid int, tagId string, tag string) error
- type RobotDao
- func (d *RobotDao) GetLoginRobot(ctx context.Context) (*entity.Robot, error)
- func (d *RobotDao) GetRobotByUserId(ctx context.Context, userId int) (*entity.Robot, error)
- func (d *RobotDao) GetRobotList(ctx context.Context, userIds ...int) ([]*entity.Robot, error)
- func (d *RobotDao) GetRobotUserList(ctx context.Context) ([]*entity.User, error)
- type SequenceDao
- type SplitUploadDao
- type TalkRecordsDao
- func (d *TalkRecordsDao) DeleteRecord(ctx context.Context, remove *do.RemoveRecord) error
- func (d *TalkRecordsDao) FindByRecordId(ctx context.Context, recordId int) (*entity.TalkRecords, error)
- func (d *TalkRecordsDao) GetForwardRecords(ctx context.Context, uid, recordId int) ([]*entity.TalkRecords, []*entity.User, error)
- func (d *TalkRecordsDao) GetTalkRecord(ctx context.Context, recordId int) (*entity.TalkRecords, *entity.User, error)
- func (d *TalkRecordsDao) GetTalkRecords(ctx context.Context, query *do.TalkRecordsQuery) ([]*entity.TalkRecords, []*entity.User, []*entity.TalkRecordsDelete, error)
- func (d *TalkRecordsDao) HandleTalkRecords(ctx context.Context, items []*model.TalkRecordsItem) ([]*model.TalkRecordsItem, error)
- func (d *TalkRecordsDao) SearchTalkRecords()
- type TalkRecordsVoteDao
- func (d *TalkRecordsVoteDao) GetVoteAnswerUser(ctx context.Context, vid string) ([]int, error)
- func (d *TalkRecordsVoteDao) GetVoteStatistics(ctx context.Context, vid string) (*model.VoteStatistics, error)
- func (d *TalkRecordsVoteDao) SetVoteAnswerUser(ctx context.Context, vid string) ([]int, error)
- func (d *TalkRecordsVoteDao) SetVoteStatistics(ctx context.Context, vid string) (*model.VoteStatistics, error)
- type TalkSessionDao
- func (d *TalkSessionDao) BatchAddList(ctx context.Context, uid int, values map[string]int)
- func (d *TalkSessionDao) Create(ctx context.Context, create *do.TalkSessionCreate) (*entity.TalkSession, error)
- func (d *TalkSessionDao) Delete(ctx context.Context, uid int, id string) error
- func (d *TalkSessionDao) Disturb(ctx context.Context, disturb *do.TalkSessionDisturb) error
- func (d *TalkSessionDao) FindBySessionId(ctx context.Context, uid int, receiverId int, talkType int) (string, error)
- func (d *TalkSessionDao) IsDisturb(ctx context.Context, uid int, receiverId int, talkType int) bool
- func (d *TalkSessionDao) List(ctx context.Context, uid int) ([]*entity.TalkSession, []*entity.User, []*entity.Group, error)
- func (d *TalkSessionDao) OpenContext(ctx context.Context, openContext *do.TalkSessionOpenContext) error
- func (d *TalkSessionDao) Top(ctx context.Context, top *do.TalkSessionTop) error
- type UserDao
- func (d *UserDao) ChangeAccountById(ctx context.Context, id, account string) error
- func (d *UserDao) ChangePasswordByUserId(ctx context.Context, userId int, password string) error
- func (d *UserDao) CreateAccount(ctx context.Context, account *do.Account) (string, error)
- func (d *UserDao) FindAccount(ctx context.Context, account string) (*entity.Account, error)
- func (d *UserDao) FindAccountByUserId(ctx context.Context, userId int) (*entity.Account, error)
- func (d *UserDao) FindAccountsByUserId(ctx context.Context, userId int) ([]*entity.Account, error)
- func (d *UserDao) FindUserByAccount(ctx context.Context, account string) (*entity.User, error)
- func (d *UserDao) FindUserByUserId(ctx context.Context, userId int) (*entity.User, error)
- func (d *UserDao) FindUserListByUserIds(ctx context.Context, userIds []int) ([]*entity.User, error)
- func (d *UserDao) IsAccountExist(ctx context.Context, account string) bool
- func (d *UserDao) IsEmailExist(ctx context.Context, email string) bool
- func (d *UserDao) IsMobileExist(ctx context.Context, mobile string) bool
- type VipDao
Constants ¶
This section is empty.
Variables ¶
View Source
var Account = NewAccountDao()
View Source
var Contact = NewContactDao()
View Source
var ContactGroup = NewContactGroupDao()
View Source
var Emoticon = NewEmoticonDao()
View Source
var Group = NewGroupDao()
View Source
var GroupApply = NewGroupApplyDao()
View Source
var GroupMember = NewGroupMemberDao()
View Source
var GroupNotice = NewGroupNoticeDao()
View Source
var Invite = NewInviteDao()
View Source
var Note = NewNoteDao()
View Source
var NoteAnnex = NewNoteAnnexDao()
View Source
var NoteClass = NewNoteClassDao()
View Source
var NoteDetail = NewNoteDetailDao()
View Source
var NoteTag = NewNoteTagDao()
View Source
var Robot = NewRobotDao()
View Source
var Sequence = NewSequenceDao()
View Source
var SplitUpload = NewSplitUploadDao()
View Source
var TalkRecords = NewTalkRecordsDao()
View Source
var TalkRecordsVote = NewTalkRecordsVoteDao()
View Source
var TalkSession = NewTalkSessionDao()
View Source
var User = NewUserDao()
View Source
var Vip = NewVipDao()
Functions ¶
func AggregateByPage ¶
func CountDocuments ¶
func DeleteById ¶
func DeleteMany ¶
func FindByPage ¶
func UpdateById ¶
func UpdateMany ¶
Types ¶
type AccountDao ¶ added in v1.1.0
func NewAccountDao ¶ added in v1.1.0
func NewAccountDao(database ...string) *AccountDao
type ContactDao ¶
func NewContactDao ¶
func NewContactDao(database ...string) *ContactDao
func (*ContactDao) Delete ¶
func (d *ContactDao) Delete(ctx context.Context, uid, friendId int) error
删除好友
func (*ContactDao) GetContactIds ¶
func (d *ContactDao) GetContactIds(ctx context.Context, uid int) []int
func (*ContactDao) GetFriendRemark ¶
func (*ContactDao) LoadContactCache ¶
func (d *ContactDao) LoadContactCache(ctx context.Context, uid int) error
func (*ContactDao) SetFriendRemark ¶
func (*ContactDao) UpdateRemark ¶
修改好友备注
type ContactGroupDao ¶
type ContactGroupDao struct { *MongoDB[entity.ContactGroup] }
func NewContactGroupDao ¶
func NewContactGroupDao(database ...string) *ContactGroupDao
func (*ContactGroupDao) FindContactGroupList ¶
func (d *ContactGroupDao) FindContactGroupList(ctx context.Context, userId int) ([]*entity.ContactGroup, error)
type EmoticonDao ¶
func NewEmoticonDao ¶
func NewEmoticonDao(database ...string) *EmoticonDao
func (*EmoticonDao) AddUserSysEmoticon ¶
func (*EmoticonDao) DeleteCollect ¶
删除自定义表情包
func (*EmoticonDao) GetDetailsAll ¶
func (d *EmoticonDao) GetDetailsAll(ctx context.Context, uid int) ([]*entity.EmoticonItem, error)
获取系统表情包分组详情列表
func (*EmoticonDao) GetSystemEmoticonList ¶
获取系统表情包分组列表
func (*EmoticonDao) GetUserInstallIds ¶
func (d *EmoticonDao) GetUserInstallIds(ctx context.Context, uid int) []string
获取用户激活的表情包
func (*EmoticonDao) RemoveUserSysEmoticon ¶
type GroupApplyDao ¶
type GroupApplyDao struct { *MongoDB[entity.GroupApply] }
func NewGroupApplyDao ¶
func NewGroupApplyDao(database ...string) *GroupApplyDao
type GroupDao ¶
func NewGroupDao ¶
func (*GroupDao) FindGroupByGroupId ¶
根据groupId查询群信息
func (*GroupDao) FindGroupListByGroupIds ¶
func (d *GroupDao) FindGroupListByGroupIds(ctx context.Context, groupIds []int) ([]*entity.Group, error)
根据groupIds查询群列表
func (*GroupDao) RemoveMember ¶
群成员移除群聊
func (*GroupDao) SearchOvertList ¶
type GroupMemberDao ¶
type GroupMemberDao struct { *MongoDB[entity.GroupMember] }
func NewGroupMemberDao ¶
func NewGroupMemberDao(database ...string) *GroupMemberDao
func (*GroupMemberDao) CheckUserGroup ¶
func (*GroupMemberDao) CountGroupMemberNum ¶
func (d *GroupMemberDao) CountGroupMemberNum(ctx context.Context, ids []int) ([]*entity.CountGroupMember, error)
func (*GroupMemberDao) CountMemberTotal ¶
func (d *GroupMemberDao) CountMemberTotal(ctx context.Context, gid int) int64
统计群成员总数
func (*GroupMemberDao) FindByUserId ¶
func (d *GroupMemberDao) FindByUserId(ctx context.Context, gid, uid int) (*entity.GroupMember, error)
func (*GroupMemberDao) FindGroupIds ¶
func (*GroupMemberDao) FindGroupMemberListByUserId ¶
func (d *GroupMemberDao) FindGroupMemberListByUserId(ctx context.Context, userId int) ([]*entity.GroupMember, error)
func (*GroupMemberDao) GetMemberIds ¶
func (d *GroupMemberDao) GetMemberIds(ctx context.Context, groupId int) []int
获取所有群成员用户ID
func (*GroupMemberDao) GetMemberRemark ¶
获取指定群成员的备注信息
func (*GroupMemberDao) GetMembers ¶
func (d *GroupMemberDao) GetMembers(ctx context.Context, groupId int) ([]*entity.GroupMember, []*entity.User, error)
获取群聊成员列表
func (*GroupMemberDao) GetUserGroupIds ¶
func (d *GroupMemberDao) GetUserGroupIds(ctx context.Context, uid int) []int
获取用户所有群ID
func (*GroupMemberDao) IsLeader ¶
func (d *GroupMemberDao) IsLeader(ctx context.Context, gid, uid int) bool
判断是否是群主或管理员
func (*GroupMemberDao) IsMaster ¶
func (d *GroupMemberDao) IsMaster(ctx context.Context, gid, uid int) bool
判断是否是群主
func (*GroupMemberDao) SetLeaderStatus ¶
func (*GroupMemberDao) SetMuteStatus ¶
type GroupNoticeDao ¶
type GroupNoticeDao struct { *MongoDB[entity.GroupNotice] }
func NewGroupNoticeDao ¶
func NewGroupNoticeDao(database ...string) *GroupNoticeDao
func (*GroupNoticeDao) GetLatestNotice ¶
func (d *GroupNoticeDao) GetLatestNotice(ctx context.Context, groupId int) (*entity.GroupNotice, error)
获取最新公告
func (*GroupNoticeDao) GetListAll ¶
func (d *GroupNoticeDao) GetListAll(ctx context.Context, groupId int) ([]*entity.GroupNotice, []*entity.User, error)
type InviteDao ¶ added in v1.1.0
type InviteDao struct { *MongoDB[entity.InviteRecord] }
func NewInviteDao ¶ added in v1.1.0
type MongoDB ¶
func NewMongoDB ¶
func (*MongoDB[T]) AggregateByPage ¶
func (*MongoDB[T]) CountDocuments ¶
func (*MongoDB[T]) DeleteById ¶
func (*MongoDB[T]) DeleteMany ¶
func (*MongoDB[T]) FindByPage ¶
func (*MongoDB[T]) UpdateById ¶
func (*MongoDB[T]) UpdateMany ¶
type NoteAnnexDao ¶
func NewNoteAnnexDao ¶
func NewNoteAnnexDao(database ...string) *NoteAnnexDao
func (*NoteAnnexDao) ForeverDelete ¶
永久删除笔记附件
func (*NoteAnnexDao) RecoverList ¶
func (*NoteAnnexDao) UpdateStatus ¶
更新附件状态
type NoteClassDao ¶
func NewNoteClassDao ¶
func NewNoteClassDao(database ...string) *NoteClassDao
func (*NoteClassDao) GroupCount ¶
func (*NoteClassDao) SetDefaultClass ¶
func (d *NoteClassDao) SetDefaultClass(ctx context.Context, uid int) error
设置默认分类
type NoteDao ¶
func NewNoteDao ¶
func (*NoteDao) Detail ¶
func (d *NoteDao) Detail(ctx context.Context, uid int, noteId string) (*entity.Note, *entity.NoteDetail, error)
笔记详情
func (*NoteDao) ForeverDelete ¶
永久删除笔记
func (*NoteDao) List ¶
func (d *NoteDao) List(ctx context.Context, list *do.NoteList) ([]*entity.Note, []*entity.NoteClass, error)
笔记列表
type NoteDetailDao ¶
type NoteDetailDao struct { *MongoDB[entity.NoteDetail] }
func NewNoteDetailDao ¶
func NewNoteDetailDao(database ...string) *NoteDetailDao
type NoteTagDao ¶
func NewNoteTagDao ¶
func NewNoteTagDao(database ...string) *NoteTagDao
type RobotDao ¶
func NewRobotDao ¶
func (*RobotDao) GetLoginRobot ¶
获取登录机器的信息
func (*RobotDao) GetRobotByUserId ¶
根据绑定userId获取机器人的信息
func (*RobotDao) GetRobotList ¶
获取机器人列表
type SequenceDao ¶
type SequenceDao struct { *MongoDB[entity.TalkRecords] // contains filtered or unexported fields }
func NewSequenceDao ¶
func NewSequenceDao(database ...string) *SequenceDao
type SplitUploadDao ¶
type SplitUploadDao struct { *MongoDB[entity.SplitUpload] }
func NewSplitUploadDao ¶
func NewSplitUploadDao(database ...string) *SplitUploadDao
func (*SplitUploadDao) GetFile ¶
func (d *SplitUploadDao) GetFile(ctx context.Context, uid int, uploadId string) (*entity.SplitUpload, error)
func (*SplitUploadDao) GetSplitList ¶
func (d *SplitUploadDao) GetSplitList(ctx context.Context, uploadId string) ([]*entity.SplitUpload, error)
type TalkRecordsDao ¶
type TalkRecordsDao struct { *MongoDB[entity.TalkRecords] }
func NewTalkRecordsDao ¶
func NewTalkRecordsDao(database ...string) *TalkRecordsDao
func (*TalkRecordsDao) DeleteRecord ¶ added in v1.0.0
func (d *TalkRecordsDao) DeleteRecord(ctx context.Context, remove *do.RemoveRecord) error
删除消息记录
func (*TalkRecordsDao) FindByRecordId ¶
func (d *TalkRecordsDao) FindByRecordId(ctx context.Context, recordId int) (*entity.TalkRecords, error)
func (*TalkRecordsDao) GetForwardRecords ¶
func (d *TalkRecordsDao) GetForwardRecords(ctx context.Context, uid, recordId int) ([]*entity.TalkRecords, []*entity.User, error)
获取转发消息记录
func (*TalkRecordsDao) GetTalkRecord ¶
func (d *TalkRecordsDao) GetTalkRecord(ctx context.Context, recordId int) (*entity.TalkRecords, *entity.User, error)
func (*TalkRecordsDao) GetTalkRecords ¶
func (d *TalkRecordsDao) GetTalkRecords(ctx context.Context, query *do.TalkRecordsQuery) ([]*entity.TalkRecords, []*entity.User, []*entity.TalkRecordsDelete, error)
获取对话消息
func (*TalkRecordsDao) HandleTalkRecords ¶
func (d *TalkRecordsDao) HandleTalkRecords(ctx context.Context, items []*model.TalkRecordsItem) ([]*model.TalkRecordsItem, error)
type TalkRecordsVoteDao ¶
type TalkRecordsVoteDao struct { *MongoDB[entity.TalkRecordsVote] // contains filtered or unexported fields }
func NewTalkRecordsVoteDao ¶
func NewTalkRecordsVoteDao(database ...string) *TalkRecordsVoteDao
func (*TalkRecordsVoteDao) GetVoteAnswerUser ¶
func (*TalkRecordsVoteDao) GetVoteStatistics ¶
func (d *TalkRecordsVoteDao) GetVoteStatistics(ctx context.Context, vid string) (*model.VoteStatistics, error)
func (*TalkRecordsVoteDao) SetVoteAnswerUser ¶
func (*TalkRecordsVoteDao) SetVoteStatistics ¶
func (d *TalkRecordsVoteDao) SetVoteStatistics(ctx context.Context, vid string) (*model.VoteStatistics, error)
type TalkSessionDao ¶
type TalkSessionDao struct { *MongoDB[entity.TalkSession] }
func NewTalkSessionDao ¶
func NewTalkSessionDao(database ...string) *TalkSessionDao
func (*TalkSessionDao) BatchAddList ¶
批量添加会话列表
func (*TalkSessionDao) Create ¶
func (d *TalkSessionDao) Create(ctx context.Context, create *do.TalkSessionCreate) (*entity.TalkSession, error)
创建会话列表
func (*TalkSessionDao) Disturb ¶
func (d *TalkSessionDao) Disturb(ctx context.Context, disturb *do.TalkSessionDisturb) error
会话免打扰
func (*TalkSessionDao) FindBySessionId ¶
func (*TalkSessionDao) OpenContext ¶ added in v1.0.0
func (d *TalkSessionDao) OpenContext(ctx context.Context, openContext *do.TalkSessionOpenContext) error
开启/关闭上下文
func (*TalkSessionDao) Top ¶
func (d *TalkSessionDao) Top(ctx context.Context, top *do.TalkSessionTop) error
会话置顶
type UserDao ¶
func NewUserDao ¶
func (*UserDao) ChangeAccountById ¶
func (*UserDao) ChangePasswordByUserId ¶
func (*UserDao) CreateAccount ¶
func (*UserDao) FindAccount ¶
func (*UserDao) FindAccountByUserId ¶
func (*UserDao) FindAccountsByUserId ¶
func (*UserDao) FindUserByAccount ¶
根据账号查询用户
func (*UserDao) FindUserByUserId ¶
根据userId查询用户
func (*UserDao) FindUserListByUserIds ¶
根据userIds查询用户列表
func (*UserDao) IsAccountExist ¶
判断账号是否存在
func (*UserDao) IsEmailExist ¶
判断邮箱是否存在
Source Files ¶
Click to show internal directories.
Click to hide internal directories.