validator

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompileError

type CompileError struct {
	Line    int
	Message string
}

func (CompileError) Error

func (e CompileError) Error() string

type Flow

type Flow struct {
	Name        string   `yaml:"name"`
	Description string   `yaml:"description"`
	Input       []string `yaml:"input"`
	Layers      []Layer  `yaml:"layers"`
}

func Compile

func Compile(src []byte) (*Flow, []error)

Compile parses and validates the YAML source, returning the compiled Flow or a list of errors.

func Run

func Run(src []byte) (*Flow, error)

Run compiles YAML source supplied as a byte slice. On success it returns success and a nil error. On failure it returns false and a combined error whose message lists every individual compile error, one per line.

type Layer

type Layer struct {
	Name        string   `yaml:"name"`
	Description string   `yaml:"description"`
	Input       []string `yaml:"input"`
	Output      []string `yaml:"output"`
}

Jump to

Keyboard shortcuts

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