diff

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const SchemaVersion = 1

SchemaVersion is the version of the `kshrk diff -o json` output shape. Bumped only on a breaking change to Result/Change's own fields — not for changes to the passthrough Kubernetes objects under Change.Before / Change.After, whose field names belong to the cluster's API, not to k8shark (see docs/stability-policy.md).

Variables

This section is empty.

Functions

func RenderText

func RenderText(result *Result, color bool) (string, error)

Types

type Change

type Change struct {
	Path      string          `json:"path"`
	Group     string          `json:"group,omitempty"`
	Version   string          `json:"version,omitempty"`
	Resource  string          `json:"resource,omitempty"`
	Namespace string          `json:"namespace,omitempty"`
	Before    json.RawMessage `json:"before,omitempty"`
	After     json.RawMessage `json:"after,omitempty"`
}

type Options

type Options struct {
	BeforeArchive string
	AfterArchive  string
	Archive       string
	// From/To are the before/after snapshot times for the --archive
	// (single-archive) mode: RFC3339 or a relative duration like -5m.
	From      string
	To        string
	Resource  string
	Namespace string
	// Identities decrypts encrypted archive(s); ignored for plaintext ones.
	// A single key source is shared across both archives in the two-archive
	// mode (a documented v1.0 limitation).
	Identities []age.Identity
}

type Result

type Result struct {
	SchemaVersion int      `json:"schema_version"`
	Changes       []Change `json:"changes"`
}

func Run

func Run(opts Options) (*Result, error)

Jump to

Keyboard shortcuts

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