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 ¶
- type AlsoRequiresValidator
- func (av AlsoRequiresValidator) Description(ctx context.Context) string
- func (av AlsoRequiresValidator) MarkdownDescription(_ context.Context) string
- func (av AlsoRequiresValidator) Validate(ctx context.Context, req AlsoRequiresValidatorRequest, ...)
- func (av AlsoRequiresValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
- func (av AlsoRequiresValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, ...)
- func (av AlsoRequiresValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
- func (av AlsoRequiresValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
- func (av AlsoRequiresValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
- func (av AlsoRequiresValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, ...)
- func (av AlsoRequiresValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, ...)
- func (av AlsoRequiresValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
- func (av AlsoRequiresValidator) ValidateString(ctx context.Context, req validator.StringRequest, ...)
- type AlsoRequiresValidatorRequest
- type AlsoRequiresValidatorResponse
- type AtLeastOneOfValidator
- func (av AtLeastOneOfValidator) Description(ctx context.Context) string
- func (av AtLeastOneOfValidator) MarkdownDescription(_ context.Context) string
- func (av AtLeastOneOfValidator) Validate(ctx context.Context, req AtLeastOneOfValidatorRequest, ...)
- func (av AtLeastOneOfValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
- func (av AtLeastOneOfValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, ...)
- func (av AtLeastOneOfValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
- func (av AtLeastOneOfValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
- func (av AtLeastOneOfValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
- func (av AtLeastOneOfValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, ...)
- func (av AtLeastOneOfValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, ...)
- func (av AtLeastOneOfValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
- func (av AtLeastOneOfValidator) ValidateString(ctx context.Context, req validator.StringRequest, ...)
- type AtLeastOneOfValidatorRequest
- type AtLeastOneOfValidatorResponse
- type ConflictsWithValidator
- func (av ConflictsWithValidator) Description(ctx context.Context) string
- func (av ConflictsWithValidator) MarkdownDescription(_ context.Context) string
- func (av ConflictsWithValidator) Validate(ctx context.Context, req ConflictsWithValidatorRequest, ...)
- func (av ConflictsWithValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
- func (av ConflictsWithValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, ...)
- func (av ConflictsWithValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
- func (av ConflictsWithValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
- func (av ConflictsWithValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
- func (av ConflictsWithValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, ...)
- func (av ConflictsWithValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, ...)
- func (av ConflictsWithValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
- func (av ConflictsWithValidator) ValidateString(ctx context.Context, req validator.StringRequest, ...)
- type ConflictsWithValidatorRequest
- type ConflictsWithValidatorResponse
- type ExactlyOneOfValidator
- func (av ExactlyOneOfValidator) Description(ctx context.Context) string
- func (av ExactlyOneOfValidator) MarkdownDescription(_ context.Context) string
- func (av ExactlyOneOfValidator) Validate(ctx context.Context, req ExactlyOneOfValidatorRequest, ...)
- func (av ExactlyOneOfValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
- func (av ExactlyOneOfValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, ...)
- func (av ExactlyOneOfValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
- func (av ExactlyOneOfValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
- func (av ExactlyOneOfValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
- func (av ExactlyOneOfValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, ...)
- func (av ExactlyOneOfValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, ...)
- func (av ExactlyOneOfValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
- func (av ExactlyOneOfValidator) ValidateString(ctx context.Context, req validator.StringRequest, ...)
- type ExactlyOneOfValidatorRequest
- type ExactlyOneOfValidatorResponse
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 (av AlsoRequiresValidator) Validate(ctx context.Context, req AlsoRequiresValidatorRequest, res *AlsoRequiresValidatorResponse)
func (AlsoRequiresValidator) ValidateBool ¶
func (av AlsoRequiresValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
func (AlsoRequiresValidator) ValidateFloat64 ¶
func (av AlsoRequiresValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, resp *validator.Float64Response)
func (AlsoRequiresValidator) ValidateInt64 ¶
func (av AlsoRequiresValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
func (AlsoRequiresValidator) ValidateList ¶
func (av AlsoRequiresValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
func (AlsoRequiresValidator) ValidateMap ¶
func (av AlsoRequiresValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
func (AlsoRequiresValidator) ValidateNumber ¶
func (av AlsoRequiresValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, resp *validator.NumberResponse)
func (AlsoRequiresValidator) ValidateObject ¶
func (av AlsoRequiresValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse)
func (AlsoRequiresValidator) ValidateSet ¶
func (av AlsoRequiresValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
func (AlsoRequiresValidator) ValidateString ¶
func (av AlsoRequiresValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)
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 (av AtLeastOneOfValidator) Validate(ctx context.Context, req AtLeastOneOfValidatorRequest, res *AtLeastOneOfValidatorResponse)
func (AtLeastOneOfValidator) ValidateBool ¶
func (av AtLeastOneOfValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
func (AtLeastOneOfValidator) ValidateFloat64 ¶
func (av AtLeastOneOfValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, resp *validator.Float64Response)
func (AtLeastOneOfValidator) ValidateInt64 ¶
func (av AtLeastOneOfValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
func (AtLeastOneOfValidator) ValidateList ¶
func (av AtLeastOneOfValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
func (AtLeastOneOfValidator) ValidateMap ¶
func (av AtLeastOneOfValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
func (AtLeastOneOfValidator) ValidateNumber ¶
func (av AtLeastOneOfValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, resp *validator.NumberResponse)
func (AtLeastOneOfValidator) ValidateObject ¶
func (av AtLeastOneOfValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse)
func (AtLeastOneOfValidator) ValidateSet ¶
func (av AtLeastOneOfValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
func (AtLeastOneOfValidator) ValidateString ¶
func (av AtLeastOneOfValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)
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 (av ConflictsWithValidator) Validate(ctx context.Context, req ConflictsWithValidatorRequest, res *ConflictsWithValidatorResponse)
func (ConflictsWithValidator) ValidateBool ¶
func (av ConflictsWithValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
func (ConflictsWithValidator) ValidateFloat64 ¶
func (av ConflictsWithValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, resp *validator.Float64Response)
func (ConflictsWithValidator) ValidateInt64 ¶
func (av ConflictsWithValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
func (ConflictsWithValidator) ValidateList ¶
func (av ConflictsWithValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
func (ConflictsWithValidator) ValidateMap ¶
func (av ConflictsWithValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
func (ConflictsWithValidator) ValidateNumber ¶
func (av ConflictsWithValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, resp *validator.NumberResponse)
func (ConflictsWithValidator) ValidateObject ¶
func (av ConflictsWithValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse)
func (ConflictsWithValidator) ValidateSet ¶
func (av ConflictsWithValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
func (ConflictsWithValidator) ValidateString ¶
func (av ConflictsWithValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)
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 (av ExactlyOneOfValidator) Validate(ctx context.Context, req ExactlyOneOfValidatorRequest, res *ExactlyOneOfValidatorResponse)
func (ExactlyOneOfValidator) ValidateBool ¶
func (av ExactlyOneOfValidator) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse)
func (ExactlyOneOfValidator) ValidateFloat64 ¶
func (av ExactlyOneOfValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, resp *validator.Float64Response)
func (ExactlyOneOfValidator) ValidateInt64 ¶
func (av ExactlyOneOfValidator) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response)
func (ExactlyOneOfValidator) ValidateList ¶
func (av ExactlyOneOfValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
func (ExactlyOneOfValidator) ValidateMap ¶
func (av ExactlyOneOfValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
func (ExactlyOneOfValidator) ValidateNumber ¶
func (av ExactlyOneOfValidator) ValidateNumber(ctx context.Context, req validator.NumberRequest, resp *validator.NumberResponse)
func (ExactlyOneOfValidator) ValidateObject ¶
func (av ExactlyOneOfValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse)
func (ExactlyOneOfValidator) ValidateSet ¶
func (av ExactlyOneOfValidator) ValidateSet(ctx context.Context, req validator.SetRequest, resp *validator.SetResponse)
func (ExactlyOneOfValidator) ValidateString ¶
func (av ExactlyOneOfValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse)
type ExactlyOneOfValidatorResponse ¶
type ExactlyOneOfValidatorResponse struct {
Diagnostics diag.Diagnostics
}