Help us shape the future of Go! Take the 2026 Go Developer Survey

storage

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Overview

Package storage owns transactional SQLite persistence.

Index

Constants

View Source
const KeepWorkingTreeSnapshots = 10

KeepWorkingTreeSnapshots bounds informational working-tree snapshots per repository. Commit snapshots are retained because plans pin them.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func Open

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

func (*Store) Artifact

func (s *Store) Artifact(ctx context.Context, id string) (string, json.RawMessage, error)

Artifact reads a persisted evidence or report artifact; callers validate its kind.

func (*Store) Close

func (s *Store) Close() error

func (*Store) Finding

func (s *Store) Finding(ctx context.Context, id string) (model.Finding, error)

func (*Store) SaveArtifact

func (s *Store) SaveArtifact(ctx context.Context, id, kind string, value any) error

func (*Store) SaveEvidence

func (s *Store) SaveEvidence(ctx context.Context, id string, value any) error

SaveEvidence is insert-only: an existing proof cannot be overwritten by a new value.

func (*Store) SaveFindings

func (s *Store) SaveFindings(ctx context.Context, findings []model.Finding) error

func (*Store) SaveSnapshot

func (s *Store) SaveSnapshot(ctx context.Context, snap model.Snapshot) error

func (*Store) Snapshot

func (s *Store) Snapshot(ctx context.Context, repository, revision string) (model.Snapshot, error)

Jump to

Keyboard shortcuts

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