validate

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ARN added in v0.0.11

ARN returns a new ARN validator.

func All added in v0.0.12

All returns a new string length between validator.

func ArrayForEach added in v0.0.12

func ArrayForEach(validator tfsdk.AttributeValidator) tfsdk.AttributeValidator

ArrayForEach returns a new array for each validator.

func ArrayLenAtLeast

func ArrayLenAtLeast(minItems int) tfsdk.AttributeValidator

ArrayLenAtLeast returns a new array length at least validator.

func ArrayLenAtMost added in v0.0.13

func ArrayLenAtMost(maxItems int) tfsdk.AttributeValidator

ArrayLenAtMost returns a new array length at most validator.

func ArrayLenBetween

func ArrayLenBetween(minItems, maxItems int) tfsdk.AttributeValidator

ArrayLenBetween returns a new array length between validator.

func FloatAtLeast

func FloatAtLeast(min float64) tfsdk.AttributeValidator

FloatAtLeast returns a new float value at least validator.

func FloatAtMost added in v0.3.0

func FloatAtMost(max float64) tfsdk.AttributeValidator

FloatAtMost returns a new float value at nost validator.

func FloatBetween

func FloatBetween(min, max float64) tfsdk.AttributeValidator

FloatBetween returns a new float value between validator.

func IAMPolicyARN added in v0.0.12

func IAMPolicyARN() tfsdk.AttributeValidator

IAMPolicyARN returns a new string is IAM policy ARN validator.

func IntAtLeast

func IntAtLeast(min int64) tfsdk.AttributeValidator

IntAtLeast returns a new integer value at least validator.

func IntAtMost added in v0.3.0

func IntAtMost(max int64) tfsdk.AttributeValidator

IntAtMost returns a new integer value at most validator.

func IntBetween

func IntBetween(min, max int64) tfsdk.AttributeValidator

IntBetween returns a new integer value between validator.

func IntInSlice

func IntInSlice(valid []int) tfsdk.AttributeValidator

IntInSlice returns a new integer in slicde validator.

func IsRFC3339Time

func IsRFC3339Time() tfsdk.AttributeValidator

IsRFC3339Time returns a new string RFC33349Time validator.

func IsURI added in v0.12.0

func IsURI() tfsdk.AttributeValidator

ARN returns a new ARN validator.

func RequiredAttributes

func RequiredAttributes(fs ...RequiredAttributesFunc) tfsdk.AttributeValidator

AttributeRequired returns a new required Attributes validator.

func ResourceConfigRequiredAttributes

func ResourceConfigRequiredAttributes(fs ...RequiredAttributesFunc) tfsdk.ResourceConfigValidator

ResourceConfigRequiredAttributes returns a new resource schema-level required Attributes validator.

func StringInSlice

func StringInSlice(valid []string) tfsdk.AttributeValidator

StringInSlice returns a new string in slice validator.

func StringIsJsonObject added in v0.0.12

func StringIsJsonObject() tfsdk.AttributeValidator

StringIsJsonObject returns a new string is JSON validator.

func StringLenAtLeast

func StringLenAtLeast(minLength int) tfsdk.AttributeValidator

StringLenAtLeast returns a new string length at least validator.

func StringLenAtMost added in v0.0.12

func StringLenAtMost(maxLength int) tfsdk.AttributeValidator

StringLenAtMost returns a new string length at least validator.

func StringLenBetween

func StringLenBetween(minLength, maxLength int) tfsdk.AttributeValidator

StringLenBetween returns a new string length between validator.

func StringMatch added in v0.13.0

func StringMatch(re *regexp.Regexp, message string) tfsdk.AttributeValidator

StringMatch returns a new string match validator.

func UniqueItems

func UniqueItems() tfsdk.AttributeValidator

UniqueItems returns a new unique items validator.

Types

type RequiredAttributesFunc

type RequiredAttributesFunc func(names []string) tfdiag.Diagnostics

func AllOfRequired

AllOfRequired returns a RequiredAttributesFunc that validates that all of the specified validators pass. "To validate against allOf, the given data must be valid against all of the given subschemas."

func AnyOfRequired

AnyOfRequired returns a RequiredAttributesFunc that validates that any of the specified validators pass. "To validate against anyOf, the given data must be valid against any (one or more) of the given subschemas."

func OneOfRequired

OneOfRequired returns a RequiredAttributesFunc that validates that exactly one of of the specified validators pass. "To validate against oneOf, the given data must be valid against exactly one of the given subschemas."

func Required

func Required(required ...string) RequiredAttributesFunc

Required returns a RequiredAttributesFunc that validates that all required attributes are specfied.

Jump to

Keyboard shortcuts

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