Skip to content

artifacts

Resolve an approved artefact by name and version, verify who published it, and get a path on disk.

verifier, err := trust.Estate(releaseKey)         // embedded key + WKD, must agree
client, err := artifacts.New(verifier, artifacts.WithCache(cache))

path, err := client.Resolve(ctx,
    artifacts.Ref{Name: "onnxruntime", Version: "1.28.0"},
    "onnxruntime-linux-x64-1.28.0.tgz")

It exists so that every tool needing a model or a runtime does not write its own download-verify-cache loop. Three hand-rolled clients are three chances to skip the verification step, and the one that skips it fails silently — a wrong artefact loads and runs.

Start here

The shape of it

Ref an artefact and its own upstream versiononnxruntime@1.28.0, never a version of the channel
Verifier checks a detached signature over a manifest; trust.Estate requires embedded and WKD to agree
Cache stores already-verified bytes; a cache that stores unverified bytes serves them
Client.Resolve signature → digest → path

Guides

Reference

Requirements

Go 1.26.6 or newer. The root package links no cryptographic implementation — OpenPGP arrives through the trust subpackage, so importing that is the point at which a consumer opts into cryptography. Its own dependencies are afero and x/text, and a test names that set.