Documentation
¶
Index ¶
- Variables
- func Log(msg string, a ...interface{})
- func LogDebug(msg string, a ...interface{})
- func LogError(msg string, a ...interface{})
- func LogErrorAndExit(msg string, a ...interface{})
- func LogWarning(msg string, a ...interface{})
- type Cleaner
- type CleanupFunc
- type CleanupScope
- type GCPJanitorAction
- type Input
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAllZonesNotAllowed = errors.New("all regions is not allowed") ErrZonesRequired = errors.New("regions is required") ErrAgeInHoursInvalid = errors.New("age in hours is invalid") ErrCredentialsRequired = errors.New("credentials are required") ErrProjectIDRequired = errors.New("project id is required") ErrResourceLabelKeyRequired = errors.New("resource label key is required") ErrResourceLabelValueRequired = errors.New("resource label value is required") )
Functions ¶
func LogDebug ¶
func LogDebug(msg string, a ...interface{})
LogDebug will write a debug message command to stdout.
func LogError ¶
func LogError(msg string, a ...interface{})
LogError will write a error message command to stdout.
func LogErrorAndExit ¶
func LogErrorAndExit(msg string, a ...interface{})
LogErrorAndExit will write a error message command to stdout and exit with a non-zero exit code.
func LogWarning ¶
func LogWarning(msg string, a ...interface{})
LogWarning will write a warning message command to stdout.
Types ¶
type Cleaner ¶
type Cleaner struct { Service string Run CleanupFunc }
type CleanupFunc ¶
type CleanupFunc func(ctx context.Context, input *CleanupScope) error
type CleanupScope ¶
type GCPJanitorAction ¶
func New ¶
func New(dryrun bool) GCPJanitorAction
type Input ¶
type Input struct { CredentialsJSON string `env:"INPUT_CREDENTIALS-JSON"` Zones string `env:"INPUT_ZONES"` ProjectID string `env:"INPUT_PROJECT-ID"` ResourceLabelKey string `env:"INPUT_RESOURCE-LABEL-KEY"` ResourceLabelValue string `env:"INPUT_RESOURCE-LABEL-VALUE"` AgeInHours int `env:"INPUT_AGE-IN-HOURS"` DryRun bool `env:"INPUT_DRY-RUN"` }
Click to show internal directories.
Click to hide internal directories.