db

package
v0.0.0-...-ba7e780 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSexLabel

func GetSexLabel(sex int64) string

func IsGroupChat

func IsGroupChat(usrName string) bool

func MessageTypeLabel

func MessageTypeLabel(t int) string

func MsgTableName

func MsgTableName(usrName string, newFormat bool) string

func SplitMsgType

func SplitMsgType(t int) (baseType int, subType int)

Types

type Contact

type Contact struct {
	UsrName, Nickname, Remark, HeadImgUrl string
	Sex, Type                             int64
}

type GroupContact

type GroupContact struct {
	UsrName, Nickname, HeadImgUrl, MemList, AdminList string
}

type Message

type Message struct {
	MesLocalID, MesSvrID, MsgCreateTime, MsgStatus, MsgImgStatus, MsgSeq int64
	MsgContent, MsgSource, MsgVoiceText                                  string
	MessageType, MesDes                                                  int
}

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store provides access to WeChat's encrypted SQLite databases.

func NewStore

func NewStore(path, key string) *Store

func NewStoreWithKeys

func NewStoreWithKeys(path string, keys map[string]string, fallbackKey string) *Store

func (*Store) Close

func (s *Store) Close()

func (*Store) FindMessageDB

func (s *Store) FindMessageDB(usrName string) (string, string, error)

func (*Store) ListChatTables

func (s *Store) ListChatTables() (map[string]string, error)

func (*Store) ListContacts

func (s *Store) ListContacts() ([]Contact, error)

func (*Store) ListGroups

func (s *Store) ListGroups() ([]GroupContact, error)

func (*Store) ReadMessages

func (s *Store) ReadMessages(usrName string, afterID int64, limit int) ([]Message, error)

func (*Store) ReadMessagesDesc

func (s *Store) ReadMessagesDesc(usrName string, limit int) ([]Message, error)

func (*Store) SearchContacts

func (s *Store) SearchContacts(keyword string) ([]Contact, error)

func (*Store) SearchGroups

func (s *Store) SearchGroups(keyword string) ([]GroupContact, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL