Documentation
¶
Overview ¶
Code generated by strictspec. DO NOT EDIT.
strictspec generator: 0.1.0 schema: strictcode-vocabulary (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 Attribute
- type Capability
- type Enum
- type Layer
- type NodeKind
- type RowKind
- func (x *RowKind) WithAttributes(v []*Attribute) *RowKind
- func (x *RowKind) WithDescription(v string) *RowKind
- func (x *RowKind) WithDstKinds(v []string) *RowKind
- func (x *RowKind) WithId(v string) *RowKind
- func (x *RowKind) WithMaturity(v string) *RowKind
- func (x *RowKind) WithSrcKinds(v []string) *RowKind
- type Vocabulary
- func ValidateBytes(input []byte, syntax string) (*Vocabulary, []strictspec.Diagnostic)
- func ValidateBytesWithEvidence(input []byte, syntax string, evidence map[string][]map[string]any) (*Vocabulary, []strictspec.Diagnostic)
- func ValidateValue(v strictspec.Value) (*Vocabulary, []strictspec.Diagnostic)
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 Attribute ¶
Attribute is the frozen typed binding of the "Attribute" record. Fields are immutable by convention (shallow-plus-generated-immutability); use With* for copy-on-write.
type Capability ¶
Capability is the frozen typed binding of the "Capability" record. Fields are immutable by convention (shallow-plus-generated-immutability); use With* for copy-on-write.
func (*Capability) WithDescription ¶
func (x *Capability) WithDescription(v string) *Capability
WithDescription returns a copy of Capability with Description set to the given value.
func (*Capability) WithId ¶
func (x *Capability) WithId(v string) *Capability
WithId returns a copy of Capability with Id set to the given value.
func (*Capability) WithLayer ¶
func (x *Capability) WithLayer(v string) *Capability
WithLayer returns a copy of Capability with Layer set to the given value.
type Enum ¶
Enum is the frozen typed binding of the "Enum" record. Fields are immutable by convention (shallow-plus-generated-immutability); use With* for copy-on-write.
func (*Enum) WithValues ¶
WithValues returns a copy of Enum with Values set to the given value.
type Layer ¶
Layer is the frozen typed binding of the "Layer" record. Fields are immutable by convention (shallow-plus-generated-immutability); use With* for copy-on-write.
func (*Layer) WithDescription ¶
WithDescription returns a copy of Layer with Description set to the given value.
func (*Layer) WithMaturity ¶
WithMaturity returns a copy of Layer with Maturity set to the given value.
type NodeKind ¶
NodeKind is the frozen typed binding of the "NodeKind" record. Fields are immutable by convention (shallow-plus-generated-immutability); use With* for copy-on-write.
func (*NodeKind) WithAttributes ¶
WithAttributes returns a copy of NodeKind with Attributes set to the given value.
func (*NodeKind) WithDescription ¶
WithDescription returns a copy of NodeKind with Description set to the given value.
func (*NodeKind) WithMaturity ¶
WithMaturity returns a copy of NodeKind with Maturity set to the given value.
type RowKind ¶
type RowKind struct {
Id string
Maturity string
Description string
SrcKinds []string
DstKinds []string
Attributes []*Attribute
}
RowKind is the frozen typed binding of the "RowKind" record. Fields are immutable by convention (shallow-plus-generated-immutability); use With* for copy-on-write.
func (*RowKind) WithAttributes ¶
WithAttributes returns a copy of RowKind with Attributes set to the given value.
func (*RowKind) WithDescription ¶
WithDescription returns a copy of RowKind with Description set to the given value.
func (*RowKind) WithDstKinds ¶
WithDstKinds returns a copy of RowKind with DstKinds set to the given value.
func (*RowKind) WithMaturity ¶
WithMaturity returns a copy of RowKind with Maturity set to the given value.
func (*RowKind) WithSrcKinds ¶
WithSrcKinds returns a copy of RowKind with SrcKinds set to the given value.
type Vocabulary ¶
type Vocabulary struct {
Enums []*Enum
NodeKinds []*NodeKind
RowKinds []*RowKind
Capabilities []*Capability
Layers []*Layer
}
Vocabulary is the frozen typed binding of the "Vocabulary" record. Fields are immutable by convention (shallow-plus-generated-immutability); use With* for copy-on-write.
func ValidateBytes ¶
func ValidateBytes(input []byte, syntax string) (*Vocabulary, []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) (*Vocabulary, []strictspec.Diagnostic)
ValidateBytesWithEvidence is ValidateBytes plus cross-document resolver evidence for the phase-2 constraint vocabulary.
func ValidateValue ¶
func ValidateValue(v strictspec.Value) (*Vocabulary, []strictspec.Diagnostic)
ValidateValue is the tagged-value entry point: validate an already-parsed tagged document value (from strictspec.LoadValue or a typed constructor).
func (*Vocabulary) WithCapabilities ¶
func (x *Vocabulary) WithCapabilities(v []*Capability) *Vocabulary
WithCapabilities returns a copy of Vocabulary with Capabilities set to the given value.
func (*Vocabulary) WithEnums ¶
func (x *Vocabulary) WithEnums(v []*Enum) *Vocabulary
WithEnums returns a copy of Vocabulary with Enums set to the given value.
func (*Vocabulary) WithLayers ¶
func (x *Vocabulary) WithLayers(v []*Layer) *Vocabulary
WithLayers returns a copy of Vocabulary with Layers set to the given value.
func (*Vocabulary) WithNodeKinds ¶
func (x *Vocabulary) WithNodeKinds(v []*NodeKind) *Vocabulary
WithNodeKinds returns a copy of Vocabulary with NodeKinds set to the given value.
func (*Vocabulary) WithRowKinds ¶
func (x *Vocabulary) WithRowKinds(v []*RowKind) *Vocabulary
WithRowKinds returns a copy of Vocabulary with RowKinds set to the given value.