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 NullIfAttributeIsSet(path path.Expression) validator.Int64
- func OneOfWithDescription(values ...OneOfWithDescriptionValues) validator.Int64
- func OneOfWithDescriptionIfAttributeIsOneOf(path path.Expression, exceptedValue []attr.Value, ...) validator.String
- func RequireIfAttributeIsOneOf(path path.Expression, exceptedValue []attr.Value) validator.Int64
- func RequireIfAttributeIsSet(path path.Expression) validator.Int64
- func ZeroRemainder(divider int64) validator.Int64
- type OneOfWithDescriptionIfAttributeIsOneOfValues
- 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 NullIfAttributeIsSet ¶ added in v1.8.0
func NullIfAttributeIsSet(path path.Expression) validator.Int64
NullIfAttributeIsSet 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 OneOfWithDescriptionIfAttributeIsOneOf ¶ added in v1.9.0
func OneOfWithDescriptionIfAttributeIsOneOf(path path.Expression, exceptedValue []attr.Value, values ...OneOfWithDescriptionIfAttributeIsOneOfValues) validator.String
OneOfWithDescriptionIfAttributeIsOneOf checks that the value is one of the expected values if the attribute is one of the exceptedValue. 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 RequireIfAttributeIsSet ¶ added in v1.8.0
func RequireIfAttributeIsSet(path path.Expression) validator.Int64
RequireIfAttributeIsSet checks if the path.Path attribute is set.
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.