attrvalidators

package
v1.6.6-prerelease.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConflictsWithNotEmpty added in v1.6.5

func ConflictsWithNotEmpty(expressions ...path.Expression) validator.List

ConflictsWithNotEmpty ensures that a list parameter is not null and not empty if incompatible with the other paths specified in input It differs from standard ConflictsWith which only checks if the parameter is not null

func EnumValueValidator

func EnumValueValidator(enumList []string) validator.String

func NewListValidator

func NewListValidator(desc string, validator func(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)) validator.List

func NewMapValidator

func NewMapValidator(desc string, validator func(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)) validator.Map

func NewObjectValidator

func NewObjectValidator(desc string, validator func(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse)) validator.Object

func NewStringValidator

func NewStringValidator(desc string, validator func(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)) validator.String

func NotEmptyMapValidator added in v1.5.0

func NotEmptyMapValidator() validator.Map

Types

type ConflictsWithNotEmptyValidator added in v1.6.5

type ConflictsWithNotEmptyValidator struct {
	PathExpressions path.Expressions
}

ConflictsWithNotEmptyValidator is the underlying struct implementing ConflictsWithNotEmpty.

func (ConflictsWithNotEmptyValidator) Description added in v1.6.5

func (ConflictsWithNotEmptyValidator) MarkdownDescription added in v1.6.5

func (v ConflictsWithNotEmptyValidator) MarkdownDescription(_ context.Context) string

func (ConflictsWithNotEmptyValidator) ValidateList added in v1.6.5

type ConflictsWithNotEmptyValidatorRequest added in v1.6.5

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

type ConflictsWithNotEmptyValidatorResponse added in v1.6.5

type ConflictsWithNotEmptyValidatorResponse struct {
	Diagnostics diag.Diagnostics
}

Jump to

Keyboard shortcuts

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