Documentation
¶
Overview ¶
Package persistence provides storage for review sessions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSessionNotFound = errors.New("session not found")
ErrSessionNotFound is returned by LoadLatest when no matching session exists.
Functions ¶
This section is empty.
Types ¶
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
FileStore implements Store by persisting sessions as JSON files on disk.
func NewFileStore ¶
NewFileStore creates a FileStore using the default session directory.
func (*FileStore) LoadLatest ¶
func (fs *FileStore) LoadLatest(repoPath, branchName string, diffSource model.DiffSource) (*model.ReviewSession, error)
LoadLatest finds and loads the most recent session matching the given context.
type Store ¶
type Store interface {
Save(session *model.ReviewSession) (string, error)
LoadLatest(repoPath, branchName string, diffSource model.DiffSource) (*model.ReviewSession, error)
}
Store defines the interface for session persistence.
Click to show internal directories.
Click to hide internal directories.