Documentation
¶
Overview ¶
Package checks provides a framework for validating resources against a set of checks.
Index ¶
- Variables
- func CheckAllArchitectures(az *alzlib.AlzLib) checker.ValidatorCheck
- func CheckAllDefinitionsAreReferenced(az *alzlib.AlzLib) checker.ValidatorCheck
- func CheckDefaults(az *alzlib.AlzLib) checker.ValidatorCheck
- func CheckLibraryFileNames(path string, opts *CheckLibraryFileNameOptions) checker.ValidatorCheck
- func CheckLibraryMemberPath(az *alzlib.AlzLib) checker.ValidatorCheck
- func CheckResourceTypeIsCorrect(resourceType any) checker.ValidatorCheck
- func NewErrResourceTypeIsIncorrect(resourceType string) error
- type CheckLibraryFileNameOptions
Constants ¶
This section is empty.
Variables ¶
var ErrIncorrectType = errors.New("incorrect type supplied to checker")
ErrIncorrectType is returned when the type supplied to the checker is not correct.
var ErrLibraryMemberPathMismatch = fmt.Errorf("library member path mismatch")
ErrLibraryMemberPathMismatch is returned when the library member path does not match the expected path.
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
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.