schemavalidator

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 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 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) ValidateFloat64

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) ValidateFloat64

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) ValidateFloat64

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
}

Jump to

Keyboard shortcuts

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