registryspec

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Code generated by strictspec. DO NOT EDIT.

strictspec generator: 0.1.0 schema: strictcode-registry (format_version 1) regenerate: strictspec gen --manifest strictspec.toml

Released under the MIT license (unencumbered). This file is machine-generated; edit the schema and regenerate, never this file.

Index

Constants

View Source
const GeneratedBy = "0.1.0"

GeneratedBy is the strictspec release that produced this file. The runtime pairing guard hard-errors unless it matches the linked runtime exactly.

View Source
const SchemaFormatVersion = 1

SchemaFormatVersion is the document format_version this validator accepts.

Variables

This section is empty.

Functions

This section is empty.

Types

type PlannedFixDecl

type PlannedFixDecl struct {
	Tier        int64
	Description string
}

PlannedFixDecl is the frozen typed binding of the "PlannedFixDecl" record. Fields are immutable by convention (shallow-plus-generated-immutability); use With* for copy-on-write.

func (*PlannedFixDecl) WithDescription

func (x *PlannedFixDecl) WithDescription(v string) *PlannedFixDecl

WithDescription returns a copy of PlannedFixDecl with Description set to the given value.

func (*PlannedFixDecl) WithTier

func (x *PlannedFixDecl) WithTier(v int64) *PlannedFixDecl

WithTier returns a copy of PlannedFixDecl with Tier set to the given value.

type Registry

type Registry struct {
	Rules      []*RuleDecl
	Groups     strictspec.Value
	Tombstones []*TombstoneDecl
}

Registry is the frozen typed binding of the "Registry" record. Fields are immutable by convention (shallow-plus-generated-immutability); use With* for copy-on-write.

func ValidateBytes

func ValidateBytes(input []byte, syntax string) (*Registry, []strictspec.Diagnostic)

ValidateBytes is the raw-bytes entry point: lossless parse of input in the given syntax ("json" | "toml" | "jsonl"), then validate. It returns the typed root value (nil when any diagnostic fired) and the ordered diagnostics.

func ValidateBytesWithEvidence

func ValidateBytesWithEvidence(input []byte, syntax string, evidence map[string][]map[string]any) (*Registry, []strictspec.Diagnostic)

ValidateBytesWithEvidence is ValidateBytes plus cross-document resolver evidence for the phase-2 constraint vocabulary.

func ValidateValue

func ValidateValue(v strictspec.Value) (*Registry, []strictspec.Diagnostic)

ValidateValue is the tagged-value entry point: validate an already-parsed tagged document value (from strictspec.LoadValue or a typed constructor).

func (*Registry) WithGroups

func (x *Registry) WithGroups(v strictspec.Value) *Registry

WithGroups returns a copy of Registry with Groups set to the given value.

func (*Registry) WithRules

func (x *Registry) WithRules(v []*RuleDecl) *Registry

WithRules returns a copy of Registry with Rules set to the given value.

func (*Registry) WithTombstones

func (x *Registry) WithTombstones(v []*TombstoneDecl) *Registry

WithTombstones returns a copy of Registry with Tombstones set to the given value.

type RuleDecl

type RuleDecl struct {
	Id            string
	Severity      string
	Description   string
	Requires      []string
	Uses          []string
	Groups        []string
	Suppression   string
	FixTier       int64
	PlannedFixes  []*PlannedFixDecl
	NotApplicable strictspec.Value
}

RuleDecl is the frozen typed binding of the "RuleDecl" record. Fields are immutable by convention (shallow-plus-generated-immutability); use With* for copy-on-write.

func (*RuleDecl) WithDescription

func (x *RuleDecl) WithDescription(v string) *RuleDecl

WithDescription returns a copy of RuleDecl with Description set to the given value.

func (*RuleDecl) WithFixTier

func (x *RuleDecl) WithFixTier(v int64) *RuleDecl

WithFixTier returns a copy of RuleDecl with FixTier set to the given value.

func (*RuleDecl) WithGroups

func (x *RuleDecl) WithGroups(v []string) *RuleDecl

WithGroups returns a copy of RuleDecl with Groups set to the given value.

func (*RuleDecl) WithId

func (x *RuleDecl) WithId(v string) *RuleDecl

WithId returns a copy of RuleDecl with Id set to the given value.

func (*RuleDecl) WithNotApplicable

func (x *RuleDecl) WithNotApplicable(v strictspec.Value) *RuleDecl

WithNotApplicable returns a copy of RuleDecl with NotApplicable set to the given value.

func (*RuleDecl) WithPlannedFixes

func (x *RuleDecl) WithPlannedFixes(v []*PlannedFixDecl) *RuleDecl

WithPlannedFixes returns a copy of RuleDecl with PlannedFixes set to the given value.

func (*RuleDecl) WithRequires

func (x *RuleDecl) WithRequires(v []string) *RuleDecl

WithRequires returns a copy of RuleDecl with Requires set to the given value.

func (*RuleDecl) WithSeverity

func (x *RuleDecl) WithSeverity(v string) *RuleDecl

WithSeverity returns a copy of RuleDecl with Severity set to the given value.

func (*RuleDecl) WithSuppression

func (x *RuleDecl) WithSuppression(v string) *RuleDecl

WithSuppression returns a copy of RuleDecl with Suppression set to the given value.

func (*RuleDecl) WithUses

func (x *RuleDecl) WithUses(v []string) *RuleDecl

WithUses returns a copy of RuleDecl with Uses set to the given value.

type TombstoneDecl

type TombstoneDecl struct {
	Id         string
	RetiredIn  string
	Reason     string
	ReplacedBy []string
	Migration  string
}

TombstoneDecl is the frozen typed binding of the "TombstoneDecl" record. Fields are immutable by convention (shallow-plus-generated-immutability); use With* for copy-on-write.

func (*TombstoneDecl) WithId

func (x *TombstoneDecl) WithId(v string) *TombstoneDecl

WithId returns a copy of TombstoneDecl with Id set to the given value.

func (*TombstoneDecl) WithMigration

func (x *TombstoneDecl) WithMigration(v string) *TombstoneDecl

WithMigration returns a copy of TombstoneDecl with Migration set to the given value.

func (*TombstoneDecl) WithReason

func (x *TombstoneDecl) WithReason(v string) *TombstoneDecl

WithReason returns a copy of TombstoneDecl with Reason set to the given value.

func (*TombstoneDecl) WithReplacedBy

func (x *TombstoneDecl) WithReplacedBy(v []string) *TombstoneDecl

WithReplacedBy returns a copy of TombstoneDecl with ReplacedBy set to the given value.

func (*TombstoneDecl) WithRetiredIn

func (x *TombstoneDecl) WithRetiredIn(v string) *TombstoneDecl

WithRetiredIn returns a copy of TombstoneDecl with RetiredIn set to the given value.

Jump to

Keyboard shortcuts

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