planview

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package planview renders a parsed scenario + its execution graph into a human-readable plan that answers "what will happen if I run this?" — the nodes that will execute, their dependencies, the providers they route to, and the outputs that will be produced.

Shape: a Terraform-style block listing (`action "<type>" "<name>"`, `component "<type>" "<name>"`) laid out as a tree of primary-parent indentation, so the dependency graph reads top-down. Secondary parents surface as "also after: ..." lines under the affected node.

Styling goes through internal/cli/render so non-TTY pipes get clean, uncolored text.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(w io.Writer, ps *parser.ParsedScenario, g *graph.Graph, providerOf ProviderOf, valuesOf ValuesOf)

Render writes the plan to w.

func RenderSuccess

func RenderSuccess(w io.Writer)

RenderSuccess writes the final success line.

Types

type ProviderOf

type ProviderOf func(*graph.Node) string

ProviderOf returns the local alias of the provider that will handle the given action node. Empty string when the node isn't an action or the routing isn't resolvable (ambiguous, missing). Pass nil to render without provider annotations.

type ValuesOf

type ValuesOf func(*graph.Node) map[string]cty.Value

ValuesOf returns an action node's evaluated attributes, which the plan lists under the action. Pass nil to render without them.

Jump to

Keyboard shortcuts

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