checks

package
v0.29.3 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package checks provides a framework for validating resources against a set of checks.

Index

Constants

This section is empty.

Variables

View Source
var ErrIncorrectType = errors.New("incorrect type supplied to checker")

ErrIncorrectType is returned when the type supplied to the checker is not correct.

View Source
var ErrLibraryMemberPathMismatch = fmt.Errorf("library member path mismatch")

ErrLibraryMemberPathMismatch is returned when the library member path does not match the expected path.

View Source
var ErrResourceTypeIsIncorrect = errors.New("resource type is incorrect")

ErrResourceTypeIsIncorrect is returned when the resource type is incorrect.

Functions

func CheckAllArchitectures

func CheckAllArchitectures(az *alzlib.AlzLib) checker.ValidatorCheck

CheckAllArchitectures is a validator check that ensures all architectures in the ALZ library are deployable.

func CheckAllDefinitionsAreReferenced

func CheckAllDefinitionsAreReferenced(az *alzlib.AlzLib) checker.ValidatorCheck

CheckAllDefinitionsAreReferenced is a validator check that ensures all policy definitions, policy set definitions, and role definitions in the ALZ library are referenced by at least one archetype.

func CheckDefaults added in v0.22.0

func CheckDefaults(az *alzlib.AlzLib) checker.ValidatorCheck

CheckDefaults is a validator check that ensures all policy default values are valid.

func CheckLibraryFileNames added in v0.29.0

func CheckLibraryFileNames(path string, opts *CheckLibraryFileNameOptions) checker.ValidatorCheck

CheckLibraryFileNames is a validator check that ensures all library file names are valid.

func CheckLibraryMemberPath

func CheckLibraryMemberPath(az *alzlib.AlzLib) checker.ValidatorCheck

CheckLibraryMemberPath is a validator check that ensures the library member path matches the expected path from the environment variable.

func CheckResourceTypeIsCorrect

func CheckResourceTypeIsCorrect(resourceType any) checker.ValidatorCheck

CheckResourceTypeIsCorrect is a validator check that ensures the resource type is correct for policy definitions and set definitions.

func NewErrResourceTypeIsIncorrect added in v0.27.0

func NewErrResourceTypeIsIncorrect(resourceType string) error

NewErrResourceTypeIsIncorrect creates a new error indicating that the resource type is incorrect.

Types

type CheckLibraryFileNameOptions added in v0.29.0

type CheckLibraryFileNameOptions struct {
	Fix bool // Whether to rename files to match their internal name and version.
}

CheckLibraryFileNameOptions are options for the CheckLibraryFileNames function.

Jump to

Keyboard shortcuts

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