store

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

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

func NewMock

func NewMock(threads []*db.Thread, messages []*db.Message) *Mock

func (*Mock) CreateMessage

func (m *Mock) CreateMessage(message *db.Message) error

func (*Mock) DeleteAllThreads

func (m *Mock) DeleteAllThreads() error

func (*Mock) DeleteThread

func (m *Mock) DeleteThread(threadID string) error

func (*Mock) ListLatestThreadsPaginated

func (m *Mock) ListLatestThreadsPaginated(offset, limit int) ([]*db.Thread, error)

func (*Mock) ListMessagesByThreadIDPaginated

func (m *Mock) ListMessagesByThreadIDPaginated(threadID string, offset, limit int) ([]*db.Message, error)

func (*Mock) UpdateThreadName

func (m *Mock) UpdateThreadName(threadID, name string) error

func (*Mock) UpsertThread

func (m *Mock) UpsertThread(thread *db.Thread) error

type Store

type Store interface {
	ListLatestThreadsPaginated(offset, limit int) ([]*db.Thread, error)
	ListMessagesByThreadIDPaginated(threadID string, offset, limit int) ([]*db.Message, error)
	UpsertThread(thread *db.Thread) error
	DeleteThread(threadID string) error
	DeleteAllThreads() error
	CreateMessage(message *db.Message) error
}

Jump to

Keyboard shortcuts

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