evidencedb

package
v1.10.4 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package evidencedb owns a private SQLite evidence store for the broker.

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

func Open(ctx context.Context, name string) (*Store, error)

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

func (s *Store) Close() error

Close closes SQLite before releasing ownership and is safe to repeat.

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

func (s *Store) SaveEvidence(ctx context.Context, a evidence.Artifact) error

SaveEvidence preserves the root store's immutable write and tombstone fence.

func (*Store) TombstoneEvidence

func (s *Store) TombstoneEvidence(ctx context.Context, ref evidence.Ref, reason string) error

TombstoneEvidence deletes bytes and durably reserves the evidence identity.

Jump to

Keyboard shortcuts

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