types

package
Version: v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

types contains shared attr.Type implementations for unit testing.

Index

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 Bool

type Bool struct {
	types.Bool

	CreatedBy attr.Type
}

func (Bool) Equal

func (b Bool) Equal(o attr.Value) bool

func (Bool) IsNull added in v0.9.0

func (b Bool) IsNull() bool

func (Bool) IsUnknown added in v0.9.0

func (b Bool) IsUnknown() bool

func (Bool) String added in v0.9.0

func (b Bool) String() string

func (Bool) Type

func (b Bool) Type(_ context.Context) attr.Type

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

func (t BoolType) Equal(o attr.Type) bool

func (BoolType) String

func (t BoolType) String() string

func (BoolType) TerraformType

func (t BoolType) TerraformType(_ context.Context) tftypes.Type

func (BoolType) ValueFromTerraform

func (t BoolType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

type BoolTypeWithValidateError

type BoolTypeWithValidateError struct {
	BoolType
}

func (BoolTypeWithValidateError) Validate

func (BoolTypeWithValidateError) ValueFromTerraform

func (b BoolTypeWithValidateError) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

type BoolTypeWithValidateWarning

type BoolTypeWithValidateWarning struct {
	BoolType
}

func (BoolTypeWithValidateWarning) Validate

func (BoolTypeWithValidateWarning) ValueFromTerraform

func (b BoolTypeWithValidateWarning) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

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) Equal added in v0.10.0

func (i Invalid) Equal(o attr.Value) bool

func (Invalid) IsNull added in v0.10.0

func (i Invalid) IsNull() bool

func (Invalid) IsUnknown added in v0.10.0

func (i Invalid) IsUnknown() bool

func (Invalid) String added in v0.10.0

func (i Invalid) String() string

func (Invalid) ToTerraformValue added in v0.10.0

func (i Invalid) ToTerraformValue(ctx context.Context) (tftypes.Value, error)

func (Invalid) Type added in v0.10.0

func (i Invalid) Type(_ context.Context) attr.Type

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) Equal added in v0.10.0

func (t InvalidType) Equal(o attr.Type) bool

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

func (t InvalidType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

type ListTypeWithValidateError added in v0.4.0

type ListTypeWithValidateError struct {
	types.ListType
}

func (ListTypeWithValidateError) Validate added in v0.4.0

type ListTypeWithValidateWarning added in v0.4.0

type ListTypeWithValidateWarning struct {
	types.ListType
}

func (ListTypeWithValidateWarning) Validate added in v0.4.0

type MapTypeWithValidateError added in v0.4.0

type MapTypeWithValidateError struct {
	types.MapType
}

func (MapTypeWithValidateError) Validate added in v0.4.0

type MapTypeWithValidateWarning added in v0.4.0

type MapTypeWithValidateWarning struct {
	types.MapType
}

func (MapTypeWithValidateWarning) Validate added in v0.4.0

type Number

type Number struct {
	types.Number

	CreatedBy attr.Type
}

func (Number) Equal

func (n Number) Equal(o attr.Value) bool

func (Number) IsNull added in v0.9.0

func (n Number) IsNull() bool

func (Number) IsUnknown added in v0.9.0

func (n Number) IsUnknown() bool

func (Number) Type

func (n Number) Type(_ context.Context) attr.Type

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

func (t NumberType) Equal(o attr.Type) bool

func (NumberType) String

func (t NumberType) String() string

func (NumberType) TerraformType

func (t NumberType) TerraformType(_ context.Context) tftypes.Type

func (NumberType) ValueFromTerraform

func (t NumberType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

type NumberTypeWithValidateError

type NumberTypeWithValidateError struct {
	NumberType
}

func (NumberTypeWithValidateError) Validate

func (NumberTypeWithValidateError) ValueFromTerraform

func (n NumberTypeWithValidateError) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

type NumberTypeWithValidateWarning

type NumberTypeWithValidateWarning struct {
	NumberType
}

func (NumberTypeWithValidateWarning) Validate

func (NumberTypeWithValidateWarning) ValueFromTerraform

func (n NumberTypeWithValidateWarning) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

type SetTypeWithValidateError added in v0.4.0

type SetTypeWithValidateError struct {
	types.SetType
}

func (SetTypeWithValidateError) Validate added in v0.4.0

type SetTypeWithValidateWarning added in v0.4.0

type SetTypeWithValidateWarning struct {
	types.SetType
}

func (SetTypeWithValidateWarning) Validate added in v0.4.0

type String

type String struct {
	InternalString types.String

	CreatedBy attr.Type
}

func (String) Equal

func (s String) Equal(o attr.Value) bool

func (String) IsNull added in v0.9.0

func (s String) IsNull() bool

func (String) IsUnknown added in v0.9.0

func (s String) IsUnknown() bool

func (String) String added in v0.9.0

func (s String) String() string

func (String) ToTerraformValue added in v0.9.0

func (s String) ToTerraformValue(ctx context.Context) (tftypes.Value, error)

func (String) Type

func (s String) Type(_ context.Context) attr.Type

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

func (t StringType) Equal(o attr.Type) bool

func (StringType) String

func (t StringType) String() string

func (StringType) TerraformType

func (t StringType) TerraformType(_ context.Context) tftypes.Type

func (StringType) ValueFromTerraform

func (t StringType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

type StringTypeWithValidateError

type StringTypeWithValidateError struct {
	StringType
}

func (StringTypeWithValidateError) Equal

func (StringTypeWithValidateError) Validate

func (StringTypeWithValidateError) ValueFromTerraform

func (s StringTypeWithValidateError) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

type StringTypeWithValidateWarning

type StringTypeWithValidateWarning struct {
	StringType
}

func (StringTypeWithValidateWarning) Equal

func (StringTypeWithValidateWarning) Validate

func (StringTypeWithValidateWarning) ValueFromTerraform

func (s StringTypeWithValidateWarning) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

Jump to

Keyboard shortcuts

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