Documentation
¶
Index ¶
- Constants
- Variables
- type Contact
- func (c *Contact) GetChatRoom(name string) *model.ChatRoom
- func (c *Contact) GetContact(key string) *model.Contact
- func (c *Contact) GetSession(limit int) []*model.Session
- func (c *Contact) ListChatRoom() ([]*model.ChatRoom, error)
- func (c *Contact) ListContact() ([]*model.Contact, error)
- func (c *Contact) MessageFillInfo(msg *model.Message)
- type DB
- func (w *DB) Close() error
- func (w *DB) GetChatRoom(userName string) *model.ChatRoom
- func (w *DB) GetContact(userName string) *model.Contact
- func (w *DB) GetMessages(start, end time.Time, talker string, limit, offset int) ([]*model.Message, error)
- func (w *DB) GetSession(limit int) (*GetSessionResp, error)
- func (w *DB) Initialize() error
- func (w *DB) ListChatRoom() (*ListChatRoomResp, error)
- func (w *DB) ListContact() (*ListContactResp, error)
- type GetSessionResp
- type ListChatRoomResp
- type ListContactResp
- type Message
- type MsgDBInfo
Constants ¶
View Source
const ( MessageFileV3 = "^MSG([0-9]?[0-9])?\\.db$" MessageFileV4 = "^messages_([0-9]?[0-9])+\\.db$" )
Variables ¶
View Source
var ( ContactFileV3 = "^MicroMsg.db$" ContactFileV4 = "contact.db$" )
Functions ¶
This section is empty.
Types ¶
type Contact ¶
type Contact struct {
Contact map[string]*model.Contact // 好友和群聊信息,Key UserName
ChatRoom map[string]*model.ChatRoom // 群聊信息,Key UserName
Sessions []*model.Session // 历史会话,按时间倒序
// Quick Search
ChatRoomUsers map[string]*model.Contact // 群聊成员信息,Key UserName
Alias2Contack map[string]*model.Contact // 别名到联系人的映射
Remark2Contack map[string]*model.Contact // 备注名到联系人的映射
NickName2Contack map[string]*model.Contact // 昵称到联系人的映射
// contains filtered or unexported fields
}
func (*Contact) MessageFillInfo ¶
type DB ¶
func (*DB) GetMessages ¶
func (*DB) GetSession ¶
func (w *DB) GetSession(limit int) (*GetSessionResp, error)
func (*DB) Initialize ¶
func (*DB) ListChatRoom ¶
func (w *DB) ListChatRoom() (*ListChatRoomResp, error)
func (*DB) ListContact ¶
func (w *DB) ListContact() (*ListContactResp, error)
type GetSessionResp ¶
type ListChatRoomResp ¶
type ListContactResp ¶
Click to show internal directories.
Click to hide internal directories.