validator

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package validator checks parsed pipelines against the manifest registry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScopeRegistry added in v0.9.4

func ScopeRegistry(registry map[string]*manifest.Manifest, shell string) map[string]*manifest.Manifest

ScopeRegistry returns the subset of registry usable on a host running shell.

A manifest's `shell` field is three-way:

shell: bash        Unix only — ls, df, uname, systemctl
shell: powershell  Windows only — Get-Service, netstat, DSCheckLS.exe
absent             universal — docker, curl, python, aws, psql

Absent means universal rather than POSIX, which is what keeps `docker ps` working on a Windows host. Only a manifest that explicitly names a *different* shell is filtered out, so marking is additive: an unmarked Unix-only manifest stays reachable everywhere until someone marks it, and nothing breaks in the meantime.

An empty shell means the host's dialect is unknown — the standalone validate tool has no connection — and returns the registry unchanged.

func ValidatePipeline

func ValidatePipeline(pipeline *parser.Pipeline, registry map[string]*manifest.Manifest) error

Types

type ValidationError

type ValidationError struct {
	Message string
}

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