schemavalidator

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConflictsIfMatchesPathValueValidator added in v0.16.0

type ConflictsIfMatchesPathValueValidator struct {
	TargetValue basetypes.StringValue
	Expressions path.Expressions
}

ConflictsIfMatchesPathValueValidator validates that if the provided string value equals the value at the provided path expression(s), the attribute with the validator will be in conflict and should produce a plan error.

If a list of expressions is provided, all expressions are checked until a match is found, or the list of expressions is exhausted.

func (ConflictsIfMatchesPathValueValidator) Description added in v0.16.0

Description describes the validation in plain text formatting.

func (ConflictsIfMatchesPathValueValidator) MarkdownDescription added in v0.16.0

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

MarkdownDescription describes the validation in Markdown formatting.

func (ConflictsIfMatchesPathValueValidator) Validate added in v0.16.0

Validate runs the main validation logic of the validator, reading configuration data out of `req` and updating `resp` with diagnostics.

func (ConflictsIfMatchesPathValueValidator) ValidateBool added in v0.16.0

func (ConflictsIfMatchesPathValueValidator) ValidateFloat32 added in v1.2.0

func (ConflictsIfMatchesPathValueValidator) ValidateFloat64 added in v0.16.0

func (ConflictsIfMatchesPathValueValidator) ValidateInt32 added in v1.2.0

func (ConflictsIfMatchesPathValueValidator) ValidateInt64 added in v0.16.0

func (ConflictsIfMatchesPathValueValidator) ValidateList added in v0.16.0

func (ConflictsIfMatchesPathValueValidator) ValidateMap added in v0.16.0

func (ConflictsIfMatchesPathValueValidator) ValidateNumber added in v0.16.0

func (ConflictsIfMatchesPathValueValidator) ValidateObject added in v0.16.0

func (ConflictsIfMatchesPathValueValidator) ValidateSet added in v0.16.0

func (ConflictsIfMatchesPathValueValidator) ValidateString added in v0.16.0

type ConflictsIfMatchesPathValueValidatorRequest added in v0.16.0

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

type ConflictsIfMatchesPathValueValidatorResponse added in v0.16.0

type ConflictsIfMatchesPathValueValidatorResponse struct {
	Diagnostics diag.Diagnostics
}

type IsRequiredIfMatchesPathValueValidator

type IsRequiredIfMatchesPathValueValidator struct {
	TargetValue basetypes.StringValue
	Expressions path.Expressions
}

IsRequiredIfMatchesPathValueValidator validates if the provided string value equals the value at the provided path expression(s). If matched, the current arguemnt is required.

If a list of expressions is provided, all expressions are checked until a match is found, or the list of expressions is exhausted.

func (IsRequiredIfMatchesPathValueValidator) Description

Description describes the validation in plain text formatting.

func (IsRequiredIfMatchesPathValueValidator) MarkdownDescription

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

MarkdownDescription describes the validation in Markdown formatting.

func (IsRequiredIfMatchesPathValueValidator) Validate

Validate runs the main validation logic of the validator, reading configuration data out of `req` and updating `resp` with diagnostics.

func (IsRequiredIfMatchesPathValueValidator) ValidateBool

func (IsRequiredIfMatchesPathValueValidator) ValidateFloat32 added in v1.2.0

func (IsRequiredIfMatchesPathValueValidator) ValidateFloat64

func (IsRequiredIfMatchesPathValueValidator) ValidateInt32 added in v1.2.0

func (IsRequiredIfMatchesPathValueValidator) ValidateInt64

func (IsRequiredIfMatchesPathValueValidator) ValidateList

func (IsRequiredIfMatchesPathValueValidator) ValidateMap

func (IsRequiredIfMatchesPathValueValidator) ValidateNumber

func (IsRequiredIfMatchesPathValueValidator) ValidateObject

func (IsRequiredIfMatchesPathValueValidator) ValidateSet

func (IsRequiredIfMatchesPathValueValidator) ValidateString

type IsRequiredIfMatchesPathValueValidatorRequest

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

type IsRequiredIfMatchesPathValueValidatorResponse

type IsRequiredIfMatchesPathValueValidatorResponse struct {
	Diagnostics diag.Diagnostics
}

type IsRequiredIfRegexMatchesPathValueValidator

type IsRequiredIfRegexMatchesPathValueValidator struct {
	Regexp      *regexp.Regexp
	Message     string
	Expressions path.Expressions
}

IsRequiredIfRegexMatchesPathValueValidator validates if the provided regex matches the value at the provided path expression(s). If matched, the current argument is required.

If a list of expressions is provided, all expressions are checked until a match is found, or the list of expressions is exhausted.

func (IsRequiredIfRegexMatchesPathValueValidator) Description

Description describes the validation in plain text formatting.

func (IsRequiredIfRegexMatchesPathValueValidator) MarkdownDescription

MarkdownDescription describes the validation in Markdown formatting.

func (IsRequiredIfRegexMatchesPathValueValidator) Validate

Validate runs the main validation logic of the validator, reading configuration data out of `req` and updating `resp` with diagnostics.

func (IsRequiredIfRegexMatchesPathValueValidator) ValidateBool

func (IsRequiredIfRegexMatchesPathValueValidator) ValidateFloat32 added in v1.2.0

func (IsRequiredIfRegexMatchesPathValueValidator) ValidateFloat64

func (IsRequiredIfRegexMatchesPathValueValidator) ValidateInt32 added in v1.2.0

func (IsRequiredIfRegexMatchesPathValueValidator) ValidateInt64

func (IsRequiredIfRegexMatchesPathValueValidator) ValidateList

func (IsRequiredIfRegexMatchesPathValueValidator) ValidateMap

func (IsRequiredIfRegexMatchesPathValueValidator) ValidateNumber

func (IsRequiredIfRegexMatchesPathValueValidator) ValidateObject

func (IsRequiredIfRegexMatchesPathValueValidator) ValidateSet

func (IsRequiredIfRegexMatchesPathValueValidator) ValidateString

type IsRequiredIfRegexMatchesPathValueValidatorRequest

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

type IsRequiredIfRegexMatchesPathValueValidatorResponse

type IsRequiredIfRegexMatchesPathValueValidatorResponse struct {
	Diagnostics diag.Diagnostics
}

type RegexMatchesPathValueValidator

type RegexMatchesPathValueValidator struct {
	Regexp      *regexp.Regexp
	Message     string
	Expressions path.Expressions
}

RegexMatchesPathValueValidator validates if the provided regex matches the value at the provided path expression(s). If a list of expressions is provided, all expressions are checked until a match is found, or the list of expressions is exhausted.

func (RegexMatchesPathValueValidator) Description

Description describes the validation in plain text formatting.

func (RegexMatchesPathValueValidator) MarkdownDescription

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

MarkdownDescription describes the validation in Markdown formatting.

func (RegexMatchesPathValueValidator) Validate

Validate runs the main validation logic of the validator, reading configuration data out of `req` and updating `resp` with diagnostics.

func (RegexMatchesPathValueValidator) ValidateBool

func (RegexMatchesPathValueValidator) ValidateFloat32 added in v1.2.0

func (RegexMatchesPathValueValidator) ValidateFloat64

func (RegexMatchesPathValueValidator) ValidateInt32 added in v1.2.0

func (RegexMatchesPathValueValidator) ValidateInt64

func (RegexMatchesPathValueValidator) ValidateList

func (RegexMatchesPathValueValidator) ValidateMap

func (RegexMatchesPathValueValidator) ValidateNumber

func (RegexMatchesPathValueValidator) ValidateObject

func (RegexMatchesPathValueValidator) ValidateSet

func (RegexMatchesPathValueValidator) ValidateString

type RegexMatchesPathValueValidatorRequest

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

type RegexMatchesPathValueValidatorResponse

type RegexMatchesPathValueValidatorResponse struct {
	Diagnostics diag.Diagnostics
}

type ShouldBeDefinedValueIfPathMatchesValueValidator added in v0.17.0

type ShouldBeDefinedValueIfPathMatchesValueValidator struct {
	AttributeValue  basetypes.StringValue
	TargetPathValue basetypes.StringValue
	Expressions     path.Expressions
}

ShouldBeDefinedValueIfPathMatchesValueValidator validates that the attribute to which this validator is configured should be a specific value if the given path matches the given value.

If a list of expressions is provided, all expressions are checked until a match is found, or the list of expressions is exhausted.

func (ShouldBeDefinedValueIfPathMatchesValueValidator) Description added in v0.17.0

Description describes the validation in plain text formatting.

func (ShouldBeDefinedValueIfPathMatchesValueValidator) MarkdownDescription added in v0.17.0

MarkdownDescription describes the validation in Markdown formatting.

func (ShouldBeDefinedValueIfPathMatchesValueValidator) Validate added in v0.17.0

Validate runs the main validation logic of the validator, reading configuration data out of `req` and updating `resp` with diagnostics.

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateBool added in v0.17.0

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateFloat64 added in v0.17.0

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateInt64 added in v0.17.0

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateList added in v0.17.0

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateMap added in v0.17.0

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateNumber added in v0.17.0

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateObject added in v0.17.0

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateSet added in v0.17.0

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateString added in v0.17.0

type ShouldBeDefinedValueIfPathMatchesValueValidatorRequest added in v0.17.0

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

type ShouldBeDefinedValueIfPathMatchesValueValidatorResponse added in v0.17.0

type ShouldBeDefinedValueIfPathMatchesValueValidatorResponse struct {
	Diagnostics diag.Diagnostics
}

Jump to

Keyboard shortcuts

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