internal

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 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
	Int32Validator  validator.Int32
	Int64Validator  validator.Int64
	SetValidator    validator.Set
	ListValidator   validator.List
	BoolValidator   validator.Bool
	MapValidator    validator.Map
	ObjectValidator validator.Object
}

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) ValidateInt32 added in v1.13.0

func (v NotValidator) ValidateInt32(ctx context.Context, req validator.Int32Request, resp *validator.Int32Response)

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) ValidateObject added in v1.11.0

func (v NotValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse)

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

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

NullIfAttributeIsOneOf is the underlying struct implementing AlsoRequires.

func (NullIfAttributeIsOneOf) Description

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

func (NullIfAttributeIsOneOf) MarkdownDescription

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

func (NullIfAttributeIsOneOf) Validate

func (NullIfAttributeIsOneOf) ValidateBool

func (NullIfAttributeIsOneOf) ValidateFloat64

func (NullIfAttributeIsOneOf) ValidateInt32 added in v1.13.0

func (NullIfAttributeIsOneOf) ValidateInt64

func (NullIfAttributeIsOneOf) ValidateList

func (NullIfAttributeIsOneOf) ValidateMap

func (NullIfAttributeIsOneOf) ValidateNumber

func (NullIfAttributeIsOneOf) ValidateObject

func (NullIfAttributeIsOneOf) ValidateSet

func (NullIfAttributeIsOneOf) ValidateString

type NullIfAttributeIsOneOfRequest

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

type NullIfAttributeIsOneOfResponse

type NullIfAttributeIsOneOfResponse struct {
	Diagnostics diag.Diagnostics
}

type NullIfAttributeIsSet

type NullIfAttributeIsSet struct {
	PathExpression path.Expression
}

NullIfAttributeIsSet is the underlying struct implementing AlsoRequires.

func (NullIfAttributeIsSet) Description

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

func (NullIfAttributeIsSet) MarkdownDescription

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

func (NullIfAttributeIsSet) Validate

func (NullIfAttributeIsSet) ValidateBool

func (NullIfAttributeIsSet) ValidateFloat64

func (NullIfAttributeIsSet) ValidateInt32 added in v1.13.0

func (NullIfAttributeIsSet) ValidateInt64

func (NullIfAttributeIsSet) ValidateList

func (NullIfAttributeIsSet) ValidateMap

func (NullIfAttributeIsSet) ValidateNumber

func (NullIfAttributeIsSet) ValidateObject

func (NullIfAttributeIsSet) ValidateSet

func (NullIfAttributeIsSet) ValidateString

type NullIfAttributeIsSetRequest

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

type NullIfAttributeIsSetResponse

type NullIfAttributeIsSetResponse struct {
	Diagnostics diag.Diagnostics
}

type OneOfWithDescription

type OneOfWithDescription struct {
	Value       attr.Value
	Description string
}

type OneOfWithDescriptionIfAttributeIsOneOf added in v1.10.0

type OneOfWithDescriptionIfAttributeIsOneOf struct {
	Value       attr.Value
	Description string
}

type OneOfWithDescriptionIfAttributeIsOneOfValidator added in v1.10.0

type OneOfWithDescriptionIfAttributeIsOneOfValidator struct {
	PathExpression path.Expression
	Values         []OneOfWithDescriptionIfAttributeIsOneOf
	ExceptedValues []attr.Value
}

OneOfWithDescriptionValidator validates that the value matches one of expected values.

func (OneOfWithDescriptionIfAttributeIsOneOfValidator) Description added in v1.10.0

func (OneOfWithDescriptionIfAttributeIsOneOfValidator) MarkdownDescription added in v1.10.0

func (OneOfWithDescriptionIfAttributeIsOneOfValidator) ValidateFloat64 added in v1.10.0

Float64 validates that the value matches one of expected values.

func (OneOfWithDescriptionIfAttributeIsOneOfValidator) ValidateInt32 added in v1.13.0

Int32 validates that the value matches one of expected values.

func (OneOfWithDescriptionIfAttributeIsOneOfValidator) ValidateInt64 added in v1.10.0

Int64 validates that the value matches one of expected values.

func (OneOfWithDescriptionIfAttributeIsOneOfValidator) ValidateList added in v1.10.0

List validates that the value matches one of expected values.

func (OneOfWithDescriptionIfAttributeIsOneOfValidator) ValidateMap added in v1.10.0

Map validates that the value matches one of expected values.

func (OneOfWithDescriptionIfAttributeIsOneOfValidator) ValidateNumber added in v1.10.0

Number validates that the value matches one of expected values.

func (OneOfWithDescriptionIfAttributeIsOneOfValidator) ValidateSet added in v1.10.0

Set validates that the value matches one of expected values.

func (OneOfWithDescriptionIfAttributeIsOneOfValidator) ValidateString added in v1.10.0

type OneOfWithDescriptionIfAttributeIsOneOfValidatorRequest added in v1.10.0

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

type OneOfWithDescriptionIfAttributeIsOneOfValidatorResponse added in v1.10.0

type OneOfWithDescriptionIfAttributeIsOneOfValidatorResponse struct {
	Diagnostics diag.Diagnostics
}

type OneOfWithDescriptionValidator

type OneOfWithDescriptionValidator struct {
	Values []OneOfWithDescription
	Format OneOfWithDescriptionValidatorOutputFormat
}

OneOfWithDescriptionValidator validates that the value matches one of expected values.

func (OneOfWithDescriptionValidator) Description

func (OneOfWithDescriptionValidator) MarkdownDescription

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

func (OneOfWithDescriptionValidator) ValidateFloat64

Float64 validates that the value matches one of expected values.

func (OneOfWithDescriptionValidator) ValidateInt32 added in v1.13.0

Int32 validates that the value matches one of expected values.

func (OneOfWithDescriptionValidator) ValidateInt64

Int64 validates that the value matches one of expected values.

func (OneOfWithDescriptionValidator) ValidateList

List validates that the value matches one of expected values.

func (OneOfWithDescriptionValidator) ValidateMap

Map validates that the value matches one of expected values.

func (OneOfWithDescriptionValidator) ValidateNumber

Number validates that the value matches one of expected values.

func (OneOfWithDescriptionValidator) ValidateSet

Set validates that the value matches one of expected values.

func (OneOfWithDescriptionValidator) ValidateString

type OneOfWithDescriptionValidatorOutputFormat added in v1.14.1

type OneOfWithDescriptionValidatorOutputFormat string
const (
	// List format will display the values as a list separated by commas.
	// ex: value1, value2
	OneOfWithDescriptionValidatorOutputFormatList OneOfWithDescriptionValidatorOutputFormat = "list"
	// Point format will display the values as a formatted markdown point.
	// ex:
	//   - `value1` (description1)
	//   - `value2` (description2)
	OneOfWithDescriptionValidatorOutputFormatPoint OneOfWithDescriptionValidatorOutputFormat = "point"
)

type OneOfWithDescriptionValidatorRequest

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

type OneOfWithDescriptionValidatorResponse

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) ValidateInt32 added in v1.13.0

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

type RequireIfAttributeIsSet struct {
	PathExpression path.Expression
}

RequireIfAttributeIsSet is the underlying struct implementing AlsoRequires.

func (RequireIfAttributeIsSet) Description

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

func (RequireIfAttributeIsSet) MarkdownDescription

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

func (RequireIfAttributeIsSet) Validate

func (RequireIfAttributeIsSet) ValidateBool

func (RequireIfAttributeIsSet) ValidateFloat64

func (RequireIfAttributeIsSet) ValidateInt32 added in v1.13.0

func (RequireIfAttributeIsSet) ValidateInt64

func (RequireIfAttributeIsSet) ValidateList

func (RequireIfAttributeIsSet) ValidateMap

func (RequireIfAttributeIsSet) ValidateNumber

func (RequireIfAttributeIsSet) ValidateObject

func (RequireIfAttributeIsSet) ValidateSet

func (RequireIfAttributeIsSet) ValidateString

type RequireIfAttributeIsSetRequest

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

type RequireIfAttributeIsSetResponse

type RequireIfAttributeIsSetResponse struct {
	Diagnostics diag.Diagnostics
}

Jump to

Keyboard shortcuts

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