Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleKey ¶
type BundleKey = string
BundleKey is a canonical key like "php:8.4.6:linux:x86_64:nts".
func ExtBundleKey ¶
ExtBundleKey constructs a canonical key for an extension bundle.
func PHPBundleKey ¶
PHPBundleKey constructs a canonical key for a PHP core bundle.
func ToolBundleKey ¶
ToolBundleKey constructs a canonical key for a tool bundle.
type Digest ¶
type Digest = string
Digest is a content-addressed SHA-256 digest like "sha256:abc123".
type Entry ¶ added in v1.2.0
Entry pairs a bundle digest with the spec_hash of the inputs that produced it. Empty SpecHash means the entry predates the spec_hash era and is grandfathered (treated as fresh until something forces a rebuild).
type Lockfile ¶
type Lockfile struct {
SchemaVersion int `json:"schema_version"`
GeneratedAt time.Time `json:"generated_at"`
Bundles map[BundleKey]Entry `json:"bundles"`
}
Lockfile represents the bundles.lock JSON structure.
func Parse ¶
Parse parses a lockfile from JSON bytes. Accepts schema v1 (values are bare digest strings) and v2 (values are Entry objects). v1 entries are migrated in memory to Entry{Digest: <string>, SpecHash: ""}.
func (*Lockfile) Lookup ¶
Lookup returns the digest for a bundle key, or false if not found. Kept for backward compatibility with existing callers that only need the digest.
func (*Lockfile) LookupEntry ¶ added in v1.2.0
LookupEntry returns the full Entry for a bundle key, or false if not found.
func (*Lockfile) Set ¶
Set adds or updates a bundle entry with digest only; spec_hash becomes empty. Prefer SetEntry for callers that know the spec_hash.