repository

package
v0.0.0-...-69c762e Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

Repository 实现了 repository.Repository 接口

func New

New 创建一个新的 Repository

func (*Repository) Close

func (r *Repository) Close() error

Close 实现 Repository 接口的 Close 方法

func (*Repository) EnrichMessages

func (r *Repository) EnrichMessages(ctx context.Context, messages []*model.Message) error

EnrichMessages 补充消息的额外信息

func (*Repository) GetChatRoom

func (r *Repository) GetChatRoom(ctx context.Context, key string) (*model.ChatRoom, error)

func (*Repository) GetChatRooms

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

func (*Repository) GetContact

func (r *Repository) GetContact(ctx context.Context, key string) (*model.Contact, error)

func (*Repository) GetContacts

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

func (*Repository) GetMedia

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

func (*Repository) GetMessages

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

GetMessages 实现 Repository 接口的 GetMessages 方法

func (*Repository) GetSessions

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

Jump to

Keyboard shortcuts

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