validation

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskToCreateDirectory

func AskToCreateDirectory(ctx context.Context, path string)

func AskToSetValue

func AskToSetValue(ctx context.Context, doc *ast.Document, assignment *ast.Assignment)

func AssignmentsToValidateRecursive added in v0.8.0

func AssignmentsToValidateRecursive(assignment *ast.Assignment) []string

func Explain

func Explain(ctx context.Context, doc *ast.Document, inputError any, keyErr ValidationError, applyFixer, showField bool) string

Types

type ValidationError

type ValidationError struct {
	WrappedError any
	Assignment   *ast.Assignment
}

func NewError added in v0.4.0

func NewError(assignment *ast.Assignment, err error) ValidationError

func Validate

func Validate(ctx context.Context, doc *ast.Document, handlers []render.Handler, ignoreErrors []string) []ValidationError

func ValidateSingleAssignment added in v0.6.9

func ValidateSingleAssignment(ctx context.Context, doc *ast.Document, assignment *ast.Assignment, handlers []render.Handler, ignoreErrors []string) []ValidationError

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