internal

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NotValidator

type NotValidator struct {
	// Required
	Desc validator.Describer

	// OneOf
	StringValidator validator.String
	Int64Validator  validator.Int64
	SetValidator    validator.Set
	ListValidator   validator.List
	BoolValidator   validator.Bool
	MapValidator    validator.Map
}

NotValidator validates that value does not validate against the value validator.

func (NotValidator) Description

func (v NotValidator) Description(ctx context.Context) string

Description describes the validation in plain text formatting.

func (NotValidator) MarkdownDescription

func (v NotValidator) MarkdownDescription(ctx context.Context) string

MarkdownDescription describes the validation in Markdown formatting.

func (NotValidator) ValidateBool

func (v NotValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)

Validate performs the validation. The validator will pass if it encounters a value validator that returns no errors and will then return any warnings from the passing validator. Using All validator as value validators will pass if all the validators supplied in an All validator pass.

func (NotValidator) ValidateInt64

func (v NotValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)

Validate performs the validation. The validator will pass if it encounters a value validator that returns no errors and will then return any warnings from the passing validator. Using All validator as value validators will pass if all the validators supplied in an All validator pass.

func (NotValidator) ValidateList

func (v NotValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)

Validate performs the validation. The validator will pass if it encounters a value validator that returns no errors and will then return any warnings from the passing validator. Using All validator as value validators will pass if all the validators supplied in an All validator pass.

func (NotValidator) ValidateMap

func (v NotValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)

Validate performs the validation. The validator will pass if it encounters a value validator that returns no errors and will then return any warnings from the passing validator. Using All validator as value validators will pass if all the validators supplied in an All validator pass.

func (NotValidator) ValidateSet

func (v NotValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)

Validate performs the validation. The validator will pass if it encounters a value validator that returns no errors and will then return any warnings from the passing validator. Using All validator as value validators will pass if all the validators supplied in an All validator pass.

func (NotValidator) ValidateString

func (v NotValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)

Validate performs the validation. The validator will pass if it encounters a value validator that returns no errors and will then return any warnings from the passing validator. Using All validator as value validators will pass if all the validators supplied in an All validator pass.

type RequireIfAttributeIsOneOf

type RequireIfAttributeIsOneOf struct {
	PathExpression path.Expression
	ExceptedValues []attr.Value
}

RequireIfAttributeIsOneOf is the underlying struct implementing AlsoRequires.

func (RequireIfAttributeIsOneOf) Description

func (av RequireIfAttributeIsOneOf) Description(_ context.Context) string

func (RequireIfAttributeIsOneOf) MarkdownDescription

func (av RequireIfAttributeIsOneOf) MarkdownDescription(_ context.Context) string

func (RequireIfAttributeIsOneOf) Validate

func (RequireIfAttributeIsOneOf) ValidateBool

func (RequireIfAttributeIsOneOf) ValidateFloat64

func (RequireIfAttributeIsOneOf) ValidateInt64

func (RequireIfAttributeIsOneOf) ValidateList

func (RequireIfAttributeIsOneOf) ValidateMap

func (RequireIfAttributeIsOneOf) ValidateNumber

func (RequireIfAttributeIsOneOf) ValidateObject

func (RequireIfAttributeIsOneOf) ValidateSet

func (RequireIfAttributeIsOneOf) ValidateString

type RequireIfAttributeIsOneOfRequest

type RequireIfAttributeIsOneOfRequest struct {
	Config         tfsdk.Config
	ConfigValue    attr.Value
	Path           path.Path
	PathExpression path.Expression
	ExceptedValues []attr.Value
}

type RequireIfAttributeIsOneOfResponse

type RequireIfAttributeIsOneOfResponse struct {
	Diagnostics diag.Diagnostics
}

Jump to

Keyboard shortcuts

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