validation

package
v0.1.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const SchemaV2 = `` /* 4778-byte string literal not displayed */

SchemaV2 contains the JSON Schema for validating Nexlayer templates

Variables

This section is empty.

Functions

func ValidateNexlayerYAML

func ValidateNexlayerYAML(yaml *schema.NexlayerYAML) error

ValidateNexlayerYAML validates the provided YAML configuration

func ValidateTemplate

func ValidateTemplate(template *template.NexlayerYAML) error

ValidateTemplate performs comprehensive validation of a Nexlayer template according to the v2.0 schema specification.

Types

type ValidationError

type ValidationError struct {
	Field       string
	Message     string
	Suggestions []string
	Severity    string // error, warning
}

ValidationError represents a validation error with context and suggestions

func (ValidationError) Error

func (e ValidationError) Error() string

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

Validator provides YAML configuration validation

func NewValidator

func NewValidator(strict bool) *Validator

NewValidator creates a new validator instance

func (*Validator) ValidateYAML

func (v *Validator) ValidateYAML(yaml *schema.NexlayerYAML) []ValidationError

ValidateYAML performs comprehensive validation of a Nexlayer YAML configuration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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