Documentation
¶
Overview ¶
Package walk provides a visitor/walker pattern for traversing solution structures. It eliminates duplicated traversal logic across lint, dependency extraction, explain, and MCP tools by providing a single canonical Walk function with composable visitor callbacks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Visitor ¶
type Visitor struct {
Solution func(sol *solution.Solution) error
Metadata func(path string, meta *solution.Metadata) error
Catalog func(path string, cat *solution.Catalog) error
Spec func(path string, sp *solution.Spec) error
Resolver func(path, name string, r *resolver.Resolver) error
ResolvePhase func(path, resolverName string, rp *resolver.ResolvePhase) error
TransformPhase func(path, resolverName string, tp *resolver.TransformPhase) error
ValidatePhase func(path, resolverName string, vp *resolver.ValidatePhase) error
ProviderSource func(path string, ps *resolver.ProviderSource) error
ProviderTransform func(path string, pt *resolver.ProviderTransform) error
ProviderValidation func(path string, pv *resolver.ProviderValidation) error
Action func(path, name, section string, act *action.Action) error
Workflow func(path string, w *action.Workflow) error
ValueRef func(path string, vr *spec.ValueRef) error
Condition func(path, conditionKind string, expr *celexp.Expression) error
ForEach func(path string, fe *spec.ForEachClause) error
TestSuite func(path string, ts *soltesting.TestSuite) error
TestCase func(path, name string, tc *soltesting.TestCase) error
}
Visitor defines optional callbacks for each node type in the solution tree. All fields are optional -- set only the callbacks you need. Return a non-nil error from any callback to abort the walk immediately.
Click to show internal directories.
Click to hide internal directories.