diff

package
v0.0.0-...-ce89fc5 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: Apache-2.0, MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldDiff

type FieldDiff struct {
	Old *schema.Schema
	New *schema.Schema
}

type FieldSet

type FieldSet map[string]struct{}

FieldSet is a set of strings representing fields.

func (FieldSet) Difference

func (s FieldSet) Difference(other FieldSet) FieldSet

Difference returns the fields in s that are not in other.

func (FieldSet) Intersection

func (s FieldSet) Intersection(other FieldSet) FieldSet

Intersection returns the fields that are in both s and other.

func (FieldSet) IsSubsetOf

func (s FieldSet) IsSubsetOf(other FieldSet) bool

IsSubsetOf returns true if s is a subset of other.

type FlattenedSchemaRaw

type FlattenedSchemaRaw struct {
	Old map[string]*schema.Schema
	New map[string]*schema.Schema
}

type ResourceConfigDiff

type ResourceConfigDiff struct {
	Old *schema.Resource
	New *schema.Resource
}

type ResourceDiff

type ResourceDiff struct {
	ResourceConfig  ResourceConfigDiff
	FlattenedSchema FlattenedSchemaRaw
	Fields          map[string]FieldDiff
	FieldSets       ResourceFieldSetsDiff
}

func (ResourceDiff) IsFieldInNewNestedStructure

func (rd ResourceDiff) IsFieldInNewNestedStructure(fieldPath string) bool

IsFieldInNewNestedStructure determines if a field is part of a completely new nested structure

func (ResourceDiff) IsNewResource

func (rd ResourceDiff) IsNewResource() bool

type ResourceDiffInterface

type ResourceDiffInterface interface {
	IsNewResource() bool
	IsFieldInNewNestedStructure(fieldPath string) bool
}

type ResourceFieldSets

type ResourceFieldSets struct {
	ConflictsWith map[string]FieldSet
	ExactlyOneOf  map[string]FieldSet
	AtLeastOneOf  map[string]FieldSet
	RequiredWith  map[string]FieldSet
}

type ResourceFieldSetsDiff

type ResourceFieldSetsDiff struct {
	Old ResourceFieldSets
	New ResourceFieldSets
}

type SchemaDiff

type SchemaDiff map[string]ResourceDiff

SchemaDiff is a nested map with resource names as top-level keys.

func ComputeSchemaDiff

func ComputeSchemaDiff(oldResourceMap, newResourceMap map[string]*schema.Resource) SchemaDiff

Jump to

Keyboard shortcuts

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