v4

package
v0.0.0-...-8be0883 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Message = "message"
	Contact = "contact"
	Session = "session"
	Media   = "media"
	Voice   = "voice"
)

Variables

View Source
var Groups = []*dbm.Group{
	{
		Name:      Message,
		Pattern:   `^message_([0-9]?[0-9])?\.db$`,
		BlackList: []string{},
	},
	{
		Name:      Contact,
		Pattern:   `^contact\.db$`,
		BlackList: []string{},
	},
	{
		Name:      Session,
		Pattern:   `session\.db$`,
		BlackList: []string{},
	},
	{
		Name:      Media,
		Pattern:   `^hardlink\.db$`,
		BlackList: []string{},
	},
	{
		Name:      Voice,
		Pattern:   `^media_([0-9]?[0-9])?\.db$`,
		BlackList: []string{},
	},
}

Functions

This section is empty.

Types

type DataSource

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

func New

func New(path string) (*DataSource, error)

func (*DataSource) Close

func (ds *DataSource) Close() error

func (*DataSource) GetChatRooms

func (ds *DataSource) GetChatRooms(ctx context.Context, key string, limit, offset int) ([]*model.ChatRoom, error)

群聊

func (*DataSource) GetContacts

func (ds *DataSource) GetContacts(ctx context.Context, key string, limit, offset int) ([]*model.Contact, error)

联系人

func (*DataSource) GetMedia

func (ds *DataSource) GetMedia(ctx context.Context, _type string, key string) (*model.Media, error)

func (*DataSource) GetMessages

func (ds *DataSource) GetMessages(ctx context.Context, startTime, endTime time.Time, talker string, sender string, keyword string, limit, offset int) ([]*model.Message, error)

func (*DataSource) GetSessions

func (ds *DataSource) GetSessions(ctx context.Context, key string, limit, offset int) ([]*model.Session, error)

最近会话

func (*DataSource) GetVoice

func (ds *DataSource) GetVoice(ctx context.Context, key string) (*model.Media, error)

func (*DataSource) IsExist

func (ds *DataSource) IsExist(_db string, table string) bool

func (*DataSource) SetCallback

func (ds *DataSource) SetCallback(group string, callback func(event fsnotify.Event) error) error

type MessageDBInfo

type MessageDBInfo struct {
	FilePath  string
	StartTime time.Time
	EndTime   time.Time
}

MessageDBInfo 存储消息数据库的信息

Jump to

Keyboard shortcuts

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