Documentation
¶
Overview ¶
Package store provides SQLite-backed persistence for workflow run data.
Index ¶
- func DefaultPath() (string, error)
- type Store
- func (s *Store) Close() error
- func (s *Store) IncompleteRunIDs() ([]int64, error)
- func (s *Store) LoadRunDetail(runID int64) (*model.RunDetail, error)
- func (s *Store) LoadRunDetails(workflowID int64, since time.Time) ([]model.RunDetail, error)
- func (s *Store) RunsSince(workflowID int64, since time.Time) ([]model.WorkflowRun, error)
- func (s *Store) SaveRunDetail(d *model.RunDetail) error
- func (s *Store) SaveRunDetails(details []model.RunDetail) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultPath ¶
DefaultPath returns the default database path (~/.cache/ci-snitch/data.db).
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store persists and queries workflow run data in SQLite.
func (*Store) IncompleteRunIDs ¶
IncompleteRunIDs returns IDs of runs that are not yet completed.
func (*Store) LoadRunDetail ¶
LoadRunDetail loads a fully hydrated run detail from the store.
func (*Store) LoadRunDetails ¶
LoadRunDetails loads all completed run details for a workflow since the given time.
func (*Store) SaveRunDetail ¶
SaveRunDetail persists a run and its jobs and steps. Uses INSERT OR REPLACE so re-fetched runs (e.g. previously in-progress) are updated.
Click to show internal directories.
Click to hide internal directories.