visitor

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package visitor provides a visitor pattern for traversing the plan and rendering the hcl diff

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AfterVisitor

type AfterVisitor struct {
	// contains filtered or unexported fields
}

AfterVisitor is a visitor for rendering the after state of a diff

func NewAfterVisitor

func NewAfterVisitor(initialIndent int) *AfterVisitor

NewAfterVisitor creates a new AfterVisitor

func (*AfterVisitor) String

func (c *AfterVisitor) String() string

String returns the rendered string

func (*AfterVisitor) VisitBlockDiff

func (v *AfterVisitor) VisitBlockDiff(diff *node.BlockDiff)

VisitBlockDiff renders a block diff

func (*AfterVisitor) VisitBoolValueDiff

func (v *AfterVisitor) VisitBoolValueDiff(diff *node.BoolValueDiff)

VisitBoolValueDiff renders a bool value

func (*AfterVisitor) VisitJSONArray

func (v *AfterVisitor) VisitJSONArray(diff *node.JSONArray)

VisitJSONArray renders a JSON array

func (*AfterVisitor) VisitJSONObjectDiff

func (v *AfterVisitor) VisitJSONObjectDiff(diff *node.JSONObjectDiff)

VisitJSONObjectDiff renders a JSON diff

func (*AfterVisitor) VisitJSONStringDiff

func (v *AfterVisitor) VisitJSONStringDiff(diff *node.JSONStringDiff)

VisitJSONStringDiff renders a JSON string diff

func (*AfterVisitor) VisitKeyValueDiff

func (v *AfterVisitor) VisitKeyValueDiff(diff *node.KeyValueDiff)

VisitKeyValueDiff renders a key value diff

func (*AfterVisitor) VisitNestedBlockDiff

func (v *AfterVisitor) VisitNestedBlockDiff(diff *node.NestedBlockDiff)

VisitNestedBlockDiff renders a nested block diff

func (*AfterVisitor) VisitNull

func (v *AfterVisitor) VisitNull(diff *node.NullValueDiff)

VisitNull renders a null value

func (*AfterVisitor) VisitNumberValueDiff

func (v *AfterVisitor) VisitNumberValueDiff(diff *node.NumberValueDiff)

VisitNumberValueDiff renders a number value

func (*AfterVisitor) VisitPrimitiveDiff

func (v *AfterVisitor) VisitPrimitiveDiff(diff *node.PrimitiveDiff)

VisitPrimitiveDiff renders a primitive diff

func (*AfterVisitor) VisitSensitiveDiff

func (v *AfterVisitor) VisitSensitiveDiff(diff *node.SensitiveDiff)

VisitSensitiveDiff renders a sensitive diff

func (*AfterVisitor) VisitStringValueDiff

func (v *AfterVisitor) VisitStringValueDiff(diff *node.StringValueDiff)

VisitStringValueDiff renders a string value

func (*AfterVisitor) VisitTypeChangeDiff

func (v *AfterVisitor) VisitTypeChangeDiff(diff *node.TypeChangeDiff)

VisitTypeChangeDiff renders a type change diff

func (*AfterVisitor) VisitUnknownDiff

func (v *AfterVisitor) VisitUnknownDiff(diff *node.UnknownDiff)

VisitUnknownDiff renders an unknown diff

func (*AfterVisitor) Warnings

func (c *AfterVisitor) Warnings() []Warning

Warnings returns the warnings

type BeforeVisitor

type BeforeVisitor struct {
	// contains filtered or unexported fields
}

BeforeVisitor is a visitor for rendering the before state of a diff

func NewBeforeVisitor

func NewBeforeVisitor(initialIndent int) *BeforeVisitor

NewBeforeVisitor creates a new BeforeVisitor

func (*BeforeVisitor) String

func (c *BeforeVisitor) String() string

String returns the rendered string

func (*BeforeVisitor) VisitBlockDiff

func (v *BeforeVisitor) VisitBlockDiff(diff *node.BlockDiff)

VisitBlockDiff renders a block diff

func (*BeforeVisitor) VisitBoolValueDiff

func (v *BeforeVisitor) VisitBoolValueDiff(diff *node.BoolValueDiff)

VisitBoolValueDiff renders a bool value

func (*BeforeVisitor) VisitJSONArray

func (v *BeforeVisitor) VisitJSONArray(diff *node.JSONArray)

VisitJSONArray renders a JSON array

func (*BeforeVisitor) VisitJSONObjectDiff

func (v *BeforeVisitor) VisitJSONObjectDiff(diff *node.JSONObjectDiff)

VisitJSONObjectDiff renders a JSON diff

func (*BeforeVisitor) VisitJSONStringDiff

func (v *BeforeVisitor) VisitJSONStringDiff(diff *node.JSONStringDiff)

VisitJSONStringDiff renders a JSON string diff

func (*BeforeVisitor) VisitKeyValueDiff

func (v *BeforeVisitor) VisitKeyValueDiff(diff *node.KeyValueDiff)

VisitKeyValueDiff renders a key value diff

func (*BeforeVisitor) VisitNestedBlockDiff

func (v *BeforeVisitor) VisitNestedBlockDiff(diff *node.NestedBlockDiff)

VisitNestedBlockDiff renders a nested block diff

func (*BeforeVisitor) VisitNull

func (v *BeforeVisitor) VisitNull(diff *node.NullValueDiff)

VisitNull renders a null value

func (*BeforeVisitor) VisitNumberValueDiff

func (v *BeforeVisitor) VisitNumberValueDiff(diff *node.NumberValueDiff)

VisitNumberValueDiff renders a number value

func (*BeforeVisitor) VisitPrimitiveDiff

func (v *BeforeVisitor) VisitPrimitiveDiff(diff *node.PrimitiveDiff)

VisitPrimitiveDiff renders a primitive diff

func (*BeforeVisitor) VisitSensitiveDiff

func (v *BeforeVisitor) VisitSensitiveDiff(diff *node.SensitiveDiff)

VisitSensitiveDiff renders a sensitive diff

func (*BeforeVisitor) VisitStringValueDiff

func (v *BeforeVisitor) VisitStringValueDiff(diff *node.StringValueDiff)

VisitStringValueDiff renders a string value

func (*BeforeVisitor) VisitTypeChangeDiff

func (v *BeforeVisitor) VisitTypeChangeDiff(diff *node.TypeChangeDiff)

VisitTypeChangeDiff renders a type change diff

func (*BeforeVisitor) VisitUnknownDiff

func (v *BeforeVisitor) VisitUnknownDiff(diff *node.UnknownDiff)

VisitUnknownDiff renders an unknown diff

func (*BeforeVisitor) Warnings

func (c *BeforeVisitor) Warnings() []Warning

Warnings returns the warnings

type Warning

type Warning struct {
	Line    int
	Message string
}

Warning is a warning message that occurred during the plan

Jump to

Keyboard shortcuts

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