Documentation
¶
Index ¶
- Variables
- func All(validators ...schema.SchemaValidateDiagFunc) schema.SchemaValidateDiagFunc
- func Cron(value interface{}, _ cty.Path) diag.Diagnostics
- func IntAtLeast(min int) schema.SchemaValidateDiagFunc
- func IsEmail(address interface{}, _ cty.Path) diag.Diagnostics
- func LdapDn(value interface{}, _ cty.Path) diag.Diagnostics
- func LdapFilter(value interface{}, _ cty.Path) diag.Diagnostics
- func LowerCase(value interface{}, key cty.Path) diag.Diagnostics
- func StringInSlice(ignoreCase bool, valid ...string) schema.SchemaValidateDiagFunc
- func StringIsNotEmpty(i interface{}, p cty.Path) diag.Diagnostics
- func StringIsNotURL(value interface{}, p cty.Path) diag.Diagnostics
Constants ¶
This section is empty.
Variables ¶
var CommaSeperatedList = validation.ToDiagFunc( validation.StringMatch(regexp.MustCompile(`.+(?:,.+)*`), "must be comma separated string"), )
var LicenseType = validation.ToDiagFunc(validation.StringInSlice(validLicenseTypes, false))
var ProjectKey = validation.ToDiagFunc( validation.StringMatch(regexp.MustCompile(`^[a-z0-9]{3,10}$`), "project_key must be 3 - 10 lowercase alphanumeric characters"), )
Functions ¶
func All ¶
func All(validators ...schema.SchemaValidateDiagFunc) schema.SchemaValidateDiagFunc
All Updated version of the Terraform's original validation func: https://github.com/hashicorp/terraform-plugin-sdk/blob/main/helper/validation/meta.go#L32
All returns a SchemaValidateFunc which tests if the provided value passes all provided SchemaValidateFunc
func IntAtLeast ¶ added in v0.3.0
func IntAtLeast(min int) schema.SchemaValidateDiagFunc
IntAtLeast Updated version of the Terraform's original validation func: https://github.com/hashicorp/terraform-plugin-sdk/blob/5adf5f1c4bf0aee7bb31d51cd7f016e81a39e3e5/helper/validation/int.go#L31
IntAtLeast returns a SchemaValidateFunc which tests if the provided value is of type int and is at least min (inclusive)
func LdapFilter ¶
func LdapFilter(value interface{}, _ cty.Path) diag.Diagnostics
func StringInSlice ¶ added in v0.3.0
func StringInSlice(ignoreCase bool, valid ...string) schema.SchemaValidateDiagFunc
Updated version of the Terraform's original validation func: https://github.com/hashicorp/terraform-plugin-sdk/blob/5adf5f1c4bf0aee7bb31d51cd7f016e81a39e3e5/helper/validation/strings.go#L132
StringInSlice returns a SchemaValidateFunc which tests if the provided value is of type string and matches the value of an element in the valid slice will test with in lower case if ignoreCase is true