Documentation
¶
Index ¶
- func AttributeIsDivisibleByAnInteger(path path.Expression) validator.Int64
- func Not(valueValidator validator.Int64) validator.Int64
- func NullIfAttributeIsOneOf(path path.Expression, exceptedValue []attr.Value) validator.Int64
- func OneOfWithDescription(values ...OneOfWithDescriptionValues) validator.Int64
- func RequireIfAttributeIsOneOf(path path.Expression, exceptedValue []attr.Value) validator.Int64
- func ZeroRemainder(divider int64) validator.Int64
- type OneOfWithDescriptionValues
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttributeIsDivisibleByAnInteger ¶
func AttributeIsDivisibleByAnInteger(path path.Expression) validator.Int64
AttributeIsDivisibleByAnInteger returns a validator that ensures the configured attribute is divisible by an integer.
Null (unconfigured) and unknown (known after apply) values are skipped.
func Not ¶
Not returns a validator which ensures that the validators passed as arguments are not met.
func NullIfAttributeIsOneOf ¶ added in v1.6.0
NullIfAttributeIsOneOf checks if the path.Path attribute contains one of the exceptedValue attr.Value.
func OneOfWithDescription ¶ added in v1.5.0
func OneOfWithDescription(values ...OneOfWithDescriptionValues) validator.Int64
OneOfWithDescription checks that the int64 held in the attribute is one of the given `values`. The description of the value is used to generate advanced Description and MarkdownDescription messages.
func RequireIfAttributeIsOneOf ¶
RequireIfAttributeIsOneOf checks if the path.Path attribute contains one of the exceptedValue attr.Value.
func ZeroRemainder ¶
ZeroRemainder returns a validator that checks if the configured attribute is divisible by a specified integer X, and has zero remainder. If the attribute is not divisible by X or has a non-zero remainder, the validation will fail.
Null (unconfigured) and unknown (known after apply) values are skipped.