Documentation ¶
Index ¶
- Variables
- func Log(region Region, resourceType string, r resources.Resource, c color.Color, ...)
- func LogErrorf(err error)
- func LogWarn(s string, i ...interface{})
- func NewResourceTypesCommand() *cobra.Command
- func NewRootCommand() *cobra.Command
- func NewVersionCommand() *cobra.Command
- func Prompt(expect string) error
- func ResolveResourceTypes(base types.Collection, include, exclude []types.Collection) types.Collection
- func Scan(region Region, resourceTypes []string) <-chan *Item
- type Item
- type ItemState
- type Nuke
- type NukeConfig
- type NukeConfigAccount
- type NukeParameters
- type Queue
- type Region
- type ResourceConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ReasonSkip = *color.New(color.FgYellow) ReasonError = *color.New(color.FgRed) ReasonRemoveTriggered = *color.New(color.FgGreen) ReasonWaitPending = *color.New(color.FgBlue) ReasonSuccess = *color.New(color.FgGreen) )
View Source
var ( ColorRegion = *color.New(color.Bold) ColorResourceType = *color.New() ColorResourceID = *color.New(color.Bold) ColorWarning = *color.New(color.FgYellow) )
View Source
var ( BuildVersion = "unknown" BuildDate = "unknown" BuildHash = "unknown" BuildEnvironment = "unknown" )
Functions ¶
func NewResourceTypesCommand ¶ added in v1.4.0
func NewRootCommand ¶
func NewVersionCommand ¶
func ResolveResourceTypes ¶ added in v1.4.0
func ResolveResourceTypes(base types.Collection, include, exclude []types.Collection) types.Collection
Types ¶
type Item ¶
type Item struct { Resource resources.Resource State ItemState Reason string Region Region Type string }
An Item describes an actual AWS resource entity with the current state and some metadata.
type Nuke ¶
type Nuke struct { Parameters NukeParameters Account awsutil.Account Config *NukeConfig ResourceTypes types.Collection ForceSleep time.Duration // contains filtered or unexported fields }
func (*Nuke) HandleQueue ¶
func (n *Nuke) HandleQueue()
func (*Nuke) HandleRemove ¶
func (*Nuke) HandleWait ¶
type NukeConfig ¶
type NukeConfig struct { AccountBlacklist []string `yaml:"account-blacklist"` Regions []string `yaml:"regions"` Accounts map[string]NukeConfigAccount `yaml:"accounts"` ResourceTypes ResourceConfig `yaml:"resource-types"` }
func LoadConfig ¶
func LoadConfig(path string) (*NukeConfig, error)
func (*NukeConfig) HasBlacklist ¶
func (c *NukeConfig) HasBlacklist() bool
func (*NukeConfig) InBlacklist ¶
func (c *NukeConfig) InBlacklist(searchID string) bool
func (*NukeConfig) ValidateAccount ¶ added in v1.4.0
func (c *NukeConfig) ValidateAccount(accountID string, aliases []string) error
type NukeConfigAccount ¶
type NukeConfigAccount struct { Filters map[string][]string `yaml:"filters"` ResourceTypes ResourceConfig `yaml:"resource-types"` }
type NukeParameters ¶
type NukeParameters struct { ConfigPath string Targets []string Excludes []string NoDryRun bool Force bool }
func (*NukeParameters) Validate ¶
func (p *NukeParameters) Validate() error
type ResourceConfig ¶ added in v1.4.0
type ResourceConfig struct { Targets types.Collection `yaml:"targets"` Excludes types.Collection `yaml:"excludes"` }
Click to show internal directories.
Click to hide internal directories.