Documentation
¶
Overview ¶
Package record handles persistence of certification records.
Index ¶
- type Store
- func (s *Store) AppendHistory(rec domain.CertificationRecord) error
- func (s *Store) ListAll() ([]domain.CertificationRecord, error)
- func (s *Store) Load(id domain.UnitID) (domain.CertificationRecord, error)
- func (s *Store) LoadHistory(id domain.UnitID) ([]historyEntry, error)
- func (s *Store) Save(rec domain.CertificationRecord) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages certification record files.
func (*Store) AppendHistory ¶
func (s *Store) AppendHistory(rec domain.CertificationRecord) error
AppendHistory appends a history entry for the given record. History is stored as a JSON-lines file alongside the record.
func (*Store) ListAll ¶
func (s *Store) ListAll() ([]domain.CertificationRecord, error)
ListAll returns all records in the store.
func (*Store) LoadHistory ¶
LoadHistory returns all history entries for a unit.
Click to show internal directories.
Click to hide internal directories.