boolvalidator

package
v1.17.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Not

func Not(valueValidator validator.Bool) validator.Bool

Not returns a validator which ensures that the validators passed as arguments are not met.

func NullIfAttributeIsOneOf

func NullIfAttributeIsOneOf(path path.Expression, exceptedValue []attr.Value) validator.Bool

NullIfAttributeIsOneOf checks if the path.Path attribute contains one of the exceptedValue attr.Value.

func NullIfAttributeIsSet

func NullIfAttributeIsSet(path path.Expression) validator.Bool

NullIfAttributeIsSet checks if the path.Path attribute contains one of the exceptedValue attr.Value.

func NullIfAttributeMatches added in v1.17.0

func NullIfAttributeMatches(path path.Expression, predicate func(ctx context.Context, value attr.Value) (bool, diag.Diagnostics)) validator.Bool

NullIfAttributeMatches checks if the path.Path attribute matches the predicate condition.

func NullIfAttributeMatchesWithDescription added in v1.17.0

func NullIfAttributeMatchesWithDescription(
	path path.Expression,
	predicate func(ctx context.Context, value attr.Value) (bool, diag.Diagnostics),
	description NullIfAttributeMatchesDescription,
) validator.Bool

NullIfAttributeMatchesWithDescription checks if the path.Path attribute matches the predicate condition and allows overriding the validator description.

func RequireIfAttributeIsOneOf

func RequireIfAttributeIsOneOf(path path.Expression, exceptedValue []attr.Value) validator.Bool

RequireIfAttributeIsOneOf checks if the path.Path attribute contains one of the exceptedValue attr.Value.

func RequireIfAttributeIsSet

func RequireIfAttributeIsSet(path path.Expression) validator.Bool

RequireIfAttributeIsSet checks if the path.Path attribute is set.

Types

type NullIfAttributeMatchesDescription added in v1.17.0

type NullIfAttributeMatchesDescription struct {
	Description         string
	MarkdownDescription string
}

NullIfAttributeMatchesDescription is a struct to hold the description and markdown description for NullIfAttributeMatchesWithDescription.

Jump to

Keyboard shortcuts

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