Documentation
¶
Index ¶
- type Config
- type Message
- type Store
- func (s *Store) Begin() (*sqlx.Tx, error)
- func (s *Store) CreateMessage(message *Message) error
- func (s *Store) CreateMessageTx(tx *sqlx.Tx, message *Message) error
- func (s *Store) CreateThreadTx(tx *sqlx.Tx, thread *Thread) error
- func (s *Store) DeleteAllThreads() error
- func (s *Store) DeleteAllThreadsTx(tx *sqlx.Tx) error
- func (s *Store) DeleteThread(id string) error
- func (s *Store) DeleteThreadTx(tx *sqlx.Tx, threadID string) error
- func (s *Store) ListLatestThreadsPaginated(offset, limit int) ([]*Thread, error)
- func (s *Store) ListMessagesByThreadIDPaginated(threadID string, offset, limit int) ([]*Message, error)
- func (s *Store) SearchMessageContentPaginated(term string, offset, limit int) ([]*Message, error)
- func (s *Store) SearchThreadNamesPaginated(term string, offset, limit int) ([]*Thread, error)
- func (s *Store) UpdateThreadNameTx(tx *sqlx.Tx, threadID, name string) error
- func (s *Store) UpsertThread(thread *Thread) error
- func (s *Store) UpsertThreadTx(tx *sqlx.Tx, thread *Thread) error
- type Thread
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
ID string `db:"id"`
Role string `db:"m_role"`
Content string `db:"content"`
CreatedAt string `db:"created_at"`
ThreadID string `db:"thread_id"`
}
Message represents a chat message which is part of a thread
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) CreateMessage ¶
func (*Store) CreateMessageTx ¶
func (*Store) DeleteAllThreads ¶
func (*Store) DeleteThread ¶
func (*Store) ListLatestThreadsPaginated ¶
func (*Store) ListMessagesByThreadIDPaginated ¶
func (*Store) SearchMessageContentPaginated ¶
func (*Store) SearchThreadNamesPaginated ¶
func (*Store) UpdateThreadNameTx ¶
func (*Store) UpsertThread ¶
Click to show internal directories.
Click to hide internal directories.