cmd

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaskKey

func MaskKey(key string) string

Enough to identify a key, not enough to use it.

func NewRootCommand

func NewRootCommand(version string) *cobra.Command

func RestoreTerminal

func RestoreTerminal()

Called by main on every exit path: a spinner may have hidden the cursor, and an invisible cursor outlives the process. Harmless when no spinner ran.

func VerifyKey

func VerifyKey(ctx context.Context, baseURL, apiKey, version string, debug bool, debugOut io.Writer) error

Returns no identity deliberately: nothing reachable by an environment-scoped key reveals which environment it belongs to.

Types

type Globals

type Globals struct {
	Profile string
	Output  string
	APIKey  string
	BaseURL string
	Region  string
	Quiet   bool
	Debug   bool
	NoColor bool
	NoInput bool
	Limit   int
	All     bool
	Columns []string

	// Replaced in PersistentPreRunE once flags are parsed; set at construction
	// only so a directly-constructed command in a test never sees nil.
	UI *ui.UI
}

Created per root: pflag writes flag defaults into the bound pointer at registration, so a shared instance is clobbered by a second root.

Jump to

Keyboard shortcuts

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