differ

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultMaskingRules

func DefaultMaskingRules() map[string]MaskConfig

DefaultMaskingRules returns the hardcoded defaults for Secrets and ConfigMaps.

func Diff

func Diff(fileA, fileB []byte, opts Options) (string, error)

Diff compares two YAML byte slices and returns a human-readable diff.

Types

type MaskConfig

type MaskConfig struct {
	// RootKeys is a list of top-level keys within the resource that contain sensitive data.
	// Examples: []string{"data", "stringData", "binaryData"}
	RootKeys []string
}

MaskConfig defines which fields to mask for a specific Kind.

type Options

type Options struct {
	// SecureMode enables masking of sensitive data in Secrets and ConfigMaps.
	SecureMode bool
	// IncludeKinds filters resources to only include specific Kinds (case-insensitive).
	// If empty, all resources are included.
	IncludeKinds []string
	// ExcludeKinds filters resources to exclude specific Kinds (case-insensitive).
	// If empty, no resources are excluded.
	ExcludeKinds []string
}

Options holds configuration for the diff operation.

Jump to

Keyboard shortcuts

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