validate

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxIDLength    = 255
	MaxNameLength  = 512
	MaxFieldLength = 4096
)

Variables

View Source
var (
	// Must start with lowercase letter or digit, then only lowercase letters,
	// digits, dots, hyphens, and underscores.
	IDFormat = regexp.MustCompile(`^[a-z0-9][a-z0-9._-]*$`)

	ValidRiskTiers        = []string{"low", "medium", "high"}
	ValidStatuses         = []string{"active", "inactive", "deprecated"}
	ValidGrantStatuses    = []string{"active", "suspended", "revoked", "expired"}
	ValidFailModes        = []string{"open", "closed"}
	ValidAgentTypes       = []string{"llm_agent", "workflow", "automation", "copilot", "rpa"}
	ValidConsequenceTypes = []string{"monetary", "risk_rating"}
)

Functions

func ValidateBundle

func ValidateBundle(docs []parser.ParsedDocument) []types.ValidationError

ValidateBundle validates a set of parsed documents. It performs: - per-document validation - duplicate IDs of the same kind within the same bundle - document index annotation for user-facing errors

func ValidateDocument

func ValidateDocument(doc parser.ParsedDocument) []types.ValidationError

ValidateDocument validates a single parsed control-plane document. Parser-owned checks such as apiVersion/kind presence/support are intentionally not repeated here.

Types

This section is empty.

Jump to

Keyboard shortcuts

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