Documentation
¶
Overview ¶
Package upgradebundle loads bounded offline release evidence through the signature-backed trust factories. Bundle paths and inventory indexes are transport hints, never previous-version or trust-root authority.
Index ¶
- Constants
- func CopyNightlyPlatformRelease(ctx context.Context, directory, releasesDirectory string, ...) (releasetrust.VerifiedRelease, error)
- func CopyNightlyRelease(ctx context.Context, directory, releasesDirectory string, ...) (releasetrust.VerifiedRelease, error)
- func VerifyNightlyDirectory(ctx context.Context, directory string, snapshot releasetrust.Snapshot) (releasetrust.VerifiedRelease, error)
- func VerifyNightlyPlatformDirectory(ctx context.Context, directory string, snapshot releasetrust.Snapshot, ...) (releasetrust.VerifiedRelease, error)
- type Bundle
- func (b Bundle) GenesisManifests(engine releaseidentity.Engine) []upgradecompat.InstalledSource
- func (b Bundle) MatchBuild(embeddedDeclaration []byte) (upgradecompat.VerifiedNode, error)
- func (b Bundle) MaterialDigest() releaseidentity.Digest
- func (b Bundle) Plan(source upgradecompat.InstalledSource, target releaseidentity.Identity) (upgradecompat.Plan, error)
- func (b Bundle) ReferencedReleases(engine releaseidentity.Engine) ([]releaseidentity.Identity, error)
- func (b Bundle) Release(identity releaseidentity.Identity) (releasetrust.VerifiedRelease, error)
- func (b Bundle) Snapshot() releasetrust.Snapshot
- func (b Bundle) Sources(engine releaseidentity.Engine) []upgradecompat.InstalledSource
- func (b Bundle) Valid() bool
- type Index
- type ReleaseEntry
Constants ¶
const IndexFormat = "hikyo.dev/offline-upgrade-bundle/v1"
const PlatformIndexFormat = "hikyo.dev/offline-upgrade-bundle/v2"
Variables ¶
This section is empty.
Functions ¶
func CopyNightlyPlatformRelease ¶
func CopyNightlyPlatformRelease(ctx context.Context, directory, releasesDirectory string, snapshot releasetrust.Snapshot, platform string) (releasetrust.VerifiedRelease, error)
CopyNightlyPlatformRelease retains only the verified platform selection.
func CopyNightlyRelease ¶
func CopyNightlyRelease(ctx context.Context, directory, releasesDirectory string, snapshot releasetrust.Snapshot) (releasetrust.VerifiedRelease, error)
CopyNightlyRelease writes beneath a private assembler staging directory. Payloads on the same filesystem share storage with the download cache. They must be treated as immutable; removing either directory keeps the other valid. Each payload is rehashed through the verified envelope. The caller authenticates the complete staged bundle before atomic public publication.
func VerifyNightlyDirectory ¶
func VerifyNightlyDirectory(ctx context.Context, directory string, snapshot releasetrust.Snapshot) (releasetrust.VerifiedRelease, error)
VerifyNightlyDirectory authenticates a complete flat GitHub release download. Only the manifest and its signature are excluded from the signed inventory. Policy and Sigstore roots are payloads too; the recovery-signed snapshot must independently authorize their exact policy digest.
func VerifyNightlyPlatformDirectory ¶
func VerifyNightlyPlatformDirectory(ctx context.Context, directory string, snapshot releasetrust.Snapshot, platform string) (releasetrust.VerifiedRelease, error)
VerifyNightlyPlatformDirectory verifies the closed selection for one platform.
Types ¶
type Bundle ¶
type Bundle struct {
// contains filtered or unexported fields
}
Bundle holds immutable authenticated documents, not mutable downloaded artifact paths. The executor must separately pin and verify each payload.
func Load ¶
func Load(ctx context.Context, directory string, pinned releasetrust.PinnedTrust, floor releaseidentity.SnapshotFloor) (Bundle, error)
Load uses caller-pinned installation/build trust and persisted rollback floors. A root or public key packaged as an archive member cannot override it. Only fixed filenames below digest-named release/bridge directories are read.
func (Bundle) GenesisManifests ¶
func (b Bundle) GenesisManifests(engine releaseidentity.Engine) []upgradecompat.InstalledSource
GenesisManifests exposes signed candidate declarations for inspection. The caller must compare every candidate against the actual database catalog and goose history; this list itself does not identify the installed source.
func (Bundle) MatchBuild ¶
func (b Bundle) MatchBuild(embeddedDeclaration []byte) (upgradecompat.VerifiedNode, error)
MatchBuild binds the embedded declaration's exact bytes to an authenticated release envelope. The manifest's own digest cannot be embedded recursively.
func (Bundle) MaterialDigest ¶
func (b Bundle) MaterialDigest() releaseidentity.Digest
MaterialDigest binds every loaded public document, including index and signatures. Authenticated manifests independently bind loaded payload bytes.
func (Bundle) Plan ¶
func (b Bundle) Plan(source upgradecompat.InstalledSource, target releaseidentity.Identity) (upgradecompat.Plan, error)
func (Bundle) ReferencedReleases ¶
func (b Bundle) ReferencedReleases(engine releaseidentity.Engine) ([]releaseidentity.Identity, error)
ReferencedReleases returns a bounded, deterministic set of exact release identities named by authenticated source edges and recovery bridges for this engine. References are discovery hints, not authenticated release envelopes or an execution route. Fetch exact matching proofs and call Plan after inspection.
func (Bundle) Release ¶
func (b Bundle) Release(identity releaseidentity.Identity) (releasetrust.VerifiedRelease, error)
func (Bundle) Snapshot ¶
func (b Bundle) Snapshot() releasetrust.Snapshot
func (Bundle) Sources ¶
func (b Bundle) Sources(engine releaseidentity.Engine) []upgradecompat.InstalledSource
Sources lists independently authenticated inspection candidates. The caller must measure the actual database, then call Plan with that observed source.
type Index ¶
type Index struct {
Format string `json:"format"`
NightlyPlatform string `json:"nightly_platform,omitempty"`
PrimaryKeyIDs []string `json:"primary_key_ids"`
Releases []ReleaseEntry `json:"releases"`
Bridges []releaseidentity.Digest `json:"bridges"`
}
type ReleaseEntry ¶
type ReleaseEntry struct {
Profile releaseidentity.Profile `json:"profile"`
ManifestSHA256 releaseidentity.Digest `json:"manifest_sha256"`
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package testfixture writes ephemeral, genuinely signed offline bundles for integration tests.
|
Package testfixture writes ephemeral, genuinely signed offline bundles for integration tests. |