Documentation
¶
Overview ¶
Code generated by strictspec. DO NOT EDIT.
strictspec generator: 0.1.0 schema: strictcode-config (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 Analysis
- type Config
- type GroupConfig
- type RuleConfig
- func (x *RuleConfig) WithAllow(v strictspec.Value) *RuleConfig
- func (x *RuleConfig) WithEnabled(v bool) *RuleConfig
- func (x *RuleConfig) WithForbidden(v strictspec.Value) *RuleConfig
- func (x *RuleConfig) WithSeverity(v string) *RuleConfig
- func (x *RuleConfig) WithSuppressions(v []*Suppression) *RuleConfig
- func (x *RuleConfig) WithThresholds(v strictspec.Value) *RuleConfig
- type Suppression
- func (x *Suppression) WithDep(v string) *Suppression
- func (x *Suppression) WithMember(v string) *Suppression
- func (x *Suppression) WithModules(v []string) *Suppression
- func (x *Suppression) WithPath(v string) *Suppression
- func (x *Suppression) WithProject(v string) *Suppression
- func (x *Suppression) WithReason(v string) *Suppression
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 Analysis ¶
Analysis is the frozen typed binding of the "Analysis" record. Fields are immutable by convention (shallow-plus-generated-immutability); use With* for copy-on-write.
func (*Analysis) WithPythonCallResolution ¶
WithPythonCallResolution returns a copy of Analysis with PythonCallResolution set to the given value.
func (*Analysis) WithPythonTypeChecker ¶
WithPythonTypeChecker returns a copy of Analysis with PythonTypeChecker set to the given value.
type Config ¶
type Config struct {
Analysis *Analysis
Groups strictspec.Value
Rules strictspec.Value
}
Config is the frozen typed binding of the "Config" record. Fields are immutable by convention (shallow-plus-generated-immutability); use With* for copy-on-write.
func ValidateBytes ¶
func ValidateBytes(input []byte, syntax string) (*Config, []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) (*Config, []strictspec.Diagnostic)
ValidateBytesWithEvidence is ValidateBytes plus cross-document resolver evidence for the phase-2 constraint vocabulary.
func ValidateValue ¶
func ValidateValue(v strictspec.Value) (*Config, []strictspec.Diagnostic)
ValidateValue is the tagged-value entry point: validate an already-parsed tagged document value (from strictspec.LoadValue or a typed constructor).
func (*Config) WithAnalysis ¶
WithAnalysis returns a copy of Config with Analysis set to the given value.
func (*Config) WithGroups ¶
func (x *Config) WithGroups(v strictspec.Value) *Config
WithGroups returns a copy of Config with Groups set to the given value.
type GroupConfig ¶
GroupConfig is the frozen typed binding of the "GroupConfig" record. Fields are immutable by convention (shallow-plus-generated-immutability); use With* for copy-on-write.
func (*GroupConfig) WithEnabled ¶
func (x *GroupConfig) WithEnabled(v bool) *GroupConfig
WithEnabled returns a copy of GroupConfig with Enabled set to the given value.
func (*GroupConfig) WithSeverity ¶
func (x *GroupConfig) WithSeverity(v string) *GroupConfig
WithSeverity returns a copy of GroupConfig with Severity set to the given value.
type RuleConfig ¶
type RuleConfig struct {
Enabled bool
Severity string
Thresholds strictspec.Value
Suppressions []*Suppression
Allow strictspec.Value
Forbidden strictspec.Value
}
RuleConfig is the frozen typed binding of the "RuleConfig" record. Fields are immutable by convention (shallow-plus-generated-immutability); use With* for copy-on-write.
func (*RuleConfig) WithAllow ¶
func (x *RuleConfig) WithAllow(v strictspec.Value) *RuleConfig
WithAllow returns a copy of RuleConfig with Allow set to the given value.
func (*RuleConfig) WithEnabled ¶
func (x *RuleConfig) WithEnabled(v bool) *RuleConfig
WithEnabled returns a copy of RuleConfig with Enabled set to the given value.
func (*RuleConfig) WithForbidden ¶
func (x *RuleConfig) WithForbidden(v strictspec.Value) *RuleConfig
WithForbidden returns a copy of RuleConfig with Forbidden set to the given value.
func (*RuleConfig) WithSeverity ¶
func (x *RuleConfig) WithSeverity(v string) *RuleConfig
WithSeverity returns a copy of RuleConfig with Severity set to the given value.
func (*RuleConfig) WithSuppressions ¶
func (x *RuleConfig) WithSuppressions(v []*Suppression) *RuleConfig
WithSuppressions returns a copy of RuleConfig with Suppressions set to the given value.
func (*RuleConfig) WithThresholds ¶
func (x *RuleConfig) WithThresholds(v strictspec.Value) *RuleConfig
WithThresholds returns a copy of RuleConfig with Thresholds set to the given value.
type Suppression ¶
type Suppression struct {
Reason string
Path string
Project string
Dep string
Modules []string
Member string
}
Suppression is the frozen typed binding of the "Suppression" record. Fields are immutable by convention (shallow-plus-generated-immutability); use With* for copy-on-write.
func (*Suppression) WithDep ¶
func (x *Suppression) WithDep(v string) *Suppression
WithDep returns a copy of Suppression with Dep set to the given value.
func (*Suppression) WithMember ¶
func (x *Suppression) WithMember(v string) *Suppression
WithMember returns a copy of Suppression with Member set to the given value.
func (*Suppression) WithModules ¶
func (x *Suppression) WithModules(v []string) *Suppression
WithModules returns a copy of Suppression with Modules set to the given value.
func (*Suppression) WithPath ¶
func (x *Suppression) WithPath(v string) *Suppression
WithPath returns a copy of Suppression with Path set to the given value.
func (*Suppression) WithProject ¶
func (x *Suppression) WithProject(v string) *Suppression
WithProject returns a copy of Suppression with Project set to the given value.
func (*Suppression) WithReason ¶
func (x *Suppression) WithReason(v string) *Suppression
WithReason returns a copy of Suppression with Reason set to the given value.