planview

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package planview prints a plan for `kubectl ptah plan`.

Reading the plan is not this package's job: pkg/planread resolves it, reconstructs it and verifies it, and only a plan that held every check reaches Render.

Index

Constants

This section is empty.

Variables

View Source
var Formats = []Format{Text, SQL, JSON}

Formats are the accepted values, in the order the help lists them.

Functions

func Render

func Render(out io.Writer, plan planread.Plan, format Format) error

Render writes one plan in the requested format.

Every format is written from the document the store verified. The JSON one is that document unchanged rather than a re-serialization of the decoded plan, so what a reader saves still matches the content digest above it.

Types

type Format

type Format string

Format is how a reader asked to see a plan.

const (
	// Text is the default: what the plan is, then the SQL it holds.
	Text Format = "text"
	// SQL is the statements alone, for piping somewhere else.
	SQL Format = "sql"
	// JSON is the stored document, byte for byte.
	JSON Format = "json"
)

Jump to

Keyboard shortcuts

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