stringvalidator

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsIP

func IsIP() validator.String

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

func IsMacAddress() validator.String

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

func IsNetmask() validator.String

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

func IsURN() validator.String

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

func IsUUID() validator.String

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

func IsValidIP() validator.String

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

func IsValidNetmask() validator.String

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 IsValidURN() validator.String

IsValidURN returns a validator which ensures that the configured attribute value is a valid URN.

Null (unconfigured) and unknown (known after apply) values are skipped.

Deprecated: Use IsURN() instead.

func IsValidUUID deprecated

func IsValidUUID() validator.String

IsValidUUID 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.

Deprecated: Use IsUUID() instead.

func Not

func Not(valueValidator validator.String) validator.String

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

func RequireIfAttributeIsOneOf

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

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

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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