configspec

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 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-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

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 Analysis

type Analysis struct {
	PythonCallResolution string
	PythonTypeChecker    string
}

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

func (x *Analysis) WithPythonCallResolution(v string) *Analysis

WithPythonCallResolution returns a copy of Analysis with PythonCallResolution set to the given value.

func (*Analysis) WithPythonTypeChecker

func (x *Analysis) WithPythonTypeChecker(v string) *Analysis

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

func (x *Config) WithAnalysis(v *Analysis) *Config

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.

func (*Config) WithRules

func (x *Config) WithRules(v strictspec.Value) *Config

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

type GroupConfig

type GroupConfig struct {
	Enabled  bool
	Severity string
}

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.

Jump to

Keyboard shortcuts

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