database

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateInit = iota
	StateDecrypting
	StateReady
	StateError
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.0.20

type Config interface {
	GetWorkDir() string
	GetPlatform() string
	GetVersion() int
}

type Service

type Service struct {
	State    int
	StateMsg string
	// contains filtered or unexported fields
}

func NewService

func NewService(conf Config) *Service

func (*Service) Close

func (s *Service) Close()

Close closes the database connection

func (*Service) GetChatRooms added in v0.0.2

func (s *Service) GetChatRooms(key string, limit, offset int) (*wechatdb.GetChatRoomsResp, error)

func (*Service) GetContacts added in v0.0.2

func (s *Service) GetContacts(key string, limit, offset int) (*wechatdb.GetContactsResp, error)

func (*Service) GetDB

func (s *Service) GetDB() *wechatdb.DB

func (*Service) GetMedia added in v0.0.5

func (s *Service) GetMedia(_type string, key string) (*model.Media, error)

func (*Service) GetMessages

func (s *Service) GetMessages(start, end time.Time, talker string, sender string, keyword string, limit, offset int) ([]*model.Message, error)

func (*Service) GetSessions added in v0.0.2

func (s *Service) GetSessions(key string, limit, offset int) (*wechatdb.GetSessionsResp, error)

GetSession retrieves session information

func (*Service) SetDecrypting added in v0.0.20

func (s *Service) SetDecrypting()

func (*Service) SetError added in v0.0.20

func (s *Service) SetError(msg string)

func (*Service) SetInit added in v0.0.20

func (s *Service) SetInit()

func (*Service) SetReady added in v0.0.20

func (s *Service) SetReady()

func (*Service) Start

func (s *Service) Start() error

func (*Service) Stop

func (s *Service) Stop() error

Jump to

Keyboard shortcuts

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