validation

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListAvailableSchemas

func ListAvailableSchemas() ([]string, error)

ListAvailableSchemas returns a list of available schema filenames

func ValidateJSON

func ValidateJSON(schemaName string, data interface{}) error

ValidateJSON validates a data structure against an embedded JSON schema schemaName should be the filename of the schema (e.g., "stack-analyzer-config.json") data should be the parsed YAML/JSON data as interface{}

func ValidateStruct

func ValidateStruct(schemaName string, structData interface{}) error

ValidateStruct validates a Go struct against an embedded JSON schema schemaName should be the filename of the schema (e.g., "stack-analyzer-config.json") structData should be the Go struct to validate

func ValidateYAML

func ValidateYAML(schemaName string, yamlContent []byte) error

ValidateYAML validates YAML content against an embedded JSON schema schemaName should be the filename of the schema (e.g., "stack-analyzer-config.json") yamlContent should be the raw YAML content as bytes

func ValidateYAMLFile

func ValidateYAMLFile(schemaName string, filePath string) error

ValidateYAMLFile validates a YAML file against an embedded JSON schema schemaName should be the filename of the schema (e.g., "stack-analyzer-config.json") filePath should be the path to the YAML file to validate

Types

type ValidationError

type ValidationError struct {
	Errors []string
}

ValidationError represents a schema validation error

func (ValidationError) Error

func (e ValidationError) Error() string

Jump to

Keyboard shortcuts

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