commands

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

View Source
const (
	DefaultOutputFormat     = "table"
	DefaultDuration         = "0s"
	DefaultLogLevel         = "info"
	NukeConfirmationWord    = "nuke"
	ForceNukeCountdown      = 10
	MaxConfirmationAttempts = 2
)

Default values

View Source
const (
	FlagListResourceTypes      = "list-resource-types"
	FlagLogLevel               = "log-level"
	FlagConfig                 = "config"
	FlagOlderThan              = "older-than"
	FlagNewerThan              = "newer-than"
	FlagTimeout                = "timeout"
	FlagDryRun                 = "dry-run"
	FlagForce                  = "force"
	FlagOutputFormat           = "output-format"
	FlagOutputFile             = "output-file"
	FlagDeleteUnaliasedKMSKeys = "delete-unaliased-kms-keys"
	FlagListUnaliasedKMSKeys   = "list-unaliased-kms-keys"
	FlagExcludeFirstSeen       = "exclude-first-seen"
	FlagSGOnly                 = "sg-only"
	FlagProjectID              = "project-id"
	FlagResourceType           = "resource-type"
	FlagExcludeResourceType    = "exclude-resource-type"
	FlagRegion                 = "region"
	FlagExcludeRegion          = "exclude-region"
)

Flag Names These constants define all CLI flag names to avoid typos and enable refactoring

Variables

This section is empty.

Functions

func CombineFlags added in v0.46.0

func CombineFlags(flagSets ...[]cli.Flag) []cli.Flag

CombineFlags combines multiple flag slices into one

func CommonExecutionFlags added in v0.46.0

func CommonExecutionFlags() []cli.Flag

CommonExecutionFlags returns flags for execution control

func CommonOutputFlags added in v0.46.0

func CommonOutputFlags() []cli.Flag

CommonOutputFlags returns flags for output formatting

func CommonResourceTypeFlags added in v0.46.0

func CommonResourceTypeFlags() []cli.Flag

CommonResourceTypeFlags returns flags for resource type filtering

func CommonTimeFlags added in v0.46.0

func CommonTimeFlags() []cli.Flag

CommonTimeFlags returns flags for time-based filtering

func ConfigFlag added in v0.46.0

func ConfigFlag() cli.Flag

ConfigFlag returns the config file flag

func CreateCli

func CreateCli(version string) *cli.App

CreateCli creates and configures the CLI application with all commands, flags, and usage text. This is the main entry point for setting up the cloud-nuke CLI interface.

func GCPProjectFlag added in v0.46.0

func GCPProjectFlag() cli.Flag

GCPProjectFlag returns the GCP project ID flag

func InspectResourceTypeFlags added in v0.46.0

func InspectResourceTypeFlags() []cli.Flag

InspectResourceTypeFlags returns flags for resource type filtering in inspect commands

func RegionFlags added in v0.46.0

func RegionFlags() []cli.Flag

RegionFlags returns region-related flags (applicable to both AWS and GCP)

Types

type ConfigFileReadError added in v0.46.0

type ConfigFileReadError struct {
	FilePath   string
	Underlying error
}

func (ConfigFileReadError) Error added in v0.46.0

func (e ConfigFileReadError) Error() string

type InvalidDurationError added in v0.46.0

type InvalidDurationError struct {
	FlagName   string
	Value      string
	Underlying error
}

func (InvalidDurationError) Error added in v0.46.0

func (e InvalidDurationError) Error() string

type InvalidFlagError

type InvalidFlagError struct {
	Name  string
	Value string
}

func (InvalidFlagError) Error

func (e InvalidFlagError) Error() string

type InvalidLogLevelError added in v0.46.0

type InvalidLogLevelError struct {
	Value      string
	Underlying error
}

func (InvalidLogLevelError) Error added in v0.46.0

func (e InvalidLogLevelError) Error() string

Jump to

Keyboard shortcuts

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