internal

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MPL-2.0 Imports: 9 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 NullIfAttributeIsOneOf added in v1.6.0

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

NullIfAttributeIsOneOf is the underlying struct implementing AlsoRequires.

func (NullIfAttributeIsOneOf) Description added in v1.6.0

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

func (NullIfAttributeIsOneOf) MarkdownDescription added in v1.6.0

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

func (NullIfAttributeIsOneOf) Validate added in v1.6.0

func (NullIfAttributeIsOneOf) ValidateBool added in v1.6.0

func (NullIfAttributeIsOneOf) ValidateFloat64 added in v1.6.0

func (NullIfAttributeIsOneOf) ValidateInt64 added in v1.6.0

func (NullIfAttributeIsOneOf) ValidateList added in v1.6.0

func (NullIfAttributeIsOneOf) ValidateMap added in v1.6.0

func (NullIfAttributeIsOneOf) ValidateNumber added in v1.6.0

func (NullIfAttributeIsOneOf) ValidateObject added in v1.6.0

func (NullIfAttributeIsOneOf) ValidateSet added in v1.6.0

func (NullIfAttributeIsOneOf) ValidateString added in v1.6.0

type NullIfAttributeIsOneOfRequest added in v1.6.0

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

type NullIfAttributeIsOneOfResponse added in v1.6.0

type NullIfAttributeIsOneOfResponse struct {
	Diagnostics diag.Diagnostics
}

type NullIfAttributeIsSet added in v1.8.0

type NullIfAttributeIsSet struct {
	PathExpression path.Expression
}

NullIfAttributeIsSet is the underlying struct implementing AlsoRequires.

func (NullIfAttributeIsSet) Description added in v1.8.0

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

func (NullIfAttributeIsSet) MarkdownDescription added in v1.8.0

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

func (NullIfAttributeIsSet) Validate added in v1.8.0

func (NullIfAttributeIsSet) ValidateBool added in v1.8.0

func (NullIfAttributeIsSet) ValidateFloat64 added in v1.8.0

func (NullIfAttributeIsSet) ValidateInt64 added in v1.8.0

func (NullIfAttributeIsSet) ValidateList added in v1.8.0

func (NullIfAttributeIsSet) ValidateMap added in v1.8.0

func (NullIfAttributeIsSet) ValidateNumber added in v1.8.0

func (NullIfAttributeIsSet) ValidateObject added in v1.8.0

func (NullIfAttributeIsSet) ValidateSet added in v1.8.0

func (NullIfAttributeIsSet) ValidateString added in v1.8.0

type NullIfAttributeIsSetRequest added in v1.8.0

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

type NullIfAttributeIsSetResponse added in v1.8.0

type NullIfAttributeIsSetResponse struct {
	Diagnostics diag.Diagnostics
}

type OneOfWithDescription added in v1.5.0

type OneOfWithDescription struct {
	Value       attr.Value
	Description string
}

type OneOfWithDescriptionValidator added in v1.5.0

type OneOfWithDescriptionValidator struct {
	Values []OneOfWithDescription
}

OneOfWithDescriptionValidator validates that the value matches one of expected values.

func (OneOfWithDescriptionValidator) Description added in v1.5.0

func (OneOfWithDescriptionValidator) MarkdownDescription added in v1.5.0

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

func (OneOfWithDescriptionValidator) Validate added in v1.5.0

func (OneOfWithDescriptionValidator) ValidateFloat64 added in v1.5.0

Float64 validates that the value matches one of expected values.

func (OneOfWithDescriptionValidator) ValidateInt64 added in v1.5.0

Int64 validates that the value matches one of expected values.

func (OneOfWithDescriptionValidator) ValidateList added in v1.5.0

List validates that the value matches one of expected values.

func (OneOfWithDescriptionValidator) ValidateMap added in v1.5.0

Map validates that the value matches one of expected values.

func (OneOfWithDescriptionValidator) ValidateNumber added in v1.5.0

Number validates that the value matches one of expected values.

func (OneOfWithDescriptionValidator) ValidateSet added in v1.5.0

Set validates that the value matches one of expected values.

func (OneOfWithDescriptionValidator) ValidateString added in v1.5.0

type OneOfWithDescriptionValidatorRequest added in v1.5.0

type OneOfWithDescriptionValidatorRequest struct {
	Config         tfsdk.Config
	ConfigValue    attr.Value
	Path           path.Path
	PathExpression path.Expression
	Values         []OneOfWithDescription
}

type OneOfWithDescriptionValidatorResponse added in v1.5.0

type OneOfWithDescriptionValidatorResponse struct {
	Diagnostics diag.Diagnostics
}

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
}

type RequireIfAttributeIsSet added in v1.8.0

type RequireIfAttributeIsSet struct {
	PathExpression path.Expression
}

RequireIfAttributeIsSet is the underlying struct implementing AlsoRequires.

func (RequireIfAttributeIsSet) Description added in v1.8.0

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

func (RequireIfAttributeIsSet) MarkdownDescription added in v1.8.0

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

func (RequireIfAttributeIsSet) Validate added in v1.8.0

func (RequireIfAttributeIsSet) ValidateBool added in v1.8.0

func (RequireIfAttributeIsSet) ValidateFloat64 added in v1.8.0

func (RequireIfAttributeIsSet) ValidateInt64 added in v1.8.0

func (RequireIfAttributeIsSet) ValidateList added in v1.8.0

func (RequireIfAttributeIsSet) ValidateMap added in v1.8.0

func (RequireIfAttributeIsSet) ValidateNumber added in v1.8.0

func (RequireIfAttributeIsSet) ValidateObject added in v1.8.0

func (RequireIfAttributeIsSet) ValidateSet added in v1.8.0

func (RequireIfAttributeIsSet) ValidateString added in v1.8.0

type RequireIfAttributeIsSetRequest added in v1.8.0

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

type RequireIfAttributeIsSetResponse added in v1.8.0

type RequireIfAttributeIsSetResponse struct {
	Diagnostics diag.Diagnostics
}

Jump to

Keyboard shortcuts

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