Documentation
¶
Index ¶
- func NewMessageStorage() api.MessageStorage
- type FileStorage
- func (l *FileStorage) FileCommit(ctx context.Context, threadID api.ThreadID, origin api.Origin, name string) error
- func (l *FileStorage) FileDelete(ctx context.Context, threadID api.ThreadID, origin api.Origin, name string) error
- func (l *FileStorage) FileDeleteAll(ctx context.Context, threadID api.ThreadID) error
- func (l *FileStorage) FileDiscardDrafts(ctx context.Context, threadID api.ThreadID, origin api.Origin, keep []string) error
- func (l *FileStorage) FileList(ctx context.Context, threadID api.ThreadID, origin api.Origin) iter.Seq2[api.File, error]
- func (l *FileStorage) FilePut(ctx context.Context, threadID api.ThreadID, origin api.Origin, name string, ...) (api.File, error)
- func (l *FileStorage) FileRead(ctx context.Context, threadID api.ThreadID, origin api.Origin, name string, ...) (io.ReadCloser, error)
- func (l *FileStorage) FileStat(ctx context.Context, threadID api.ThreadID, origin api.Origin, name string) (api.File, error)
- func (l *FileStorage) Remove() error
- func (l *FileStorage) WorkspaceDelete(threadID api.ThreadID) error
- func (l *FileStorage) WorkspaceOpen(threadID api.ThreadID) (api.Workspace, error)
- type MessageStorage
- func (l *MessageStorage) CompactionCreate(ctx context.Context, thread api.ThreadID, seq api.Seq, ...) (api.Seq, error)
- func (l *MessageStorage) CompactionGet(ctx context.Context, thread api.ThreadID, beforeTail api.RoundID) (api.Compaction, error)
- func (l *MessageStorage) RecordAdd(ctx context.Context, thread api.ThreadID, seq api.Seq, origin api.RoundID, ...) (api.RecordID, api.Seq, error)
- func (l *MessageStorage) RecordList(ctx context.Context, thread api.ThreadID) ([]api.Record, error)
- func (l *MessageStorage) RecordPin(ctx context.Context, thread api.ThreadID, seq api.Seq, pin api.RoundID, ...) (api.Seq, error)
- func (l *MessageStorage) RoundAbort(ctx context.Context, thread api.ThreadID, seq api.Seq, round api.RoundID, ...) (api.Seq, error)
- func (l *MessageStorage) RoundAfter(ctx context.Context, thread api.ThreadID, start api.RoundID, limit int) ([]api.Round, error)
- func (l *MessageStorage) RoundBefore(ctx context.Context, thread api.ThreadID, start api.RoundID, limit int) ([]api.Round, error)
- func (l *MessageStorage) RoundError(ctx context.Context, thread api.ThreadID, seq api.Seq, round api.RoundID, ...) (api.Seq, error)
- func (l *MessageStorage) RoundInput(ctx context.Context, thread api.ThreadID, seq api.Seq, input api.Input) (api.RoundID, api.Seq, error)
- func (l *MessageStorage) RoundOk(ctx context.Context, thread api.ThreadID, seq api.Seq, round api.RoundID, ...) (api.Seq, error)
- func (l *MessageStorage) RoundRange(ctx context.Context, thread api.ThreadID, start api.RoundID, end api.RoundID) iter.Seq2[api.Round, error]
- func (l *MessageStorage) RoundRefuse(ctx context.Context, thread api.ThreadID, seq api.Seq, round api.RoundID, ...) (api.Seq, error)
- func (l *MessageStorage) RoundResult(ctx context.Context, thread api.ThreadID, seq api.Seq, round api.RoundID, ...) (api.Seq, error)
- func (l *MessageStorage) RoundSearch(ctx context.Context, thread api.ThreadID, exclude bool, query string, ...) ([]api.Hit, error)
- func (l *MessageStorage) ThreadBump(ctx context.Context, thread api.ThreadID) (api.Thread, error)
- func (l *MessageStorage) ThreadClone(ctx context.Context, source api.ThreadID, target api.ThreadID) (api.Thread, error)
- func (l *MessageStorage) ThreadCreate(ctx context.Context, id api.ThreadID) (api.Thread, error)
- func (l *MessageStorage) ThreadCut(ctx context.Context, id api.ThreadID, seq api.Seq, round api.RoundID) (api.Seq, error)
- func (l *MessageStorage) ThreadDelete(ctx context.Context, id api.ThreadID) error
- func (l *MessageStorage) ThreadGet(ctx context.Context, thread api.ThreadID) (api.Thread, error)
- func (l *MessageStorage) ThreadList(ctx context.Context, from, to time.Time, asc bool, limit int, name string) ([]api.Thread, error)
- func (l *MessageStorage) ThreadRename(ctx context.Context, id api.ThreadID, seq api.Seq, name string) (api.Seq, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMessageStorage ¶
func NewMessageStorage() api.MessageStorage
Types ¶
type FileStorage ¶
type FileStorage struct {
// contains filtered or unexported fields
}
func NewFileStorage ¶
func NewFileStorage(dir string) (*FileStorage, error)
func OpenFileStorage ¶
func OpenFileStorage(base string) (*FileStorage, error)
func (*FileStorage) FileCommit ¶
func (*FileStorage) FileDelete ¶
func (*FileStorage) FileDeleteAll ¶
func (*FileStorage) FileDiscardDrafts ¶
func (*FileStorage) Remove ¶
func (l *FileStorage) Remove() error
func (*FileStorage) WorkspaceDelete ¶
func (l *FileStorage) WorkspaceDelete(threadID api.ThreadID) error
func (*FileStorage) WorkspaceOpen ¶
type MessageStorage ¶
type MessageStorage struct {
// contains filtered or unexported fields
}
func (*MessageStorage) CompactionCreate ¶
func (*MessageStorage) CompactionGet ¶
func (l *MessageStorage) CompactionGet(ctx context.Context, thread api.ThreadID, beforeTail api.RoundID) (api.Compaction, error)
func (*MessageStorage) RecordList ¶
func (*MessageStorage) RoundAbort ¶
func (*MessageStorage) RoundAfter ¶
func (*MessageStorage) RoundBefore ¶
func (*MessageStorage) RoundError ¶
func (*MessageStorage) RoundInput ¶
func (*MessageStorage) RoundRange ¶
func (*MessageStorage) RoundRefuse ¶
func (*MessageStorage) RoundResult ¶
func (*MessageStorage) RoundSearch ¶
func (*MessageStorage) ThreadBump ¶
func (*MessageStorage) ThreadClone ¶
func (*MessageStorage) ThreadCreate ¶
func (*MessageStorage) ThreadDelete ¶
func (*MessageStorage) ThreadList ¶
Click to show internal directories.
Click to hide internal directories.