sweep

package
v0.0.76 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ResourcePrefix = "tf-acc-test-"

ResourcePrefix is the standard prefix for all test resources.

Variables

This section is empty.

Functions

func Debug

func Debug(format string, v ...interface{})

func Error

func Error(format string, v ...interface{})

func Info

func Info(format string, v ...interface{})

func IsConflictError

func IsConflictError(err error) bool

IsConflictError checks if the error is a 409 Conflict response.

func IsForbiddenError

func IsForbiddenError(err error) bool

IsForbiddenError checks if the error is a 403 Forbidden response.

func IsNotFoundError

func IsNotFoundError(err error) bool

IsNotFoundError checks if the error is a 404 Not Found response.

func Register

func Register(name string, f SweeperFunc, dependencies ...string)

func SetMinLevel

func SetMinLevel(level string)

func SetOutput

func SetOutput(w io.Writer)

func ShouldIgnoreError

func ShouldIgnoreError(err error) bool

ShouldIgnoreError determines if a delete operation should ignore an error Returns true for errors that indicate the resource is already gone (404, 409) or that we don't have permission (403) - we can't fix permission issues in sweeper.

func SkipSweepError

func SkipSweepError(err error) bool

func SweepOrchestrator

func SweepOrchestrator(ctx context.Context, sweepables []Sweepable) error

func Trace

func Trace(format string, v ...interface{})

func Warn

func Warn(format string, v ...interface{})

Types

type Sweepable

type Sweepable interface {
	Delete(ctx context.Context) error
}

func NewSweepResource

func NewSweepResource(id, name string, deleteFunc func(ctx context.Context, client *client.CrowdStrikeAPISpecification, id string) error) Sweepable

type SweeperFunc

type SweeperFunc func(ctx context.Context, client *client.CrowdStrikeAPISpecification) ([]Sweepable, error)

Jump to

Keyboard shortcuts

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