record

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package record handles persistence of certification records.

Index

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 NewStore

func NewStore(dir string) *Store

NewStore creates a new record store rooted at the given directory.

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) Load

Load reads a certification record for the given unit.

func (*Store) LoadHistory

func (s *Store) LoadHistory(id domain.UnitID) ([]historyEntry, error)

LoadHistory returns all history entries for a unit.

func (*Store) Save

func (s *Store) Save(rec domain.CertificationRecord) error

Save writes a certification record to the store.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL