Documentation
¶
Index ¶
- func IsIP() validator.String
- func IsMacAddress() validator.String
- func IsNetmask() validator.String
- func IsURN() validator.String
- func IsUUID() validator.String
- func IsValidIP() validator.String
- func IsValidNetmask() validator.String
- func IsValidURN() validator.Stringdeprecated
- func IsValidUUID() validator.Stringdeprecated
- func Not(valueValidator validator.String) validator.String
- func NullIfAttributeIsOneOf(path path.Expression, exceptedValue []attr.Value) validator.String
- func OneOfWithDescription(values ...OneOfWithDescriptionValues) validator.String
- func PrefixContains(prefix string) validator.String
- func RequireIfAttributeIsOneOf(path path.Expression, exceptedValue []attr.Value) validator.String
- type OneOfWithDescriptionValues
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsIP ¶
IsIP returns a validator which ensures that the configured attribute value is a valid IP address with net.ParseIP package.
Null (unconfigured) and unknown (known after apply) values are skipped.
func IsMacAddress ¶
IsMacAddress
returns a validator which ensures that the configured attribute value is a valid MacAddress.
Null (unconfigured) and unknown (known after apply) values are skipped.
func IsNetmask ¶
IsNetmask
returns a validator which ensures that the configured attribute value is a valid Netmask.
Null (unconfigured) and unknown (known after apply) values are skipped.
func IsURN ¶
IsURN returns a validator which ensures that the configured attribute value is a valid URN.
Null (unconfigured) and unknown (known after apply) values are skipped.
func IsUUID ¶
IsUUID returns a validator which ensures that the configured attribute value is a valid (v4) UUID.
Null (unconfigured) and unknown (known after apply) values are skipped.
func IsValidIP ¶
IsValidIP returns a validator which ensures that the configured attribute value is a valid IP address with net.ParseIP package. Null (unconfigured) and unknown (known after apply) values are skipped.
DEPRECATED: Use IsIP() instead.
func IsValidNetmask ¶
IsValidNetmask
returns a validator which ensures that the configured attribute value is a valid Netmask.
Null (unconfigured) and unknown (known after apply) values are skipped.
DEPRECATED: Use IsNetmask() instead.
func IsValidURN
deprecated
func IsValidUUID
deprecated
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.String
OneOfWithDescription checks that the String 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 PrefixContains ¶ added in v1.7.0
PrefixContainsValidator is a validator which ensures that the configured attribute value contains the specified prefix.
Null (unconfigured) and unknown (known after apply) values are skipped.
func RequireIfAttributeIsOneOf ¶
RequireIfAttributeIsOneOf checks if the path.Path attribute contains one of the exceptedValue attr.Value.