context

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBudget int64 = 256 * 1024

Variables

This section is empty.

Functions

func Anchors

func Anchors(spec Spec) []string

func Canonical

func Canonical(pack Pack) []byte

func CheckAnchors

func CheckAnchors(pack Pack) (lost int)

func Digest

func Digest(pack Pack) string

func EmitAnchor

func EmitAnchor(root string, lost int)

func EmitHandoff

func EmitHandoff(root string, included int)

func EmitPack

func EmitPack(root string, pack Pack, coverage, required, included int)

Types

type Finding

type Finding struct {
	Code string `json:"code"`
}

func (Finding) Error

func (err Finding) Error() string

type Item

type Item struct {
	ID       string `json:"id"`
	Path     string `json:"path"`
	Bytes    int64  `json:"bytes"`
	Required bool   `json:"required"`
	SHA256   string `json:"sha256"`
}

type Pack

type Pack struct {
	Items   []Item   `json:"items"`
	Digest  string   `json:"digest"`
	Bytes   int64    `json:"bytes"`
	Anchors []string `json:"anchors"`
}

func PackRoot

func PackRoot(root string, spec Spec) (Pack, error)

type Spec

type Spec struct {
	Objective      string
	Acceptance     []string
	AllowedPaths   []string
	ForbiddenPaths []string
	RequiredPaths  []string
	Verification   [][]string
	BudgetBytes    int64
}

Jump to

Keyboard shortcuts

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