patternidentity

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package patternidentity defines bounded Pattern identity and a fixed hash domain only. It does not parse JSON, verify sources or depend on execution.

Index

Constants

View Source
const ExecutionDomain = "nb1-pattern-execution/experimental-v1"
View Source
const RecordContract = "nb1-pattern-record/experimental-v2"

Variables

View Source
var ErrInvalid = errors.New("invalid pattern identity")

Functions

func HashExecutionCanonical

func HashExecutionCanonical(canonical []byte) string

HashExecutionCanonical hashes the given bytes after exactly one domain LF. It intentionally does not validate that bytes are canonical, trusted or even JSON. Callers must establish those properties; this is not a verifier.

func ValidateDigest

func ValidateDigest(value string) error

ValidateDigest checks the shared revision/execution SHA spelling only. A syntactically valid digest does not prove source integrity or admission.

func ValidateRef

func ValidateRef(ref Ref) error

Types

type Ref

type Ref struct {
	RecordContract string `json:"record_contract"`
	ID             string `json:"id"`
	Revision       string `json:"revision"`
}

Jump to

Keyboard shortcuts

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