Documentation ¶
Index ¶
- func Block(attributes map[string]computed.Diff, blocks Blocks) computed.DiffRenderer
- func EnsureValidAttributeName(name string) string
- func List(elements []computed.Diff) computed.DiffRenderer
- func Map(elements map[string]computed.Diff) computed.DiffRenderer
- func NestedList(elements []computed.Diff) computed.DiffRenderer
- func NestedMap(elements map[string]computed.Diff) computed.DiffRenderer
- func NestedObject(attributes map[string]computed.Diff) computed.DiffRenderer
- func NestedSet(elements []computed.Diff) computed.DiffRenderer
- func Object(attributes map[string]computed.Diff) computed.DiffRenderer
- func Primitive(before, after interface{}, ctype cty.Type) computed.DiffRenderer
- func RendererJsonOpts() jsondiff.JsonOpts
- func Sensitive(change computed.Diff, beforeSensitive, afterSensitive bool) computed.DiffRenderer
- func SensitiveBlock(diff computed.Diff, beforeSensitive, afterSensitive bool) computed.DiffRenderer
- func Set(elements []computed.Diff) computed.DiffRenderer
- func TypeChange(before, after computed.Diff) computed.DiffRenderer
- func Unknown(before computed.Diff) computed.DiffRenderer
- type Blocks
- func (blocks *Blocks) AddAllListBlock(key string, diffs []computed.Diff, ...)
- func (blocks *Blocks) AddAllMapBlocks(key string, diffs map[string]computed.Diff, ...)
- func (blocks *Blocks) AddAllSetBlock(key string, diffs []computed.Diff, ...)
- func (blocks *Blocks) AddSingleBlock(key string, diff computed.Diff, replace, beforeSensitive, afterSensitive bool)
- func (blocks *Blocks) GetAllKeys() []string
- func (blocks *Blocks) IsListBlock(key string) bool
- func (blocks *Blocks) IsMapBlock(key string) bool
- func (blocks *Blocks) IsSetBlock(key string) bool
- func (blocks *Blocks) IsSingleBlock(key string) bool
- type NoWarningsRenderer
- type ValidateDiffFunction
- func ValidateBlock(attributes map[string]ValidateDiffFunction, ...) ValidateDiffFunction
- func ValidateList(elements []ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction
- func ValidateMap(elements map[string]ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction
- func ValidateNestedList(elements []ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction
- func ValidateNestedObject(attributes map[string]ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction
- func ValidateObject(attributes map[string]ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction
- func ValidatePrimitive(before, after interface{}, action plans.Action, replace bool) ValidateDiffFunction
- func ValidateSensitive(inner ValidateDiffFunction, beforeSensitive, afterSensitive bool, ...) ValidateDiffFunction
- func ValidateSet(elements []ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction
- func ValidateTypeChange(before, after ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction
- func ValidateUnknown(before ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureValidAttributeName ¶
EnsureValidAttributeName checks if `name` contains any HCL syntax and calls and returns hclEscapeString.
func NestedList ¶
func NestedList(elements []computed.Diff) computed.DiffRenderer
func NestedObject ¶
func NestedObject(attributes map[string]computed.Diff) computed.DiffRenderer
func RendererJsonOpts ¶
RendererJsonOpts creates a jsondiff.JsonOpts object that returns the correct embedded renderers for each JSON type.
We need to define this in our renderers package in order to avoid cycles, and to help with reuse between the output processing in the differs package, and our JSON string rendering here.
func Sensitive ¶
func Sensitive(change computed.Diff, beforeSensitive, afterSensitive bool) computed.DiffRenderer
func SensitiveBlock ¶
func SensitiveBlock(diff computed.Diff, beforeSensitive, afterSensitive bool) computed.DiffRenderer
func TypeChange ¶
func TypeChange(before, after computed.Diff) computed.DiffRenderer
Types ¶
type Blocks ¶
type Blocks struct { SingleBlocks map[string]computed.Diff ListBlocks map[string][]computed.Diff SetBlocks map[string][]computed.Diff MapBlocks map[string]map[string]computed.Diff ReplaceBlocks map[string]bool BeforeSensitiveBlocks map[string]bool AfterSensitiveBlocks map[string]bool }
Blocks is a helper struct for collating the different kinds of blocks in a simple way for rendering.
func (*Blocks) AddAllListBlock ¶
func (*Blocks) AddAllMapBlocks ¶
func (*Blocks) AddAllSetBlock ¶
func (*Blocks) AddSingleBlock ¶
func (*Blocks) GetAllKeys ¶
func (*Blocks) IsListBlock ¶
func (*Blocks) IsMapBlock ¶
func (*Blocks) IsSetBlock ¶
func (*Blocks) IsSingleBlock ¶
type NoWarningsRenderer ¶
type NoWarningsRenderer struct{}
NoWarningsRenderer defines a Warnings function that returns an empty list of warnings. This can be used by other renderers to ensure we don't see lots of repeats of this empty function.
func (NoWarningsRenderer) WarningsHuman ¶
func (render NoWarningsRenderer) WarningsHuman(_ computed.Diff, _ int, _ computed.RenderHumanOpts) []string
WarningsHuman returns an empty slice, as the name NoWarningsRenderer suggests.
type ValidateDiffFunction ¶
func ValidateBlock ¶
func ValidateBlock( attributes map[string]ValidateDiffFunction, singleBlocks map[string]ValidateDiffFunction, listBlocks map[string][]ValidateDiffFunction, mapBlocks map[string]map[string]ValidateDiffFunction, setBlocks map[string][]ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction
func ValidateList ¶
func ValidateList(elements []ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction
func ValidateMap ¶
func ValidateMap(elements map[string]ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction
func ValidateNestedList ¶
func ValidateNestedList(elements []ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction
func ValidateNestedObject ¶
func ValidateNestedObject(attributes map[string]ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction
func ValidateObject ¶
func ValidateObject(attributes map[string]ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction
func ValidatePrimitive ¶
func ValidatePrimitive(before, after interface{}, action plans.Action, replace bool) ValidateDiffFunction
func ValidateSensitive ¶
func ValidateSensitive(inner ValidateDiffFunction, beforeSensitive, afterSensitive bool, action plans.Action, replace bool) ValidateDiffFunction
func ValidateSet ¶
func ValidateSet(elements []ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction
func ValidateTypeChange ¶
func ValidateTypeChange(before, after ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction
func ValidateUnknown ¶
func ValidateUnknown(before ValidateDiffFunction, action plans.Action, replace bool) ValidateDiffFunction