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
- type PlannedFixDecl
- type Registry
- type RuleDecl
- func (x *RuleDecl) WithDescription(v string) *RuleDecl
- func (x *RuleDecl) WithFixTier(v int64) *RuleDecl
- func (x *RuleDecl) WithGroups(v []string) *RuleDecl
- func (x *RuleDecl) WithId(v string) *RuleDecl
- func (x *RuleDecl) WithNotApplicable(v strictspec.Value) *RuleDecl
- func (x *RuleDecl) WithPlannedFixes(v []*PlannedFixDecl) *RuleDecl
- func (x *RuleDecl) WithRequires(v []string) *RuleDecl
- func (x *RuleDecl) WithSeverity(v string) *RuleDecl
- func (x *RuleDecl) WithSuppression(v string) *RuleDecl
- func (x *RuleDecl) WithUses(v []string) *RuleDecl
- type TombstoneDecl
- func (x *TombstoneDecl) WithId(v string) *TombstoneDecl
- func (x *TombstoneDecl) WithMigration(v string) *TombstoneDecl
- func (x *TombstoneDecl) WithReason(v string) *TombstoneDecl
- func (x *TombstoneDecl) WithReplacedBy(v []string) *TombstoneDecl
- func (x *TombstoneDecl) WithRetiredIn(v string) *TombstoneDecl
Constants ¶
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.
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 ¶
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 ¶
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 ¶
WithDescription returns a copy of RuleDecl with Description set to the given value.
func (*RuleDecl) WithFixTier ¶
WithFixTier returns a copy of RuleDecl with FixTier set to the given value.
func (*RuleDecl) WithGroups ¶
WithGroups returns a copy of RuleDecl with Groups 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 ¶
WithRequires returns a copy of RuleDecl with Requires set to the given value.
func (*RuleDecl) WithSeverity ¶
WithSeverity returns a copy of RuleDecl with Severity set to the given value.
func (*RuleDecl) WithSuppression ¶
WithSuppression returns a copy of RuleDecl with Suppression 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.