root

package
v0.0.0-...-f7606f5 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindOptions

func BindOptions(opts *RawOptions, cmd *cobra.Command) error

BindOptions binds CLI flags into RawOptions.

func NewCommand

func NewCommand() (*cobra.Command, error)

NewCommand builds the root cleanup-sweeper cobra command.

Types

type Options

type Options struct {
	// contains filtered or unexported fields
}

Options contains completed runtime options after validation and completion.

func (*Options) Run

func (o *Options) Run(ctx context.Context) error

Run executes the selected cleanup workflow.

type RawOptions

type RawOptions struct {
	SubscriptionID string
	PolicyFile     string

	Workflow    string
	DryRun      bool
	Wait        bool
	Parallelism int

	ResourceGroups []string
}

RawOptions contains CLI flags before validation and normalization.

func DefaultOptions

func DefaultOptions() *RawOptions

DefaultOptions returns the default CLI options.

func (*RawOptions) Validate

func (o *RawOptions) Validate(_ context.Context) (*ValidatedOptions, error)

Validate validates and normalizes raw CLI options.

type ValidatedOptions

type ValidatedOptions struct {
	// contains filtered or unexported fields
}

ValidatedOptions wraps options that passed validation.

func (*ValidatedOptions) Complete

func (o *ValidatedOptions) Complete(_ context.Context) (*Options, error)

Complete resolves validated options into runtime dependencies.

type WorkflowMode

type WorkflowMode string

WorkflowMode selects which cleanup workflow implementation to run.

const (
	// WorkflowRGOrdered runs ordered per-resource-group cleanup.
	WorkflowRGOrdered WorkflowMode = "rg-ordered"
	// WorkflowSharedLeftovers runs cleanup for shared leftovers.
	WorkflowSharedLeftovers WorkflowMode = "shared-leftovers"
)

Jump to

Keyboard shortcuts

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