validate

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(name string, content []byte) error

func Entrypoint

func Entrypoint(path string) ([]string, error)

Entrypoint validates a scenario entrypoint and its imported components. It is a convenience wrapper for callers that do not own a request context.

func EntrypointWithContext

func EntrypointWithContext(ctx context.Context, path string) ([]string, error)

func EntrypointWithOptions added in v0.2.7

func EntrypointWithOptions(ctx context.Context, path string, opts Options) ([]string, error)

func File

func File(path string) error

File validates workflow structure and semantic rules. It is a convenience wrapper for CLI-style callers that do not own a request context.

func FileWithContext

func FileWithContext(ctx context.Context, path string) error

func FileWithOptions added in v0.2.7

func FileWithOptions(ctx context.Context, path string, opts Options) error

func SupportedWorkflowRoles

func SupportedWorkflowRoles() []string

func SupportedWorkflowVersion

func SupportedWorkflowVersion() string

func Workflow

func Workflow(name string, wf *config.Workflow) error

func WorkflowImportRule

func WorkflowImportRule() string

func WorkflowInvariantNotes

func WorkflowInvariantNotes() []string

func WorkflowTopLevelModes

func WorkflowTopLevelModes() []string

func Workspace

func Workspace(root string) ([]string, error)

Workspace validates every scenario entrypoint under a workflow root. It is a convenience wrapper for callers that do not own a request context.

func WorkspaceWithContext

func WorkspaceWithContext(ctx context.Context, root string) ([]string, error)

func WorkspaceWithOptions added in v0.2.7

func WorkspaceWithOptions(ctx context.Context, root string, opts Options) ([]string, error)

Types

type Finding

type Finding struct {
	Severity string `json:"severity"`
	Code     string `json:"code"`
	Message  string `json:"message"`
	Hint     string `json:"hint,omitempty"`
	Path     string `json:"path,omitempty"`
	Phase    string `json:"phase,omitempty"`
	StepID   string `json:"stepId,omitempty"`
	Kind     string `json:"kind,omitempty"`
}

func AnalyzeFiles

func AnalyzeFiles(paths []string) ([]Finding, error)

func AnalyzeFilesWithContext

func AnalyzeFilesWithContext(ctx context.Context, paths []string) ([]Finding, error)

type Issue added in v0.2.1

type Issue struct {
	Code         string
	Severity     string
	File         string
	Path         string
	StepID       string
	StepKind     string
	Message      string
	Expected     string
	Actual       string
	SourceRef    string
	SuggestedFix string
}

type Options added in v0.2.7

type Options struct {
	VarsFiles []string
}

type ValidationError added in v0.2.1

type ValidationError struct {
	Message string
	Issues  []Issue
}

func (*ValidationError) Error added in v0.2.1

func (e *ValidationError) Error() string

func (*ValidationError) ValidationIssues added in v0.2.1

func (e *ValidationError) ValidationIssues() []Issue

Jump to

Keyboard shortcuts

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