validators

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cidr

func Compare

func Compare(comparator Comparator, attribute string) tfsdk.AttributeValidator

Compare

func ConflictsWith

func ConflictsWith(attributes ...string) tfsdk.AttributeValidator

ConflictsWith ensures that the specificed attributes at the same level are not set (either null or unknown).

func FloatInSlice

func FloatInSlice(values ...float64) tfsdk.AttributeValidator

func Match

func Match(regex *regexp.Regexp) tfsdk.AttributeValidator

func MaxLength

func MaxLength(length int) tfsdk.AttributeValidator

func MinLength

func MinLength(length int) tfsdk.AttributeValidator

func NoOverlap

func NoOverlap() tfsdk.AttributeValidator

NoOverlap ensures that no elements overlap with any other in the list.

func NoOverlappingCIDRs

func NoOverlappingCIDRs() tfsdk.AttributeValidator

NoOverlappingCIDRs ensures that no CIDRs overlap with any other in the list.

func NoWhitespace

func NoWhitespace() tfsdk.AttributeValidator

func Range

func Range(from, to interface{}) tfsdk.AttributeValidator

func StringInSlice

func StringInSlice(caseSensitive bool, values ...string) tfsdk.AttributeValidator

func Unique

func Unique(key string) tfsdk.AttributeValidator

Unique returns an tfsdk.AttributeValidator that ensures all elements within a list or set are unique on the provided object attribute.

Types

type Comparator

type Comparator int
const (
	ComparatorUnknown Comparator = iota
	ComparatorLessThan
	ComparatorGreaterThan
	ComparatorEqual
	ComparatorLessThanEqual
	ComparatorGreaterThanEqual
	ComparatorNot
)

Jump to

Keyboard shortcuts

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