receipt

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package receipt is the REST service wrapper around internal/receipt: it builds a reproducibility receipt for a run and verifies a committed receipt against a run's current persisted state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service wraps the internal receipt build/verify layer for REST controllers.

func New

func New(ctx context.Context) *Service

New creates a Service with the default DB connection.

func (*Service) Build

func (s *Service) Build(runID uuid.UUID) (*ireceipt.Receipt, error)

Build re-derives the reproducibility receipt for a run from persisted state.

func (*Service) Verify

func (s *Service) Verify(committed *ireceipt.Receipt) (*ireceipt.VerifyResult, error)

Verify re-derives the receipt for committed.RunID and reports drift against the committed receipt.

func (*Service) WithDatabase

func (s *Service) WithDatabase(conn *gorm.DB) *Service

WithDatabase returns a copy of the Service using the given connection; used in tests to inject an in-memory database without touching the singleton.

Jump to

Keyboard shortcuts

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