Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector receives events and routes them to renderers. Thread-safe for concurrent event emission.
func (*Collector) AddRenderer ¶
AddRenderer adds a renderer to receive events. Must be called during setup before any concurrent operations.
type Complete ¶
type Complete struct{}
Complete is emitted by collector.Complete(), signaling the end of the operation. JSON renderer outputs on this event (using nukeMode to decide format).
type Event ¶
type Event interface {
EventType() string
}
Event is the interface that all reporting events implement.
type GeneralError ¶
GeneralError is emitted for non-resource-specific errors during execution. Examples: failed to list resources in a region, API errors, etc.
func (GeneralError) EventType ¶
func (GeneralError) EventType() string
type NukeComplete ¶
type NukeComplete struct{}
NukeComplete is emitted when all nuke operations are finished. Used by CLI renderer to stop progress bar and display deletion results.
func (NukeComplete) EventType ¶
func (NukeComplete) EventType() string
type NukeProgress ¶
NukeProgress is emitted when processing a batch of resources. Used by CLI renderer to update progress bar title.
func (NukeProgress) EventType ¶
func (NukeProgress) EventType() string
type NukeStarted ¶
type NukeStarted struct {
Total int // Total resources to nuke
}
NukeStarted is emitted at the start of a nuke operation. Used by CLI renderer to initialize the progress bar.
func (NukeStarted) EventType ¶
func (NukeStarted) EventType() string
type Renderer ¶
type Renderer interface {
// OnEvent is called for each event as it occurs.
OnEvent(event Event)
}
Renderer processes events and produces output. CLI renderer outputs progressively on ScanComplete and NukeComplete. JSON renderer outputs once on Complete (emitted by collector.Complete()).
type ResourceDeleted ¶
type ResourceDeleted struct {
ResourceType string
Region string
Identifier string
Success bool
Warning bool // True if failure is transient/expected (e.g., DependencyViolation)
Error string // Empty if success
}
ResourceDeleted is emitted after a deletion attempt. Used to build the final nuke results table.
func (ResourceDeleted) EventType ¶
func (ResourceDeleted) EventType() string
type ResourceFound ¶
type ResourceFound struct {
ResourceType string
Region string
Identifier string
Nukable bool
Reason string // Why not nukable (e.g., "protected by config")
}
ResourceFound is emitted when a resource is discovered during scanning. Used to build the "found resources" table for inspect or pre-nuke display.
func (ResourceFound) EventType ¶
func (ResourceFound) EventType() string
type ScanComplete ¶
type ScanComplete struct{}
ScanComplete is emitted when all resource scanning is finished. Used by CLI renderer to stop spinner and display found resources table.
func (ScanComplete) EventType ¶
func (ScanComplete) EventType() string
type ScanProgress ¶
ScanProgress is emitted during resource discovery to show scanning status. Used by CLI renderer to update spinner text.
func (ScanProgress) EventType ¶
func (ScanProgress) EventType() string
type ScanStarted ¶
type ScanStarted struct {
Regions []string
ResourceTypes []string
ExcludeAfter string // formatted time string, empty if not set
IncludeAfter string // formatted time string, empty if not set
ListUnaliasedKMSKeys bool
}
ScanStarted is emitted at the beginning of AWS resource scanning. Used by CLI renderer to display query parameters. Note: GCP does not emit this event as it has no interesting query parameters to display.
func (ScanStarted) EventType ¶
func (ScanStarted) EventType() string