Documentation ¶
Overview ¶
types contains shared attr.Type implementations for unit testing.
Index ¶
- func TestErrorDiagnostic(path path.Path) diag.DiagnosticWithPath
- func TestWarningDiagnostic(path path.Path) 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) ValueFromBool(ctx context.Context, in basetypes.BoolValue) (basetypes.BoolValuable, diag.Diagnostics)
- func (t BoolType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
- func (t BoolType) ValueType(_ context.Context) attr.Value
- type BoolTypeWithValidateError
- type BoolTypeWithValidateWarning
- type Invalid
- type InvalidType
- func (t InvalidType) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)
- func (t InvalidType) Equal(o attr.Type) bool
- func (t InvalidType) String() string
- func (t InvalidType) TerraformType(_ context.Context) tftypes.Type
- func (t InvalidType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
- func (t InvalidType) ValueType(_ context.Context) attr.Value
- type ListNestedAttributesCustomTypeType
- type ListNestedAttributesCustomValue
- type ListTypeWithValidateError
- type ListTypeWithValidateWarning
- type MapNestedAttributesCustomTypeType
- type MapNestedAttributesCustomValue
- 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) ValueFromNumber(ctx context.Context, in basetypes.NumberValue) (basetypes.NumberValuable, diag.Diagnostics)
- func (t NumberType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
- func (t NumberType) ValueType(_ context.Context) attr.Value
- type NumberTypeWithValidateError
- type NumberTypeWithValidateWarning
- type SetNestedAttributesCustomTypeType
- type SetNestedAttributesCustomValue
- type SetTypeWithValidateError
- type SetTypeWithValidateWarning
- type SingleNestedAttributesCustomTypeType
- type SingleNestedAttributesCustomValue
- type String
- func (s String) Equal(o attr.Value) bool
- func (s String) IsNull() bool
- func (s String) IsUnknown() bool
- func (s String) String() string
- func (s String) ToStringValue(ctx context.Context) (types.String, diag.Diagnostics)
- func (s String) ToTerraformValue(ctx context.Context) (tftypes.Value, error)
- func (s String) Type(_ context.Context) attr.Type
- 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) ValueFromString(ctx context.Context, in basetypes.StringValue) (basetypes.StringValuable, diag.Diagnostics)
- func (t StringType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
- func (t StringType) ValueType(_ context.Context) attr.Value
- type StringTypeWithValidateError
- type StringTypeWithValidateWarning
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestErrorDiagnostic ¶
func TestErrorDiagnostic(path path.Path) diag.DiagnosticWithPath
func TestWarningDiagnostic ¶
func TestWarningDiagnostic(path path.Path) 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)
func (BoolType) ValueFromBool ¶ added in v0.17.0
func (t BoolType) ValueFromBool(ctx context.Context, in basetypes.BoolValue) (basetypes.BoolValuable, diag.Diagnostics)
func (BoolType) ValueFromTerraform ¶
type BoolTypeWithValidateError ¶
type BoolTypeWithValidateError struct {
BoolType
}
func (BoolTypeWithValidateError) Validate ¶
func (t BoolTypeWithValidateError) Validate(ctx context.Context, in tftypes.Value, path path.Path) 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 path.Path) diag.Diagnostics
func (BoolTypeWithValidateWarning) ValueFromTerraform ¶
type Invalid ¶ added in v0.10.0
type Invalid struct{}
Invalid is an attr.Value that returns errors for methods than can return errors.
func (Invalid) ToTerraformValue ¶ added in v0.10.0
type InvalidType ¶ added in v0.10.0
type InvalidType struct{}
InvalidType is an attr.Type that returns errors for methods that can return errors.
func (InvalidType) ApplyTerraform5AttributePathStep ¶ added in v0.10.0
func (t InvalidType) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)
func (InvalidType) String ¶ added in v0.10.0
func (t InvalidType) String() string
func (InvalidType) TerraformType ¶ added in v0.10.0
func (t InvalidType) TerraformType(_ context.Context) tftypes.Type
func (InvalidType) ValueFromTerraform ¶ added in v0.10.0
type ListNestedAttributesCustomTypeType ¶ added in v0.16.0
func (ListNestedAttributesCustomTypeType) ValueFromTerraform ¶ added in v0.16.0
type ListNestedAttributesCustomValue ¶ added in v0.16.0
type ListTypeWithValidateError ¶ added in v0.4.0
type ListTypeWithValidateWarning ¶ added in v0.4.0
type MapNestedAttributesCustomTypeType ¶ added in v0.16.0
func (MapNestedAttributesCustomTypeType) ValueFromTerraform ¶ added in v0.16.0
type MapNestedAttributesCustomValue ¶ added in v0.16.0
type MapTypeWithValidateError ¶ added in v0.4.0
type MapTypeWithValidateWarning ¶ added in v0.4.0
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) ValueFromNumber ¶ added in v0.17.0
func (t NumberType) ValueFromNumber(ctx context.Context, in basetypes.NumberValue) (basetypes.NumberValuable, diag.Diagnostics)
func (NumberType) ValueFromTerraform ¶
type NumberTypeWithValidateError ¶
type NumberTypeWithValidateError struct {
NumberType
}
func (NumberTypeWithValidateError) Validate ¶
func (t NumberTypeWithValidateError) Validate(ctx context.Context, in tftypes.Value, path path.Path) 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 path.Path) diag.Diagnostics
func (NumberTypeWithValidateWarning) ValueFromTerraform ¶
type SetNestedAttributesCustomTypeType ¶ added in v0.16.0
func (SetNestedAttributesCustomTypeType) ValueFromTerraform ¶ added in v0.16.0
type SetNestedAttributesCustomValue ¶ added in v0.16.0
type SetTypeWithValidateError ¶ added in v0.4.0
type SetTypeWithValidateWarning ¶ added in v0.4.0
type SingleNestedAttributesCustomTypeType ¶ added in v0.16.0
type SingleNestedAttributesCustomTypeType struct {
types.ObjectType
}
func (SingleNestedAttributesCustomTypeType) ValueFromTerraform ¶ added in v0.16.0
type SingleNestedAttributesCustomValue ¶ added in v0.16.0
type String ¶
func (String) ToStringValue ¶ added in v0.17.0
func (String) ToTerraformValue ¶ added in v0.9.0
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) ValueFromString ¶ added in v0.17.0
func (t StringType) ValueFromString(ctx context.Context, in basetypes.StringValue) (basetypes.StringValuable, diag.Diagnostics)
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 path.Path) 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 path.Path) diag.Diagnostics
func (StringTypeWithValidateWarning) ValueFromTerraform ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.