action

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrResourceGrpPatternRequired = errors.New("resource group pattern is required")
	ErrSubscriptionIDRequired     = errors.New("azure subscription id is required")
	ErrClientIDRequired           = errors.New("azure client id is required")
	ErrClientSecretRequired       = errors.New("azure client secret is required")
	ErrTenantIDRequired           = errors.New("azure tenant id is required")
)

Functions

func Log

func Log(msg string, a ...interface{})

Log will write a log entry to stdout.

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 AzureJanitorAction

type AzureJanitorAction interface {
	Cleanup(ctx context.Context, resourceGroupPattern string, commit bool) error
}

type Input

type Input struct {
	ResourceGroupPattern string `env:"INPUT_RESOURCE-GROUPS"`
	AzureSubscriptionID  string `env:"INPUT_SUBSCRIPTION-ID"`
	AzureClientID        string `env:"INPUT_CLIENT-ID"`
	AzureClientSecret    string `env:"INPUT_CLIENT-SECRET"`
	AzureTenantID        string `env:"INPUT_TENANT-ID"`
	Commit               bool   `env:"INPUT_COMMIT"`
}

func NewInput

func NewInput() (*Input, error)

NewInput creates a new input from the environment variables.

func (*Input) Validate

func (i *Input) Validate() error

Jump to

Keyboard shortcuts

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