Documentation
¶
Overview ¶
Package db provides database connectivity and migration logic for norma.
Package db provides database connectivity and migration logic for norma.
Index ¶
- func Open(ctx context.Context, path string) (*sql.DB, error)
- type Event
- type StepRecord
- type Store
- func (s *Store) CommitStep(ctx context.Context, step StepRecord, events []Event, update Update) error
- func (s *Store) CreateRun(ctx context.Context, runID, goal, runDir string, iteration int) error
- func (s *Store) DB() *sql.DB
- func (s *Store) RunStatus(ctx context.Context, runID string) (string, error)
- func (s *Store) UpdateRun(ctx context.Context, runID string, update Update, event *Event) error
- type Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type StepRecord ¶
type StepRecord struct {
RunID string
StepIndex int
Role string
Iteration int
Status string
StepDir string
StartedAt string
EndedAt string
Summary string
}
StepRecord represents a committed step in the database.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store provides persistence for runs and steps.
func (*Store) CommitStep ¶
func (s *Store) CommitStep(ctx context.Context, step StepRecord, events []Event, update Update) error
CommitStep inserts the step record, events, and updates the run in one transaction.
Click to show internal directories.
Click to hide internal directories.