validate

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UUIDRegExp = regexp.MustCompile("^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[8|9|aA|bB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$")

Functions

func IsAppURI added in v0.0.9

func IsAppURI(i interface{}, path cty.Path) diag.Diagnostics

func IsHTTPOrHTTPSURL added in v0.0.9

func IsHTTPOrHTTPSURL(i interface{}, path cty.Path) diag.Diagnostics

func IsHTTPSURL added in v0.0.9

func IsHTTPSURL(i interface{}, path cty.Path) diag.Diagnostics

func IsURI added in v1.5.0

func IsURI(validURLSchemes []string, URNAllowed bool) schema.SchemaValidateDiagFunc

func NoEmptyStrings

func NoEmptyStrings(i interface{}, path cty.Path) (ret diag.Diagnostics)

NoEmptyStrings validates that the string is not just whitespace characters (equal to [\r\n\t\f\v ])

func StringIsEmailAddress

func StringIsEmailAddress(i interface{}, path cty.Path) (ret diag.Diagnostics)

StringIsEmailAddress validates that the given string is a valid email address (foo@bar.com)

func UUID

func UUID(i interface{}, path cty.Path) (ret diag.Diagnostics)

func ValidateDiag

func ValidateDiag(validateFunc func(interface{}, string) ([]string, []error)) schema.SchemaValidateDiagFunc

ValidateDiag wraps a SchemaValidateFunc to build a Diagnostics from the warning and error slices

Types

This section is empty.

Jump to

Keyboard shortcuts

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