darwinv3

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageFilePattern  = "^msg_([0-9]?[0-9])?\\.db$"
	ContactFilePattern  = "^wccontact_new2\\.db$"
	ChatRoomFilePattern = "^group_new\\.db$"
	SessionFilePattern  = "^session_new\\.db$"
	MediaFilePattern    = "^hldata\\.db$"
)

Variables

This section is empty.

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

Close 实现关闭数据库连接的方法

func (*DataSource) GetChatRooms

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

GetChatRooms 实现获取群聊信息的方法

func (*DataSource) GetContacts

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

GetContacts 实现获取联系人信息的方法

func (*DataSource) GetMedia added in v0.0.5

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, limit, offset int) ([]*model.Message, error)

GetMessages 实现获取消息的方法

func (*DataSource) GetSessions

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

GetSessions 实现获取会话信息的方法

Jump to

Keyboard shortcuts

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