cmd

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// These can be overridden at build time via -ldflags
	//   -ldflags="-X 'github.com/cloudoperators/cloudctl/cmd.Version=v1.2.3' -X 'github.com/cloudoperators/cloudctl/cmd.GitCommit=abcdef' -X 'github.com/cloudoperators/cloudctl/cmd.BuildDate=2025-08-22T12:34:56Z'"
	Version   = "dev"
	GitCommit = "unknown"
	BuildDate = "unknown"
)

Functions

func Execute

func Execute(ctx context.Context) error

Execute runs the CLI with the provided context.

func OutputFormat added in v1.0.0

func OutputFormat() string

OutputFormat returns the value of the --output flag after flag parsing. It is safe to call after Execute returns.

Types

type DiffChangeType added in v1.0.0

type DiffChangeType string

DiffChangeType describes the kind of change detected for a kubeconfig entry.

const (
	DiffChangeAdded    DiffChangeType = "added"
	DiffChangeRemoved  DiffChangeType = "removed"
	DiffChangeModified DiffChangeType = "modified"
)

type EntryDiff added in v1.0.0

type EntryDiff struct {
	Name       string
	ChangeType DiffChangeType
	Fields     []FieldDiff // non-empty only for DiffChangeModified
}

EntryDiff describes the diff for a single named kubeconfig entry.

type FieldDiff added in v1.0.0

type FieldDiff struct {
	Field string
	Old   string
	New   string
}

FieldDiff is an internal field-level change, mapped to output.FieldChange for printing.

type KubeconfigDiff added in v1.0.0

type KubeconfigDiff struct {
	Clusters  []EntryDiff
	Contexts  []EntryDiff
	AuthInfos []EntryDiff
}

KubeconfigDiff holds the set of entry-level differences between two kubeconfigs. Only managed entries (those carrying the configured prefix) are included.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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