Documentation
¶
Overview ¶
Package evidencedb owns a private SQLite evidence store for the broker.
Index ¶
- type Store
- func (s *Store) Close() error
- func (s *Store) GetEvidenceTombstone(ctx context.Context, ref evidence.Ref) (proof evidence.Tombstone, err error)
- func (s *Store) LoadEvidence(ctx context.Context, ref evidence.Ref) (a evidence.Artifact, err error)
- func (s *Store) SaveEvidence(ctx context.Context, a evidence.Artifact) error
- func (s *Store) TombstoneEvidence(ctx context.Context, ref evidence.Ref, reason string) 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 exposes only evidence persistence and audit. The service repository supplies authorization. Close waits for active operations before releasing ownership; this type must not be copied after use.
func Open ¶
Open opens a root-owned database in an existing private directory. It rejects aliases, unsafe sidecars, foreign application/format headers and another owner. A separate ownership file covers startup; SQLite also uses exclusive locking. New files receive the evidence identity before Grove enables WAL. Migrations reuse Cortex's SQLite store. The trusted owner must not replace files during use; local SQLite storage must support file locks and synchronous writes.
func (*Store) GetEvidenceTombstone ¶
func (s *Store) GetEvidenceTombstone(ctx context.Context, ref evidence.Ref) (proof evidence.Tombstone, err error)
GetEvidenceTombstone returns raw metadata for the service's audit boundary.
func (*Store) LoadEvidence ¶
func (s *Store) LoadEvidence(ctx context.Context, ref evidence.Ref) (a evidence.Artifact, err error)
LoadEvidence reads an exact scoped binding through the root store.
func (*Store) SaveEvidence ¶
SaveEvidence preserves the root store's immutable write and tombstone fence.