schemavalidator

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package schemavalidator provides validators to express relationships between multiple attributes within the schema of a resource, data source, or provider. For example, checking that an attribute is present when another is present, or vice-versa.

These validators are implemented on a starting attribute, where relationships can be expressed as absolute paths to others or relative to the starting attribute. For multiple attribute validators that are defined outside the schema, which may be easier to implement in provider code generation situations or suit provider code preferences differently, refer to the datasourcevalidator, providervalidator, or resourcevalidator package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlsoRequiresValidator

type AlsoRequiresValidator struct {
	PathExpressions path.Expressions
}

AlsoRequiresValidator is the underlying struct implementing AlsoRequires.

func (AlsoRequiresValidator) Description

func (av AlsoRequiresValidator) Description(ctx context.Context) string

func (AlsoRequiresValidator) MarkdownDescription

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

func (AlsoRequiresValidator) Validate

func (AlsoRequiresValidator) ValidateBool

func (AlsoRequiresValidator) ValidateFloat64

func (AlsoRequiresValidator) ValidateInt64

func (AlsoRequiresValidator) ValidateList

func (AlsoRequiresValidator) ValidateMap

func (AlsoRequiresValidator) ValidateNumber

func (AlsoRequiresValidator) ValidateObject

func (AlsoRequiresValidator) ValidateSet

func (AlsoRequiresValidator) ValidateString

type AlsoRequiresValidatorRequest

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

type AlsoRequiresValidatorResponse

type AlsoRequiresValidatorResponse struct {
	Diagnostics diag.Diagnostics
}

type AtLeastOneOfValidator

type AtLeastOneOfValidator struct {
	PathExpressions path.Expressions
}

AtLeastOneOfValidator is the underlying struct implementing AtLeastOneOf.

func (AtLeastOneOfValidator) Description

func (av AtLeastOneOfValidator) Description(ctx context.Context) string

func (AtLeastOneOfValidator) MarkdownDescription

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

func (AtLeastOneOfValidator) Validate

func (AtLeastOneOfValidator) ValidateBool

func (AtLeastOneOfValidator) ValidateFloat64

func (AtLeastOneOfValidator) ValidateInt64

func (AtLeastOneOfValidator) ValidateList

func (AtLeastOneOfValidator) ValidateMap

func (AtLeastOneOfValidator) ValidateNumber

func (AtLeastOneOfValidator) ValidateObject

func (AtLeastOneOfValidator) ValidateSet

func (AtLeastOneOfValidator) ValidateString

type AtLeastOneOfValidatorRequest

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

type AtLeastOneOfValidatorResponse

type AtLeastOneOfValidatorResponse struct {
	Diagnostics diag.Diagnostics
}

type ConflictsWithValidator

type ConflictsWithValidator struct {
	PathExpressions path.Expressions
}

ConflictsWithValidator is the underlying struct implementing ConflictsWith.

func (ConflictsWithValidator) Description

func (av ConflictsWithValidator) Description(ctx context.Context) string

func (ConflictsWithValidator) MarkdownDescription

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

func (ConflictsWithValidator) Validate

func (ConflictsWithValidator) ValidateBool

func (ConflictsWithValidator) ValidateFloat64

func (ConflictsWithValidator) ValidateInt64

func (ConflictsWithValidator) ValidateList

func (ConflictsWithValidator) ValidateMap

func (ConflictsWithValidator) ValidateNumber

func (ConflictsWithValidator) ValidateObject

func (ConflictsWithValidator) ValidateSet

func (ConflictsWithValidator) ValidateString

type ConflictsWithValidatorRequest

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

type ConflictsWithValidatorResponse

type ConflictsWithValidatorResponse struct {
	Diagnostics diag.Diagnostics
}

type ExactlyOneOfValidator

type ExactlyOneOfValidator struct {
	PathExpressions path.Expressions
}

ExactlyOneOfValidator is the underlying struct implementing ExactlyOneOf.

func (ExactlyOneOfValidator) Description

func (av ExactlyOneOfValidator) Description(ctx context.Context) string

func (ExactlyOneOfValidator) MarkdownDescription

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

func (ExactlyOneOfValidator) Validate

func (ExactlyOneOfValidator) ValidateBool

func (ExactlyOneOfValidator) ValidateFloat64

func (ExactlyOneOfValidator) ValidateInt64

func (ExactlyOneOfValidator) ValidateList

func (ExactlyOneOfValidator) ValidateMap

func (ExactlyOneOfValidator) ValidateNumber

func (ExactlyOneOfValidator) ValidateObject

func (ExactlyOneOfValidator) ValidateSet

func (ExactlyOneOfValidator) ValidateString

type ExactlyOneOfValidatorRequest

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

type ExactlyOneOfValidatorResponse

type ExactlyOneOfValidatorResponse struct {
	Diagnostics diag.Diagnostics
}

Jump to

Keyboard shortcuts

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