Documentation
¶
Overview ¶
types contains shared attr.Type implementations for unit testing.
Index ¶
- func TestErrorDiagnostic(path *tftypes.AttributePath) diag.DiagnosticWithPath
- func TestWarningDiagnostic(path *tftypes.AttributePath) diag.DiagnosticWithPath
- type Bool
- type BoolType
- func (t BoolType) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)
- func (t BoolType) Equal(o attr.Type) bool
- func (t BoolType) String() string
- func (t BoolType) TerraformType(_ context.Context) tftypes.Type
- func (t BoolType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
- type BoolTypeWithValidateError
- type BoolTypeWithValidateWarning
- type ListTypeWithValidateError
- type ListTypeWithValidateWarning
- type MapTypeWithValidateError
- type MapTypeWithValidateWarning
- type Number
- type NumberType
- func (t NumberType) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)
- func (t NumberType) Equal(o attr.Type) bool
- func (t NumberType) String() string
- func (t NumberType) TerraformType(_ context.Context) tftypes.Type
- func (t NumberType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
- type NumberTypeWithValidateError
- type NumberTypeWithValidateWarning
- type SetTypeWithValidateError
- type SetTypeWithValidateWarning
- type String
- type StringType
- func (t StringType) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)
- func (t StringType) Equal(o attr.Type) bool
- func (t StringType) String() string
- func (t StringType) TerraformType(_ context.Context) tftypes.Type
- func (t StringType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
- type StringTypeWithValidateError
- func (t StringTypeWithValidateError) Equal(o attr.Type) bool
- func (t StringTypeWithValidateError) Validate(ctx context.Context, in tftypes.Value, path *tftypes.AttributePath) diag.Diagnostics
- func (s StringTypeWithValidateError) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
- type StringTypeWithValidateWarning
- func (t StringTypeWithValidateWarning) Equal(o attr.Type) bool
- func (t StringTypeWithValidateWarning) Validate(ctx context.Context, in tftypes.Value, path *tftypes.AttributePath) diag.Diagnostics
- func (s StringTypeWithValidateWarning) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestErrorDiagnostic ¶
func TestErrorDiagnostic(path *tftypes.AttributePath) diag.DiagnosticWithPath
func TestWarningDiagnostic ¶
func TestWarningDiagnostic(path *tftypes.AttributePath) diag.DiagnosticWithPath
Types ¶
type BoolType ¶
type BoolType struct{}
BoolType is a reimplementation of types.BoolType that can be used as a base for other extension types in testing.
func (BoolType) ApplyTerraform5AttributePathStep ¶
func (t BoolType) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)
type BoolTypeWithValidateError ¶
type BoolTypeWithValidateError struct {
BoolType
}
func (BoolTypeWithValidateError) Validate ¶
func (t BoolTypeWithValidateError) Validate(ctx context.Context, in tftypes.Value, path *tftypes.AttributePath) diag.Diagnostics
func (BoolTypeWithValidateError) ValueFromTerraform ¶
type BoolTypeWithValidateWarning ¶
type BoolTypeWithValidateWarning struct {
BoolType
}
func (BoolTypeWithValidateWarning) Validate ¶
func (t BoolTypeWithValidateWarning) Validate(ctx context.Context, in tftypes.Value, path *tftypes.AttributePath) diag.Diagnostics
func (BoolTypeWithValidateWarning) ValueFromTerraform ¶
type ListTypeWithValidateError ¶ added in v0.4.0
func (ListTypeWithValidateError) Validate ¶ added in v0.4.0
func (t ListTypeWithValidateError) Validate(ctx context.Context, in tftypes.Value, path *tftypes.AttributePath) diag.Diagnostics
type ListTypeWithValidateWarning ¶ added in v0.4.0
func (ListTypeWithValidateWarning) Validate ¶ added in v0.4.0
func (t ListTypeWithValidateWarning) Validate(ctx context.Context, in tftypes.Value, path *tftypes.AttributePath) diag.Diagnostics
type MapTypeWithValidateError ¶ added in v0.4.0
func (MapTypeWithValidateError) Validate ¶ added in v0.4.0
func (t MapTypeWithValidateError) Validate(ctx context.Context, in tftypes.Value, path *tftypes.AttributePath) diag.Diagnostics
type MapTypeWithValidateWarning ¶ added in v0.4.0
func (MapTypeWithValidateWarning) Validate ¶ added in v0.4.0
func (t MapTypeWithValidateWarning) Validate(ctx context.Context, in tftypes.Value, path *tftypes.AttributePath) diag.Diagnostics
type NumberType ¶
type NumberType struct{}
NumberType is a reimplementation of types.NumberType that can be used as a base for other extension types in testing.
func (NumberType) ApplyTerraform5AttributePathStep ¶
func (t NumberType) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)
func (NumberType) String ¶
func (t NumberType) String() string
func (NumberType) TerraformType ¶
func (t NumberType) TerraformType(_ context.Context) tftypes.Type
func (NumberType) ValueFromTerraform ¶
type NumberTypeWithValidateError ¶
type NumberTypeWithValidateError struct {
NumberType
}
func (NumberTypeWithValidateError) Validate ¶
func (t NumberTypeWithValidateError) Validate(ctx context.Context, in tftypes.Value, path *tftypes.AttributePath) diag.Diagnostics
func (NumberTypeWithValidateError) ValueFromTerraform ¶
type NumberTypeWithValidateWarning ¶
type NumberTypeWithValidateWarning struct {
NumberType
}
func (NumberTypeWithValidateWarning) Validate ¶
func (t NumberTypeWithValidateWarning) Validate(ctx context.Context, in tftypes.Value, path *tftypes.AttributePath) diag.Diagnostics
func (NumberTypeWithValidateWarning) ValueFromTerraform ¶
type SetTypeWithValidateError ¶ added in v0.4.0
func (SetTypeWithValidateError) Validate ¶ added in v0.4.0
func (t SetTypeWithValidateError) Validate(ctx context.Context, in tftypes.Value, path *tftypes.AttributePath) diag.Diagnostics
type SetTypeWithValidateWarning ¶ added in v0.4.0
func (SetTypeWithValidateWarning) Validate ¶ added in v0.4.0
func (t SetTypeWithValidateWarning) Validate(ctx context.Context, in tftypes.Value, path *tftypes.AttributePath) diag.Diagnostics
type StringType ¶
type StringType struct{}
StringType is a reimplementation of types.StringType that can be used as a base for other extension types in testing.
func (StringType) ApplyTerraform5AttributePathStep ¶
func (t StringType) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)
func (StringType) String ¶
func (t StringType) String() string
func (StringType) TerraformType ¶
func (t StringType) TerraformType(_ context.Context) tftypes.Type
func (StringType) ValueFromTerraform ¶
type StringTypeWithValidateError ¶
type StringTypeWithValidateError struct {
StringType
}
func (StringTypeWithValidateError) Equal ¶
func (t StringTypeWithValidateError) Equal(o attr.Type) bool
func (StringTypeWithValidateError) Validate ¶
func (t StringTypeWithValidateError) Validate(ctx context.Context, in tftypes.Value, path *tftypes.AttributePath) diag.Diagnostics
func (StringTypeWithValidateError) ValueFromTerraform ¶
type StringTypeWithValidateWarning ¶
type StringTypeWithValidateWarning struct {
StringType
}
func (StringTypeWithValidateWarning) Equal ¶
func (t StringTypeWithValidateWarning) Equal(o attr.Type) bool
func (StringTypeWithValidateWarning) Validate ¶
func (t StringTypeWithValidateWarning) Validate(ctx context.Context, in tftypes.Value, path *tftypes.AttributePath) diag.Diagnostics