baseutils

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalizeDefinition

func CanonicalizeDefinition(in spec.CanonicalDefinition) (spec.CanonicalDefinition, error)

CanonicalizeDefinition normalizes portable JSON fields and calculates the digest of the immutable definition envelope. A supplied non-empty digest must match the calculated value.

func CanonicalizeJSON

func CanonicalizeJSON(raw []byte) ([]byte, error)

CanonicalizeJSON returns deterministic JSON bytes. Objects are ordered by UTF-8 key order, arrays retain their input order, duplicate object keys are rejected, and JSON numbers are normalized as exact decimal values without passing through IEEE-754 binary64. This is a stable Artifact Store encoding, not a claim of general-purpose JCS conformance.

func DigestBytes

func DigestBytes(value []byte) spec.Digest

Types

This section is empty.

Jump to

Keyboard shortcuts

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