int64validator

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttributeIsDivisibleByAnInteger

func AttributeIsDivisibleByAnInteger(path path.Expression) validator.Int64

AttributeIsDivisibleByAnInteger returns a validator that ensures the configured attribute is divisible by an integer.

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

func Not

func Not(valueValidator validator.Int64) validator.Int64

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

func NullIfAttributeIsOneOf added in v1.6.0

func NullIfAttributeIsOneOf(path path.Expression, exceptedValue []attr.Value) validator.Int64

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

func NullIfAttributeIsSet added in v1.8.0

func NullIfAttributeIsSet(path path.Expression) validator.Int64

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

func OneOfWithDescription added in v1.5.0

func OneOfWithDescription(values ...OneOfWithDescriptionValues) validator.Int64

OneOfWithDescription checks that the int64 held in the attribute is one of the given `values`. The description of the value is used to generate advanced Description and MarkdownDescription messages.

func OneOfWithDescriptionIfAttributeIsOneOf added in v1.9.0

func OneOfWithDescriptionIfAttributeIsOneOf(path path.Expression, exceptedValue []attr.Value, values ...OneOfWithDescriptionIfAttributeIsOneOfValues) validator.String

OneOfWithDescriptionIfAttributeIsOneOf checks that the value is one of the expected values if the attribute is one of the exceptedValue. The description of the value is used to generate advanced Description and MarkdownDescription messages.

func RequireIfAttributeIsOneOf

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

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

func RequireIfAttributeIsSet added in v1.8.0

func RequireIfAttributeIsSet(path path.Expression) validator.Int64

RequireIfAttributeIsSet checks if the path.Path attribute is set.

func ZeroRemainder

func ZeroRemainder(divider int64) validator.Int64

ZeroRemainder returns a validator that checks if the configured attribute is divisible by a specified integer X, and has zero remainder. If the attribute is not divisible by X or has a non-zero remainder, the validation will fail.

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

Types

type OneOfWithDescriptionIfAttributeIsOneOfValues added in v1.9.0

type OneOfWithDescriptionIfAttributeIsOneOfValues struct {
	Value       int64
	Description string
}

type OneOfWithDescriptionValues added in v1.5.0

type OneOfWithDescriptionValues struct {
	Value       int64
	Description string
}

Jump to

Keyboard shortcuts

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