diff

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize

Normalize removes cluster-managed fields from a resource for clean comparison.

Types

type DiffResult

type DiffResult struct {
	APIVersion string
	Kind       string
	Name       string
	Namespace  string
	Status     DiffStatus
	Diff       string // unified diff text
}

DiffResult holds the comparison result for a single resource.

func Compare

func Compare(local, cluster *unstructured.Unstructured) (*DiffResult, error)

Compare compares a local resource against a cluster resource.

func (*DiffResult) ResourceKey

func (d *DiffResult) ResourceKey() string

ResourceKey returns a human-readable identifier for the resource.

type DiffStatus

type DiffStatus string

DiffStatus represents the status of a resource comparison.

const (
	StatusUnchanged DiffStatus = "unchanged"
	StatusChanged   DiffStatus = "changed"
	StatusNew       DiffStatus = "new"
	StatusDeleted   DiffStatus = "deleted"
)

Jump to

Keyboard shortcuts

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