Documentation ¶
Overview ¶
Package visitor provides a visitor pattern for traversing the plan and rendering the hcl diff
Index ¶
- type AfterVisitor
- func (c *AfterVisitor) String() string
- func (v *AfterVisitor) VisitBlockDiff(diff *node.BlockDiff)
- func (v *AfterVisitor) VisitBoolValueDiff(diff *node.BoolValueDiff)
- func (v *AfterVisitor) VisitJSONArray(diff *node.JSONArray)
- func (v *AfterVisitor) VisitJSONObjectDiff(diff *node.JSONObjectDiff)
- func (v *AfterVisitor) VisitJSONStringDiff(diff *node.JSONStringDiff)
- func (v *AfterVisitor) VisitKeyValueDiff(diff *node.KeyValueDiff)
- func (v *AfterVisitor) VisitNestedBlockDiff(diff *node.NestedBlockDiff)
- func (v *AfterVisitor) VisitNull(diff *node.NullValueDiff)
- func (v *AfterVisitor) VisitNumberValueDiff(diff *node.NumberValueDiff)
- func (v *AfterVisitor) VisitPrimitiveDiff(diff *node.PrimitiveDiff)
- func (v *AfterVisitor) VisitSensitiveDiff(diff *node.SensitiveDiff)
- func (v *AfterVisitor) VisitStringValueDiff(diff *node.StringValueDiff)
- func (v *AfterVisitor) VisitTypeChangeDiff(diff *node.TypeChangeDiff)
- func (v *AfterVisitor) VisitUnknownDiff(diff *node.UnknownDiff)
- func (c *AfterVisitor) Warnings() []Warning
- type BeforeVisitor
- func (c *BeforeVisitor) String() string
- func (v *BeforeVisitor) VisitBlockDiff(diff *node.BlockDiff)
- func (v *BeforeVisitor) VisitBoolValueDiff(diff *node.BoolValueDiff)
- func (v *BeforeVisitor) VisitJSONArray(diff *node.JSONArray)
- func (v *BeforeVisitor) VisitJSONObjectDiff(diff *node.JSONObjectDiff)
- func (v *BeforeVisitor) VisitJSONStringDiff(diff *node.JSONStringDiff)
- func (v *BeforeVisitor) VisitKeyValueDiff(diff *node.KeyValueDiff)
- func (v *BeforeVisitor) VisitNestedBlockDiff(diff *node.NestedBlockDiff)
- func (v *BeforeVisitor) VisitNull(diff *node.NullValueDiff)
- func (v *BeforeVisitor) VisitNumberValueDiff(diff *node.NumberValueDiff)
- func (v *BeforeVisitor) VisitPrimitiveDiff(diff *node.PrimitiveDiff)
- func (v *BeforeVisitor) VisitSensitiveDiff(diff *node.SensitiveDiff)
- func (v *BeforeVisitor) VisitStringValueDiff(diff *node.StringValueDiff)
- func (v *BeforeVisitor) VisitTypeChangeDiff(diff *node.TypeChangeDiff)
- func (v *BeforeVisitor) VisitUnknownDiff(diff *node.UnknownDiff)
- func (c *BeforeVisitor) Warnings() []Warning
- type Warning
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
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