Documentation ¶
Index ¶
- type TimestampType
- func (t TimestampType) Equal(o attr.Type) bool
- func (t TimestampType) String() string
- func (t TimestampType) Validate(_ context.Context, value tftypes.Value, valuePath path.Path) diag.Diagnostics
- func (t TimestampType) ValueFromString(_ context.Context, in basetypes.StringValue) (basetypes.StringValuable, diag.Diagnostics)
- func (t TimestampType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
- func (t TimestampType) ValueType(_ context.Context) attr.Value
- type TimestampValue
- func (v TimestampValue) Equal(o attr.Value) bool
- func (v TimestampValue) String() string
- func (v TimestampValue) StringSemanticEquals(_ context.Context, newValuable basetypes.StringValuable) (bool, diag.Diagnostics)
- func (v TimestampValue) Type(_ context.Context) attr.Type
- func (v TimestampValue) ValueTime() time.Time
- func (v TimestampValue) ValueTimePointer() *time.Time
- type UUIDType
- func (t UUIDType) Equal(o attr.Type) bool
- func (t UUIDType) String() string
- func (t UUIDType) Validate(_ context.Context, value tftypes.Value, valuePath path.Path) diag.Diagnostics
- func (t UUIDType) ValueFromString(_ context.Context, in basetypes.StringValue) (basetypes.StringValuable, diag.Diagnostics)
- func (t UUIDType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
- func (t UUIDType) ValueType(_ context.Context) attr.Value
- type UUIDValue
- func (v UUIDValue) Equal(o attr.Value) bool
- func (v UUIDValue) String() string
- func (v UUIDValue) StringSemanticEquals(_ context.Context, newValuable basetypes.StringValuable) (bool, diag.Diagnostics)
- func (v UUIDValue) Type(_ context.Context) attr.Type
- func (v UUIDValue) ValueUUID() uuid.UUID
- func (v UUIDValue) ValueUUIDPointer() *uuid.UUID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimestampType ¶
type TimestampType struct {
basetypes.StringType
}
TimestampType implements a custom Terraform type that represents a valid RFC3339 timestamp.
func (TimestampType) Equal ¶
func (t TimestampType) Equal(o attr.Type) bool
Equal returns true of this timestamp and o are equal.
func (TimestampType) String ¶
func (t TimestampType) String() string
String represents a string representation of TimestampType.
func (TimestampType) Validate ¶
func (t TimestampType) Validate(_ context.Context, value tftypes.Value, valuePath path.Path) diag.Diagnostics
Validate ensures that the string can be converted to a TimestampValue.
func (TimestampType) ValueFromString ¶
func (t TimestampType) ValueFromString(_ context.Context, in basetypes.StringValue) (basetypes.StringValuable, diag.Diagnostics)
ValueFromString converts a string value to a TimestampValue.
func (TimestampType) ValueFromTerraform ¶
func (t TimestampType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
ValueFromTerraform converts a Terraform value to a TimestampValue.
type TimestampValue ¶
type TimestampValue struct {
basetypes.StringValue
}
TimestampValue implements a custom Terraform value that represents a valid RFC3339 timestamp.
func NewTimestampNull ¶
func NewTimestampNull() TimestampValue
NewTimestampNull creates a Timestamp with a null value. Determine whether the value is null via the Timestamp type IsNull method.
func NewTimestampPointerValue ¶
func NewTimestampPointerValue(value *time.Time) TimestampValue
NewTimestampPointerValue creates a Timestamp with a null value if nil or a known value. Access the value via the TimestampValue type ValueTimePointer method.
func NewTimestampUnknown ¶
func NewTimestampUnknown() TimestampValue
NewTimestampUnknown creates a Timestamp with an unknown value. Determine whether the value is null via the Timestamp type IsNull method.
func NewTimestampValue ¶
func NewTimestampValue(value time.Time) TimestampValue
NewTimestampValue creates a Timestamp with a known value. Access the value via the TimestampValue type ValueTime method.
func (TimestampValue) Equal ¶
func (v TimestampValue) Equal(o attr.Value) bool
Equal returns true if this timestamp is equal to o.
func (TimestampValue) String ¶
func (v TimestampValue) String() string
func (TimestampValue) StringSemanticEquals ¶
func (v TimestampValue) StringSemanticEquals(_ context.Context, newValuable basetypes.StringValuable) (bool, diag.Diagnostics)
StringSemanticEquals checks if two TimestampValue objects have equivalent values, even if they are not equal.
func (TimestampValue) Type ¶
func (v TimestampValue) Type(_ context.Context) attr.Type
Type returns an instance of the type.
func (TimestampValue) ValueTime ¶
func (v TimestampValue) ValueTime() time.Time
ValueTime returns the timestamp as a time.Time. If the value is unknown or null, this will return an empty time.Time{}.
func (TimestampValue) ValueTimePointer ¶
func (v TimestampValue) ValueTimePointer() *time.Time
ValueTimePointer returns the timestamp as a *time.Time. If the value is unknown or nil, the result will be nil.
type UUIDType ¶
type UUIDType struct {
basetypes.StringType
}
UUIDType implements a custom Terraform type that represents a valid UUID.
func (UUIDType) Validate ¶
func (t UUIDType) Validate(_ context.Context, value tftypes.Value, valuePath path.Path) diag.Diagnostics
Validate ensures that the string can be converted to a UUIDValue.
func (UUIDType) ValueFromString ¶
func (t UUIDType) ValueFromString(_ context.Context, in basetypes.StringValue) (basetypes.StringValuable, diag.Diagnostics)
ValueFromString converts a string value to a UUIDValue.
func (UUIDType) ValueFromTerraform ¶
ValueFromTerraform converts a Terraform value to a UUIDValue.
type UUIDValue ¶
type UUIDValue struct {
basetypes.StringValue
}
UUIDValue implements a custom Terraform value that represents a valid UUID.
func NewUUIDNull ¶
func NewUUIDNull() UUIDValue
NewUUIDNull creates a UUID with a null value. Determine whether the value is null via the UUID type IsNull method.
func NewUUIDPointerValue ¶
NewUUIDPointerValue creates a UUID with a null value if nil or a known value. Access the value via the UUIDValue type ValueUUIDPointer method.
func NewUUIDUnknown ¶
func NewUUIDUnknown() UUIDValue
NewUUIDUnknown creates a UUID with an unknown value. Determine whether the value is null via the UUID type IsNull method.
func NewUUIDValue ¶
NewUUIDValue creates a UUID with a known value. Access the value via the UUIDValue type ValueUUID method.
func (UUIDValue) StringSemanticEquals ¶
func (v UUIDValue) StringSemanticEquals(_ context.Context, newValuable basetypes.StringValuable) (bool, diag.Diagnostics)
StringSemanticEquals checks if two UUIDValue objects have equivalent values, even if they are not equal.
func (UUIDValue) ValueUUID ¶
ValueUUID returns the UUID as a uuid.UUID. If the value is unknown or null, this will return uuid.Nil.
func (UUIDValue) ValueUUIDPointer ¶
ValueUUIDPointer returns the UUID as a *uuid.UUID. If the value is unknown or null, this will return nil.