contenthash

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(pixiToml, pixiLock string) string

Hash computes a deterministic hash of pixi.toml + pixi.lock content. Returns "sha-" followed by the first 12 hex characters of the SHA-256 digest. This is used as the default OCI tag for publishing.

func HashBundle added in v0.10.4

func HashBundle(pixiToml, pixiLock string, assets []AssetRef) string

HashBundle is the content-addressed tag input for bundles that carry asset layers. Output matches Hash's format ("sha-" + 12 hex) so the OCI tag shape is stable for both legacy and bundle publishes. Assets are sorted by (path, digest) so slice order does not affect the tag. A nil or empty assets slice reduces to Hash's output over the same pixi files — callers can migrate a single call site without regenerating existing tags.

Types

type AssetRef added in v0.10.4

type AssetRef struct {
	Path   string
	Digest string
}

AssetRef names one asset layer for bundle hashing: bundle-relative path (forward slashes, matches OCI AnnotationTitle) plus its OCI content digest (e.g. "sha256:deadbeef…"). Used by HashBundle.

Jump to

Keyboard shortcuts

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