validation

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Overview

Package validation provides shared pipeline configuration validation utilities that are used by both the workflow engine (at startup) and the wfctl CLI tool (as static analysis). This avoids duplicating logic between the two consumers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractSQLColumns

func ExtractSQLColumns(query string) []string

ExtractSQLColumns parses a SQL SELECT statement and returns the column names (or aliases) from the SELECT clause.

Types

type RefValidationResult

type RefValidationResult struct {
	Warnings []string
	Errors   []string
}

RefValidationResult holds the outcome of pipeline template reference validation. Warnings are suspicious but non-fatal references; Errors are definitively wrong.

func ValidatePipelineTemplateRefs

func ValidatePipelineTemplateRefs(pipelines map[string]any, reg ...*schema.StepSchemaRegistry) *RefValidationResult

ValidatePipelineTemplateRefs validates all pipeline step template expressions in the given pipelines map for dangling step references and output field mismatches. It performs the same checks as `wfctl template validate` at the pipeline template level.

The pipelines parameter is expected to be a map[string]any where each value is a pipeline config map containing a "steps" field (as parsed from YAML).

An optional *schema.StepSchemaRegistry may be provided to supply plugin-registered step schemas. When absent, a default built-in registry is created once and reused across all pipelines.

func (*RefValidationResult) HasIssues

func (r *RefValidationResult) HasIssues() bool

HasIssues returns true when there are any warnings or errors.

Jump to

Keyboard shortcuts

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