schemavalidator

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 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

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

Description describes the validation in plain text formatting.

func (ConflictsIfMatchesPathValueValidator) MarkdownDescription

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

MarkdownDescription describes the validation in Markdown formatting.

func (ConflictsIfMatchesPathValueValidator) Validate

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

func (ConflictsIfMatchesPathValueValidator) ValidateBool

func (ConflictsIfMatchesPathValueValidator) ValidateFloat32

func (ConflictsIfMatchesPathValueValidator) ValidateFloat64

func (ConflictsIfMatchesPathValueValidator) ValidateInt32

func (ConflictsIfMatchesPathValueValidator) ValidateInt64

func (ConflictsIfMatchesPathValueValidator) ValidateList

func (ConflictsIfMatchesPathValueValidator) ValidateMap

func (ConflictsIfMatchesPathValueValidator) ValidateNumber

func (ConflictsIfMatchesPathValueValidator) ValidateObject

func (ConflictsIfMatchesPathValueValidator) ValidateSet

func (ConflictsIfMatchesPathValueValidator) ValidateString

type ConflictsIfMatchesPathValueValidatorRequest

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

type ConflictsIfMatchesPathValueValidatorResponse

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

func (IsRequiredIfMatchesPathValueValidator) ValidateFloat64

func (IsRequiredIfMatchesPathValueValidator) ValidateInt32

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

func (IsRequiredIfRegexMatchesPathValueValidator) ValidateFloat64

func (IsRequiredIfRegexMatchesPathValueValidator) ValidateInt32

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

func (RegexMatchesPathValueValidator) ValidateFloat64

func (RegexMatchesPathValueValidator) ValidateInt32

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

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

Description describes the validation in plain text formatting.

func (ShouldBeDefinedValueIfPathMatchesValueValidator) MarkdownDescription

MarkdownDescription describes the validation in Markdown formatting.

func (ShouldBeDefinedValueIfPathMatchesValueValidator) Validate

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

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateBool

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateFloat32

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateFloat64

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateInt32

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateInt64

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateList

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateMap

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateNumber

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateObject

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateSet

func (ShouldBeDefinedValueIfPathMatchesValueValidator) ValidateString

type ShouldBeDefinedValueIfPathMatchesValueValidatorRequest

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

type ShouldBeDefinedValueIfPathMatchesValueValidatorResponse

type ShouldBeDefinedValueIfPathMatchesValueValidatorResponse struct {
	Diagnostics diag.Diagnostics
}

Jump to

Keyboard shortcuts

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