Documentation
¶
Index ¶
- func ValidateBlueprint(path string, content []byte) error
- func ValidateBuildfile(path string, content []byte) error
- func ValidateBuildfileDeep(buildfilePath, adapterPath string) []string
- func ValidateInfrastructure(path string, content []byte) error
- func ValidateInfrastructureDeep(path string) ([]ValidationError, []PortabilityWarning)
- func ValidateSurface(path string, content []byte) error
- func ValidateYAML(path string, content []byte) error
- type PortabilityWarning
- type ValidationError
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateBlueprint ¶
ValidateBlueprint checks blueprint.yaml has valid structure and cross-references.
func ValidateBuildfile ¶
ValidateBuildfile checks buildfile.yaml has required fields.
func ValidateBuildfileDeep ¶
ValidateBuildfileDeep performs cross-reference validation on a buildfile. Returns string-formatted errors for backwards compatibility. For structured output suitable for agent consumption, use ValidateBuildfileDeepStructured.
func ValidateInfrastructure ¶ added in v0.1.8
ValidateInfrastructure checks infrastructure.md has valid fragment structure.
func ValidateInfrastructureDeep ¶ added in v0.1.8
func ValidateInfrastructureDeep(path string) ([]ValidationError, []PortabilityWarning)
ValidateInfrastructureDeep performs full schema validation on an infrastructure.md file.
func ValidateSurface ¶
ValidateSurface checks surface.md has fragment headings with Shows fields.
func ValidateYAML ¶
ValidateYAML checks that a file is valid YAML.
Types ¶
type PortabilityWarning ¶ added in v0.1.8
type ValidationError ¶
type ValidationError struct {
Code string `json:"code"`
Message string `json:"message"`
Context string `json:"context,omitempty"`
Fix string `json:"fix"`
}
ValidationError is a structured error returned by deep validation. Fields are designed for agent consumption: code identifies the error class, context provides specifics about where it occurred, and fix suggests recovery.
func ValidateBuildfileDeepStructured ¶
func ValidateBuildfileDeepStructured(buildfilePath, adapterPath string) []ValidationError
ValidateBuildfileDeepStructured performs cross-reference validation and returns structured errors. Each error has a code (for programmatic handling), context (location), and fix (recovery hint).