mistvalidator

package
v0.1.43 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtLeastNAttributes

func AtLeastNAttributes(n int, attributes ...string) validator.Object

func AtMostNAttributes

func AtMostNAttributes(n int, attributes ...string) validator.Object

func ExactlyNAttributes

func ExactlyNAttributes(n int, attributes ...string) validator.Object

func ParseCidr

func ParseCidr(requireIpv4 bool, requireIpv6 bool) validator.String

func ParseImageDimension added in v0.1.34

func ParseImageDimension(x int, y int) validator.String

func ParseImageSize added in v0.1.34

func ParseImageSize(maxSize int) validator.String

func ParseImageType added in v0.1.34

func ParseImageType(allowPng bool, allowJpg bool) validator.String

func ParseInt

func ParseInt(min int, max int) validator.String

func ParseIp

func ParseIp(requireIpv4 bool, requireIpv6 bool) validator.String

func ParseMac

func ParseMac() validator.String

func ParseMagic added in v0.1.32

func ParseMagic() validator.String

func ParseName

func ParseName() validator.String

func ParseNetmask

func ParseNetmask(cidrFormat bool, decimalFormat bool) validator.String

func ParseRangeOfInt added in v0.1.13

func ParseRangeOfInt(min int, max int, equalAlloweds bool) validator.String

func ParseVar

func ParseVar() validator.String

Types

type AllowedWhenValueIsInRequest added in v0.1.11

type AllowedWhenValueIsInRequest struct {
	Config         tfsdk.Config
	ConfigValue    attr.Value
	Path           path.Path
	PathExpression path.Expression
}

type AllowedWhenValueIsInResponse added in v0.1.11

type AllowedWhenValueIsInResponse struct {
	Diagnostics diag.Diagnostics
}

type AllowedWhenValueIsInValidator added in v0.1.11

type AllowedWhenValueIsInValidator struct {
	Expression path.Expression
	Values     []attr.Value
}

func AllowedWhenValueIsIn added in v0.1.11

func AllowedWhenValueIsIn(expression path.Expression, values []attr.Value) AllowedWhenValueIsInValidator

func (AllowedWhenValueIsInValidator) Description added in v0.1.11

func (AllowedWhenValueIsInValidator) MarkdownDescription added in v0.1.11

func (o AllowedWhenValueIsInValidator) MarkdownDescription(ctx context.Context) string

func (AllowedWhenValueIsInValidator) Validate added in v0.1.11

func (AllowedWhenValueIsInValidator) ValidateBool added in v0.1.11

func (AllowedWhenValueIsInValidator) ValidateFloat64 added in v0.1.11

func (AllowedWhenValueIsInValidator) ValidateInt64 added in v0.1.11

func (AllowedWhenValueIsInValidator) ValidateList added in v0.1.11

func (AllowedWhenValueIsInValidator) ValidateMap added in v0.1.11

func (AllowedWhenValueIsInValidator) ValidateNumber added in v0.1.11

func (AllowedWhenValueIsInValidator) ValidateObject added in v0.1.11

func (AllowedWhenValueIsInValidator) ValidateSet added in v0.1.11

func (AllowedWhenValueIsInValidator) ValidateString added in v0.1.11

type AllowedWhenValueIsRequest added in v0.1.9

type AllowedWhenValueIsRequest struct {
	Config         tfsdk.Config
	ConfigValue    attr.Value
	Path           path.Path
	PathExpression path.Expression
}

type AllowedWhenValueIsResponse added in v0.1.9

type AllowedWhenValueIsResponse struct {
	Diagnostics diag.Diagnostics
}

type AllowedWhenValueIsValidator added in v0.1.9

type AllowedWhenValueIsValidator struct {
	Expression path.Expression
	Value      attr.Value
}

func AllowedWhenValueIs added in v0.1.9

func AllowedWhenValueIs(expression path.Expression, value attr.Value) AllowedWhenValueIsValidator

func (AllowedWhenValueIsValidator) Description added in v0.1.9

func (AllowedWhenValueIsValidator) MarkdownDescription added in v0.1.9

func (o AllowedWhenValueIsValidator) MarkdownDescription(ctx context.Context) string

func (AllowedWhenValueIsValidator) Validate added in v0.1.9

func (AllowedWhenValueIsValidator) ValidateBool added in v0.1.9

func (AllowedWhenValueIsValidator) ValidateFloat64 added in v0.1.9

func (AllowedWhenValueIsValidator) ValidateInt64 added in v0.1.9

func (AllowedWhenValueIsValidator) ValidateList added in v0.1.9

func (AllowedWhenValueIsValidator) ValidateMap added in v0.1.9

func (AllowedWhenValueIsValidator) ValidateNumber added in v0.1.9

func (AllowedWhenValueIsValidator) ValidateObject added in v0.1.9

func (AllowedWhenValueIsValidator) ValidateSet added in v0.1.9

func (AllowedWhenValueIsValidator) ValidateString added in v0.1.9

type AtLeastNOfValidator added in v0.1.9

type AtLeastNOfValidator struct {
	N               int
	PathExpressions path.Expressions
}

AtLeastNOfValidator is the underlying struct implementing AtLeastNOf.

func (AtLeastNOfValidator) Description added in v0.1.9

func (o AtLeastNOfValidator) Description(ctx context.Context) string

func (AtLeastNOfValidator) MarkdownDescription added in v0.1.9

func (o AtLeastNOfValidator) MarkdownDescription(_ context.Context) string

func (AtLeastNOfValidator) Validate added in v0.1.9

func (AtLeastNOfValidator) ValidateBool added in v0.1.9

func (AtLeastNOfValidator) ValidateFloat64 added in v0.1.9

func (AtLeastNOfValidator) ValidateInt64 added in v0.1.9

func (AtLeastNOfValidator) ValidateList added in v0.1.9

func (AtLeastNOfValidator) ValidateMap added in v0.1.9

func (AtLeastNOfValidator) ValidateNumber added in v0.1.9

func (AtLeastNOfValidator) ValidateObject added in v0.1.9

func (AtLeastNOfValidator) ValidateSet added in v0.1.9

func (AtLeastNOfValidator) ValidateString added in v0.1.9

type AtLeastNOfValidatorRequest added in v0.1.9

type AtLeastNOfValidatorRequest struct {
	Config         tfsdk.Config
	ConfigValue    attr.Value
	N              int
	Path           path.Path
	PathExpression path.Expression
}

type AtLeastNOfValidatorResponse added in v0.1.9

type AtLeastNOfValidatorResponse struct {
	Diagnostics diag.Diagnostics
}

type AtMostNOfValidator added in v0.1.9

type AtMostNOfValidator struct {
	N               int
	PathExpressions path.Expressions
}

AtMostNOfValidator is the underlying struct implementing AtMostNOf.

func (AtMostNOfValidator) Description added in v0.1.9

func (o AtMostNOfValidator) Description(ctx context.Context) string

func (AtMostNOfValidator) MarkdownDescription added in v0.1.9

func (o AtMostNOfValidator) MarkdownDescription(_ context.Context) string

func (AtMostNOfValidator) Validate added in v0.1.9

func (AtMostNOfValidator) ValidateBool added in v0.1.9

func (AtMostNOfValidator) ValidateFloat64 added in v0.1.9

func (AtMostNOfValidator) ValidateInt64 added in v0.1.9

func (AtMostNOfValidator) ValidateList added in v0.1.9

func (AtMostNOfValidator) ValidateMap added in v0.1.9

func (AtMostNOfValidator) ValidateNumber added in v0.1.9

func (AtMostNOfValidator) ValidateObject added in v0.1.9

func (AtMostNOfValidator) ValidateSet added in v0.1.9

func (AtMostNOfValidator) ValidateString added in v0.1.9

type AtMostNOfValidatorRequest added in v0.1.9

type AtMostNOfValidatorRequest struct {
	Config         tfsdk.Config
	ConfigValue    attr.Value
	N              int
	Path           path.Path
	PathExpression path.Expression
}

type AtMostNOfValidatorResponse added in v0.1.9

type AtMostNOfValidatorResponse struct {
	Diagnostics diag.Diagnostics
}

type ForbiddenWhenValueIsRequest added in v0.1.8

type ForbiddenWhenValueIsRequest struct {
	Config         tfsdk.Config
	ConfigValue    attr.Value
	Path           path.Path
	PathExpression path.Expression
}

type ForbiddenWhenValueIsResponse added in v0.1.8

type ForbiddenWhenValueIsResponse struct {
	Diagnostics diag.Diagnostics
}

type ForbiddenWhenValueIsValidator added in v0.1.8

type ForbiddenWhenValueIsValidator struct {
	Expression path.Expression
	Value      attr.Value
}

func ForbiddenWhenValueIs added in v0.1.8

func ForbiddenWhenValueIs(expression path.Expression, value attr.Value) ForbiddenWhenValueIsValidator

func (ForbiddenWhenValueIsValidator) Description added in v0.1.8

func (ForbiddenWhenValueIsValidator) MarkdownDescription added in v0.1.8

func (o ForbiddenWhenValueIsValidator) MarkdownDescription(ctx context.Context) string

func (ForbiddenWhenValueIsValidator) Validate added in v0.1.8

func (ForbiddenWhenValueIsValidator) ValidateBool added in v0.1.8

func (ForbiddenWhenValueIsValidator) ValidateFloat64 added in v0.1.8

func (ForbiddenWhenValueIsValidator) ValidateInt64 added in v0.1.8

func (ForbiddenWhenValueIsValidator) ValidateList added in v0.1.8

func (ForbiddenWhenValueIsValidator) ValidateMap added in v0.1.8

func (ForbiddenWhenValueIsValidator) ValidateNumber added in v0.1.8

func (ForbiddenWhenValueIsValidator) ValidateObject added in v0.1.8

func (ForbiddenWhenValueIsValidator) ValidateSet added in v0.1.8

func (ForbiddenWhenValueIsValidator) ValidateString added in v0.1.8

type NineTypesValidator added in v0.1.8

func AtLeastNOf added in v0.1.9

func AtLeastNOf(n int, expressions ...path.Expression) NineTypesValidator

AtLeastNOf checks that of a set of path.Expression, including the attribute this validator is applied to, at least 'n' have a non-null value.

Any relative path.Expression will be resolved using the attribute being validated.

func AtMostNOf added in v0.1.9

func AtMostNOf(n int, expressions ...path.Expression) NineTypesValidator

AtMostNOf checks that of a set of path.Expression, including the attribute this validator is applied to, at most 'n' have a non-null value.

Any relative path.Expression will be resolved using the attribute being validated.

type ParseCidrValidator

type ParseCidrValidator struct {
	// contains filtered or unexported fields
}

func (ParseCidrValidator) Description

func (o ParseCidrValidator) Description(_ context.Context) string

func (ParseCidrValidator) MarkdownDescription

func (o ParseCidrValidator) MarkdownDescription(ctx context.Context) string

func (ParseCidrValidator) ValidateString

type ParseImageDimensionValidator added in v0.1.34

type ParseImageDimensionValidator struct {
	// contains filtered or unexported fields
}

func (ParseImageDimensionValidator) Description added in v0.1.34

func (ParseImageDimensionValidator) MarkdownDescription added in v0.1.34

func (o ParseImageDimensionValidator) MarkdownDescription(ctx context.Context) string

func (ParseImageDimensionValidator) ValidateString added in v0.1.34

type ParseImageSizeValidator added in v0.1.34

type ParseImageSizeValidator struct {
	// contains filtered or unexported fields
}

func (ParseImageSizeValidator) Description added in v0.1.34

func (o ParseImageSizeValidator) Description(_ context.Context) string

func (ParseImageSizeValidator) MarkdownDescription added in v0.1.34

func (o ParseImageSizeValidator) MarkdownDescription(ctx context.Context) string

func (ParseImageSizeValidator) ValidateString added in v0.1.34

type ParseImageTypeValidator added in v0.1.34

type ParseImageTypeValidator struct {
	// contains filtered or unexported fields
}

func (ParseImageTypeValidator) Description added in v0.1.34

func (o ParseImageTypeValidator) Description(_ context.Context) string

func (ParseImageTypeValidator) MarkdownDescription added in v0.1.34

func (o ParseImageTypeValidator) MarkdownDescription(ctx context.Context) string

func (ParseImageTypeValidator) ValidateString added in v0.1.34

type ParseIntValidator

type ParseIntValidator struct {
	// contains filtered or unexported fields
}

func (ParseIntValidator) Description

func (o ParseIntValidator) Description(_ context.Context) string

func (ParseIntValidator) MarkdownDescription

func (o ParseIntValidator) MarkdownDescription(ctx context.Context) string

func (ParseIntValidator) ValidateString

type ParseIpValidator

type ParseIpValidator struct {
	// contains filtered or unexported fields
}

func (ParseIpValidator) Description

func (o ParseIpValidator) Description(_ context.Context) string

func (ParseIpValidator) MarkdownDescription

func (o ParseIpValidator) MarkdownDescription(ctx context.Context) string

func (ParseIpValidator) ValidateString

type ParseMacValidator

type ParseMacValidator struct{}

func (ParseMacValidator) Description

func (o ParseMacValidator) Description(_ context.Context) string

func (ParseMacValidator) MarkdownDescription

func (o ParseMacValidator) MarkdownDescription(ctx context.Context) string

func (ParseMacValidator) ValidateString

type ParseMagicValidator added in v0.1.32

type ParseMagicValidator struct{}

func (ParseMagicValidator) Description added in v0.1.32

func (o ParseMagicValidator) Description(_ context.Context) string

func (ParseMagicValidator) MarkdownDescription added in v0.1.32

func (o ParseMagicValidator) MarkdownDescription(ctx context.Context) string

func (ParseMagicValidator) ValidateString added in v0.1.32

type ParseNameValidator

type ParseNameValidator struct{}

func (ParseNameValidator) Description

func (o ParseNameValidator) Description(_ context.Context) string

func (ParseNameValidator) MarkdownDescription

func (o ParseNameValidator) MarkdownDescription(ctx context.Context) string

func (ParseNameValidator) ValidateString

type ParseNetmaskValidator

type ParseNetmaskValidator struct {
	// contains filtered or unexported fields
}

func (ParseNetmaskValidator) Description

func (o ParseNetmaskValidator) Description(_ context.Context) string

func (ParseNetmaskValidator) MarkdownDescription

func (o ParseNetmaskValidator) MarkdownDescription(ctx context.Context) string

func (ParseNetmaskValidator) ValidateString

type ParseRangeOfIntValidator added in v0.1.13

type ParseRangeOfIntValidator struct {
	// contains filtered or unexported fields
}

func (ParseRangeOfIntValidator) Description added in v0.1.13

func (ParseRangeOfIntValidator) MarkdownDescription added in v0.1.13

func (o ParseRangeOfIntValidator) MarkdownDescription(ctx context.Context) string

func (ParseRangeOfIntValidator) ValidateString added in v0.1.13

type ParseVarValidator

type ParseVarValidator struct{}

func (ParseVarValidator) Description

func (o ParseVarValidator) Description(_ context.Context) string

func (ParseVarValidator) MarkdownDescription

func (o ParseVarValidator) MarkdownDescription(ctx context.Context) string

func (ParseVarValidator) ValidateString

type RequiredWhenValueIsNullRequest added in v0.1.37

type RequiredWhenValueIsNullRequest struct {
	Config         tfsdk.Config
	ConfigValue    attr.Value
	Path           path.Path
	PathExpression path.Expression
}

type RequiredWhenValueIsNullResponse added in v0.1.37

type RequiredWhenValueIsNullResponse struct {
	Diagnostics diag.Diagnostics
}

type RequiredWhenValueIsNullValidator added in v0.1.37

type RequiredWhenValueIsNullValidator struct {
	// contains filtered or unexported fields
}

func RequiredWhenValueIsNull added in v0.1.37

func RequiredWhenValueIsNull(expression path.Expression) RequiredWhenValueIsNullValidator

func (RequiredWhenValueIsNullValidator) Description added in v0.1.37

func (RequiredWhenValueIsNullValidator) MarkdownDescription added in v0.1.37

func (o RequiredWhenValueIsNullValidator) MarkdownDescription(ctx context.Context) string

func (RequiredWhenValueIsNullValidator) Validate added in v0.1.37

func (RequiredWhenValueIsNullValidator) ValidateBool added in v0.1.37

func (RequiredWhenValueIsNullValidator) ValidateFloat64 added in v0.1.37

func (RequiredWhenValueIsNullValidator) ValidateInt64 added in v0.1.37

func (RequiredWhenValueIsNullValidator) ValidateList added in v0.1.37

func (RequiredWhenValueIsNullValidator) ValidateMap added in v0.1.37

func (RequiredWhenValueIsNullValidator) ValidateNumber added in v0.1.37

func (RequiredWhenValueIsNullValidator) ValidateObject added in v0.1.37

func (RequiredWhenValueIsNullValidator) ValidateSet added in v0.1.37

func (RequiredWhenValueIsNullValidator) ValidateString added in v0.1.37

type RequiredWhenValueIsRequest added in v0.1.8

type RequiredWhenValueIsRequest struct {
	Config         tfsdk.Config
	ConfigValue    attr.Value
	Path           path.Path
	PathExpression path.Expression
}

type RequiredWhenValueIsResponse added in v0.1.8

type RequiredWhenValueIsResponse struct {
	Diagnostics diag.Diagnostics
}

type RequiredWhenValueIsValidator added in v0.1.8

type RequiredWhenValueIsValidator struct {
	// contains filtered or unexported fields
}

func RequiredWhenValueIs added in v0.1.8

func RequiredWhenValueIs(expression path.Expression, value attr.Value) RequiredWhenValueIsValidator

func (RequiredWhenValueIsValidator) Description added in v0.1.8

func (RequiredWhenValueIsValidator) MarkdownDescription added in v0.1.8

func (o RequiredWhenValueIsValidator) MarkdownDescription(ctx context.Context) string

func (RequiredWhenValueIsValidator) Validate added in v0.1.8

func (RequiredWhenValueIsValidator) ValidateBool added in v0.1.8

func (RequiredWhenValueIsValidator) ValidateFloat64 added in v0.1.8

func (RequiredWhenValueIsValidator) ValidateInt64 added in v0.1.8

func (RequiredWhenValueIsValidator) ValidateList added in v0.1.8

func (RequiredWhenValueIsValidator) ValidateMap added in v0.1.8

func (RequiredWhenValueIsValidator) ValidateNumber added in v0.1.8

func (RequiredWhenValueIsValidator) ValidateObject added in v0.1.8

func (RequiredWhenValueIsValidator) ValidateSet added in v0.1.8

func (RequiredWhenValueIsValidator) ValidateString added in v0.1.8

Jump to

Keyboard shortcuts

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