builtin

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package builtin reads the generated material snapshot embedded in the installed binary. Catalog, manifest and archive bytes remain a closed set.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckMaterial

func CheckMaterial(root string, material *Material) error

func CheckSelection

func CheckSelection(material *Material) error

func Extract

func Extract(material *Material) (root string, err error)

Types

type Manifest

type Manifest struct {
	SchemaVersion  int               `json:"schemaVersion"`
	SourceRevision string            `json:"sourceRevision"`
	Scope          string            `json:"scope"`
	IndexSHA256    string            `json:"indexSHA256"`
	Catalog        map[string]string `json:"catalog"`
	ArchiveSHA256  string            `json:"archiveSHA256"`
	Coverage       []tool.Object     `json:"coverage"`
	Materials      []Material        `json:"materials"`
}

func Read

func Read() (*Manifest, string, error)

type Material

type Material struct {
	Provider      string            `json:"provider"`
	CaseID        string            `json:"caseId"`
	StoryID       string            `json:"storyId"`
	Attempt       string            `json:"attempt"`
	Path          string            `json:"path"`
	Files         tool.Object       `json:"files"`
	Contracts     map[string]string `json:"contracts"`
	OfficialSDK   tool.Object       `json:"officialSDK"`
	Qualification tool.Object       `json:"qualification"`
	Plan          json.RawMessage   `json:"plan"`
}

func CheckPreparedRoot

func CheckPreparedRoot(root string) (*Material, error)

CheckPreparedRoot accepts the fixture-owned material descriptor in addition to the exact builtin payload. All payload bytes still match the snapshot.

func CheckRoot

func CheckRoot(root string) (*Material, error)

func Select

func Select(provider, id string) (*Material, string, error)

func SelectOptional

func SelectOptional(provider, id string) (*Material, string, bool, error)

SelectOptional distinguishes an absent case material from an unavailable or corrupt builtin snapshot.

type Selection

type Selection struct {
	ManifestSHA256 string    `json:"manifestSHA256"`
	Material       *Material `json:"material"`
}

Jump to

Keyboard shortcuts

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