Documentation
¶
Index ¶
- func Not(valueValidator validator.Bool) validator.Bool
- func NullIfAttributeIsOneOf(path path.Expression, exceptedValue []attr.Value) validator.Bool
- func NullIfAttributeIsSet(path path.Expression) validator.Bool
- func NullIfAttributeMatches(path path.Expression, ...) validator.Bool
- func NullIfAttributeMatchesWithDescription(path path.Expression, ...) validator.Bool
- func RequireIfAttributeIsOneOf(path path.Expression, exceptedValue []attr.Value) validator.Bool
- func RequireIfAttributeIsSet(path path.Expression) validator.Bool
- type NullIfAttributeMatchesDescription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Not ¶
Not returns a validator which ensures that the validators passed as arguments are not met.
func NullIfAttributeIsOneOf ¶
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 ¶
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
NullIfAttributeMatchesDescription is a struct to hold the description and markdown description for NullIfAttributeMatchesWithDescription.