Documentation ¶
Overview ¶
Package node provides the rendered node types
Index ¶
- type BlockDiff
- type BoolValueDiff
- type Diff
- type DiffType
- type JSONArray
- type JSONObjectDiff
- type JSONStringDiff
- type KeyValueDiff
- type NestedBlockDiff
- type NullValueDiff
- type NumberValueDiff
- type PrimitiveDiff
- type SensitiveDiff
- type StringValueDiff
- type TypeChangeDiff
- type UnknownDiff
- type Visitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockDiff ¶
type BlockDiff struct { Attributes []*KeyValueDiff Blocks []*NestedBlockDiff // contains filtered or unexported fields }
BlockDiff represents a block diff
func NewBlockDiff ¶
func NewBlockDiff( action action.Action, replace bool, warnings []string, attributes []*KeyValueDiff, blocks []*NestedBlockDiff, ) *BlockDiff
NewBlockDiff creates a new block diff
func (BlockDiff) GetWarnings ¶
func (d BlockDiff) GetWarnings() []string
type BoolValueDiff ¶
type BoolValueDiff struct { Value bool // contains filtered or unexported fields }
BoolValueDiff represents a bool value
func NewBoolValueDiff ¶
func NewBoolValueDiff(value bool, action action.Action, replace bool) *BoolValueDiff
NewBoolValueDiff creates a new bool value
func (*BoolValueDiff) Accept ¶
func (d *BoolValueDiff) Accept(visitor Visitor)
Accept accepts a visitor
func (BoolValueDiff) GetWarnings ¶
func (d BoolValueDiff) GetWarnings() []string
type Diff ¶
type Diff interface { // GetType returns the type of the diff GetType() DiffType // GetWarnings returns the warnings for the diff GetWarnings() []string // GetAction returns the action for the diff GetAction() action.Action // Accept accepts a visitor Accept(visitor Visitor) }
Diff is the interface for all diff types
type DiffType ¶
type DiffType string
DiffType is the type of the diff
const ( DiffTypeBlock DiffType = "block" DiffTypeNestedBlock DiffType = "nested_block" DiffTypeJSONObject DiffType = "json_object" DiffTypeJSONArray DiffType = "json_array" DiffTypeKeyValue DiffType = "key_value" DiffTypeUnknown DiffType = "unknown_value" DiffTypeTypeChange DiffType = "type_change" DiffTypePrimitive DiffType = "primitive" DiffTypeJSONString DiffType = "json_string" DiffTypeSensitive DiffType = "sensitive" DiffTypeString DiffType = "string" DiffTypeNumber DiffType = "number" DiffTypeBool DiffType = "bool" DiffTypeNull DiffType = "null" )
DiffType constants
type JSONArray ¶
type JSONArray struct { Elements []Diff // contains filtered or unexported fields }
JSONArray represents a JSON array diff
func NewJSONArray ¶
func NewJSONArray(action action.Action, replace bool, warnings []string, elements []Diff) *JSONArray
NewJSONArray creates a new JSON array diff
func (JSONArray) GetWarnings ¶
func (d JSONArray) GetWarnings() []string
type JSONObjectDiff ¶
type JSONObjectDiff struct { Attributes []*KeyValueDiff // contains filtered or unexported fields }
JSONObjectDiff represents a JSON diff
func NewJSONObjectDiff ¶
func NewJSONObjectDiff(action action.Action, replace bool, warnings []string, Attributes []*KeyValueDiff) *JSONObjectDiff
NewJSONObjectDiff creates a new JSON diff
func (*JSONObjectDiff) Accept ¶
func (d *JSONObjectDiff) Accept(visitor Visitor)
Accept accepts a visitor
func (JSONObjectDiff) GetWarnings ¶
func (d JSONObjectDiff) GetWarnings() []string
type JSONStringDiff ¶
type JSONStringDiff struct { WhitespaceOnlyChange bool JSONValue Diff // contains filtered or unexported fields }
JSONStringDiff represents a JSON string diff
func NewJSONStringDiff ¶
func NewJSONStringDiff(action action.Action, replace bool, warnings []string, value Diff, whitespaceOnlyChange bool) *JSONStringDiff
NewJSONStringDiff creates a new JSON string diff
func (*JSONStringDiff) Accept ¶
func (d *JSONStringDiff) Accept(visitor Visitor)
Accept accepts a visitor
func (JSONStringDiff) GetWarnings ¶
func (d JSONStringDiff) GetWarnings() []string
type KeyValueDiff ¶
type KeyValueDiff struct { Key string Value Diff BlockAttribute bool MaxKeyLength int // contains filtered or unexported fields }
KeyValueDiff represents a key value diff
func NewKeyValueDiff ¶
func NewKeyValueDiff(action action.Action, warnings []string, key string, value Diff, blockAttribute bool, maxKeyLength int) *KeyValueDiff
NewKeyValueDiff creates a new key value diff
func (*KeyValueDiff) Accept ¶
func (d *KeyValueDiff) Accept(visitor Visitor)
Accept accepts a visitor
func (KeyValueDiff) GetWarnings ¶
func (d KeyValueDiff) GetWarnings() []string
type NestedBlockDiff ¶
type NestedBlockDiff struct { Name string Label string Block Diff // contains filtered or unexported fields }
NestedBlockDiff represents a nested block diff
func NewNestedBlockDiff ¶
func NewNestedBlockDiff(action action.Action, replace bool, warnings []string, name string, label string, block Diff) *NestedBlockDiff
NewNestedBlockDiff creates a new nested block diff
func (*NestedBlockDiff) Accept ¶
func (d *NestedBlockDiff) Accept(visitor Visitor)
Accept accepts a visitor
func (NestedBlockDiff) GetWarnings ¶
func (d NestedBlockDiff) GetWarnings() []string
type NullValueDiff ¶
type NullValueDiff struct {
// contains filtered or unexported fields
}
NullValueDiff represents a null value
func NewNullValueDiff ¶
func NewNullValueDiff(action action.Action, replace bool) *NullValueDiff
NewNullValueDiff creates a new null value
func (*NullValueDiff) Accept ¶
func (d *NullValueDiff) Accept(visitor Visitor)
Accept accepts a visitor
func (NullValueDiff) GetWarnings ¶
func (d NullValueDiff) GetWarnings() []string
type NumberValueDiff ¶
type NumberValueDiff struct { Value float64 // contains filtered or unexported fields }
NumberValueDiff represents a number value
func NewNumberValueDiff ¶
func NewNumberValueDiff(value float64, action action.Action, replace bool) *NumberValueDiff
NewNumberValueDiff creates a new number value
func (*NumberValueDiff) Accept ¶
func (d *NumberValueDiff) Accept(visitor Visitor)
Accept accepts a visitor
func (NumberValueDiff) GetWarnings ¶
func (d NumberValueDiff) GetWarnings() []string
type PrimitiveDiff ¶
PrimitiveDiff represents a primitive diff
func NewPrimitiveDiff ¶
func NewPrimitiveDiff(action action.Action, replace bool, warnings []string, before Diff, after Diff) *PrimitiveDiff
NewPrimitiveDiff creates a new primitive diff
func (*PrimitiveDiff) Accept ¶
func (d *PrimitiveDiff) Accept(visitor Visitor)
Accept accepts a visitor
func (PrimitiveDiff) GetWarnings ¶
func (d PrimitiveDiff) GetWarnings() []string
type SensitiveDiff ¶
type SensitiveDiff struct { Block bool BeforeSensitive bool AfterSensitive bool // contains filtered or unexported fields }
SensitiveDiff represents a sensitive diff
func NewSensitiveBlockDiff ¶
func NewSensitiveBlockDiff(action action.Action, replace bool, warnings []string, beforeSensitive bool, afterSensitive bool) *SensitiveDiff
NewSensitiveBlockDiff creates a new sensitive block diff
func NewSensitiveDiff ¶
func NewSensitiveDiff(action action.Action, replace bool, warnings []string, beforeSensitive bool, afterSensitive bool) *SensitiveDiff
NewSensitiveDiff creates a new sensitive diff
func (*SensitiveDiff) Accept ¶
func (d *SensitiveDiff) Accept(visitor Visitor)
Accept accepts a visitor
func (SensitiveDiff) GetWarnings ¶
func (d SensitiveDiff) GetWarnings() []string
type StringValueDiff ¶
type StringValueDiff struct { Value string Multiline bool // contains filtered or unexported fields }
StringValueDiff represents a string value
func NewStringValueDiff ¶
func NewStringValueDiff(value string, action action.Action, replace bool, multiline bool) *StringValueDiff
NewStringValueDiff creates a new string value
func (*StringValueDiff) Accept ¶
func (d *StringValueDiff) Accept(visitor Visitor)
Accept accepts a visitor
func (StringValueDiff) GetWarnings ¶
func (d StringValueDiff) GetWarnings() []string
type TypeChangeDiff ¶
TypeChangeDiff represents a type change diff
func NewTypeChangeDiff ¶
func NewTypeChangeDiff(action action.Action, replace bool, warnings []string, before Diff, after Diff) *TypeChangeDiff
NewTypeChangeDiff creates a new type change diff
func (*TypeChangeDiff) Accept ¶
func (d *TypeChangeDiff) Accept(visitor Visitor)
Accept accepts a visitor
func (TypeChangeDiff) GetWarnings ¶
func (d TypeChangeDiff) GetWarnings() []string
type UnknownDiff ¶
type UnknownDiff struct { Before Diff // contains filtered or unexported fields }
UnknownDiff represents an unknown diff
func NewUnknownDiff ¶
func NewUnknownDiff(action action.Action, replace bool, warnings []string, before Diff) *UnknownDiff
NewUnknownDiff creates a new unknown diff
func (UnknownDiff) GetWarnings ¶
func (d UnknownDiff) GetWarnings() []string
type Visitor ¶
type Visitor interface { VisitBlockDiff(diff *BlockDiff) VisitNestedBlockDiff(diff *NestedBlockDiff) VisitJSONObjectDiff(diff *JSONObjectDiff) VisitJSONArray(diff *JSONArray) VisitKeyValueDiff(diff *KeyValueDiff) VisitUnknownDiff(diff *UnknownDiff) VisitTypeChangeDiff(diff *TypeChangeDiff) VisitPrimitiveDiff(diff *PrimitiveDiff) VisitJSONStringDiff(diff *JSONStringDiff) VisitSensitiveDiff(diff *SensitiveDiff) VisitStringValueDiff(diff *StringValueDiff) VisitNumberValueDiff(diff *NumberValueDiff) VisitBoolValueDiff(diff *BoolValueDiff) VisitNull(diff *NullValueDiff) }
Visitor is the interface for visiting diffs