database

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(ctx *ctx.Context) *Service

func (*Service) Close

func (s *Service) Close()

Close closes the database connection

func (*Service) GetChatRoom

func (s *Service) GetChatRoom(name string) *model.ChatRoom

GetChatRoom retrieves chat room information

func (*Service) GetContact

func (s *Service) GetContact(userName string) *model.Contact

GetContact retrieves contact information

func (*Service) GetDB

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

GetDB returns the underlying database

func (*Service) GetMessages

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

GetMessages retrieves messages based on criteria

func (*Service) GetSession

func (s *Service) GetSession(limit int) (*wechatdb.GetSessionResp, error)

GetSession retrieves session information

func (*Service) ListChatRoom

func (s *Service) ListChatRoom() (*wechatdb.ListChatRoomResp, error)

ListChatRoom retrieves all chat rooms

func (*Service) ListContact

func (s *Service) ListContact() (*wechatdb.ListContactResp, error)

ListContact retrieves all contacts

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