test

package
v0.0.0-...-0876826 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0, Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Mode_name = map[int32]string{
	0: "UNKNOWN",
	1: "ON",
	2: "OFF",
}
View Source
var Mode_value = map[string]int32{
	"UNKNOWN": 0,
	"ON":      1,
	"OFF":     2,
}

Functions

func CopyFromBoolSpecial

func CopyFromBoolSpecial(diags diag.Diagnostics, tf attr.Value, obj *[]BoolCustom)

CopyFromBoolSpecial copies target value to the source

func CopyFromStringCustom

func CopyFromStringCustom(diags diag.Diagnostics, tf attr.Value, obj *string)

CopyFromStringCustom copies the value from Terraform (a list of strings) into the source (a single string) by joining all elements with "/".

func CopyTestFromTerraform

CopyTestFromTerraform copies contents of the source Terraform object into a target struct

func CopyTestToTerraform

CopyTestToTerraform copies contents of the source Terraform object into a target struct

func CopyToBoolSpecial

func CopyToBoolSpecial(diags diag.Diagnostics, obj []BoolCustom, t attr.Type, v attr.Value) attr.Value

CopyToBoolSpecial copies source value to the target

func CopyToStringCustom

func CopyToStringCustom(diags diag.Diagnostics, obj string, t attr.Type, v attr.Value) attr.Value

CopyToStringCustom copies a source value (single string) into the Terraform value (a list of strings) by splitting the string on every "/".

func GenSchemaBoolSpecial

func GenSchemaBoolSpecial(_ context.Context) tfsdk.Attribute

GenSchemaBoolSpecial generates custom field schema (bool list)

func GenSchemaStringCustom

func GenSchemaStringCustom(_ context.Context) tfsdk.Attribute

GenSchemaStringCustom returns the StringCustom schema.

func UseMockValidator

func UseMockValidator() tfsdk.AttributeValidator

UseMockValidator returns TimeValueInFutureValidator

Types

type BoolCustom

type BoolCustom bool

BoolCustom custom bool array

type Branch1

type Branch1 struct {
	// Str string field
	Str                  string   `protobuf:"bytes,1,opt,name=Str,proto3" json:"Str,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Branch1 message is OneOf branch 1

func (*Branch1) Descriptor

func (*Branch1) Descriptor() ([]byte, []int)

func (*Branch1) ProtoMessage

func (*Branch1) ProtoMessage()

func (*Branch1) Reset

func (m *Branch1) Reset()

func (*Branch1) String

func (m *Branch1) String() string

func (*Branch1) XXX_DiscardUnknown

func (m *Branch1) XXX_DiscardUnknown()

func (*Branch1) XXX_Marshal

func (m *Branch1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Branch1) XXX_Merge

func (m *Branch1) XXX_Merge(src proto.Message)

func (*Branch1) XXX_Size

func (m *Branch1) XXX_Size() int

func (*Branch1) XXX_Unmarshal

func (m *Branch1) XXX_Unmarshal(b []byte) error

type Branch2

type Branch2 struct {
	// Int32 int field
	Int32                int32    `protobuf:"varint,1,opt,name=Int32,proto3" json:"Int32,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Branch2 message is OneOf branch 2

func (*Branch2) Descriptor

func (*Branch2) Descriptor() ([]byte, []int)

func (*Branch2) ProtoMessage

func (*Branch2) ProtoMessage()

func (*Branch2) Reset

func (m *Branch2) Reset()

func (*Branch2) String

func (m *Branch2) String() string

func (*Branch2) XXX_DiscardUnknown

func (m *Branch2) XXX_DiscardUnknown()

func (*Branch2) XXX_Marshal

func (m *Branch2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Branch2) XXX_Merge

func (m *Branch2) XXX_Merge(src proto.Message)

func (*Branch2) XXX_Size

func (m *Branch2) XXX_Size() int

func (*Branch2) XXX_Unmarshal

func (m *Branch2) XXX_Unmarshal(b []byte) error

type Duration

type Duration int64

Duration custom duration type

func (Duration) String

func (d Duration) String() string

String returns duration string representation, must be implemented for custom duration type

type DurationType

type DurationType struct {
	attr.Type
}

DurationType represents time.Time Terraform type which is stored in RFC3339 format, nanoseconds truncated

func (DurationType) ApplyTerraform5AttributePathStep

func (t DurationType) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)

ApplyTerraform5AttributePathStep is not implemented for TimeType

func (DurationType) Equal

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

Equal returns type equality

func (DurationType) String

func (t DurationType) String() string

String returns string representation of TimeType

func (DurationType) TerraformType

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

TerraformType returns type which is used in Terraform status (time is stored as string)

func (DurationType) ValueFromTerraform

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

ValueFromTerraform decodes terraform value and returns it as TimeType

type DurationValue

type DurationValue struct {
	// Unknown will be true if the value is not yet known.
	Unknown bool
	// Null will be true if the value was not set, or was explicitly set to
	// null.
	Null bool
	// Value contains the set value, as long as Unknown and Null are both
	// false.
	Value time.Duration
}

DurationValue represents Terraform value of type TimeType

func (DurationValue) Equal

func (t DurationValue) Equal(other attr.Value) bool

Equal returns true if `other` is a *String and has the same value as `s`.

func (DurationValue) IsNull

func (t DurationValue) IsNull() bool

IsNull returns true if receiver is null

func (DurationValue) IsUnknown

func (t DurationValue) IsUnknown() bool

IsUnknown returns true if receiver is unknown

func (DurationValue) String

func (t DurationValue) String() string

String returns the string representation of the receiver

func (DurationValue) ToTerraformValue

func (t DurationValue) ToTerraformValue(_ context.Context) (tftypes.Value, error)

ToTerraformValue returns the data contained in the *String as a string. If Unknown is true, it returns a tftypes.UnknownValue. If Null is true, it returns nil.

func (DurationValue) Type

Type returns value type

type EmbeddedField

type EmbeddedField struct {
	// EmbeddedString string field
	EmbeddedString string `protobuf:"bytes,1,opt,name=EmbeddedString,proto3" json:"embedded_string"`
	// Nested EmbeddedNestedField field
	EmbeddedNestedField  *EmbeddedNestedField `protobuf:"bytes,2,opt,name=EmbeddedNestedField,proto3" json:"EmbeddedNestedField,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

EmbeddedField encapsulates fields which can be shared among various types

func (*EmbeddedField) Descriptor

func (*EmbeddedField) Descriptor() ([]byte, []int)

func (*EmbeddedField) ProtoMessage

func (*EmbeddedField) ProtoMessage()

func (*EmbeddedField) Reset

func (m *EmbeddedField) Reset()

func (*EmbeddedField) String

func (m *EmbeddedField) String() string

func (*EmbeddedField) XXX_DiscardUnknown

func (m *EmbeddedField) XXX_DiscardUnknown()

func (*EmbeddedField) XXX_Marshal

func (m *EmbeddedField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EmbeddedField) XXX_Merge

func (m *EmbeddedField) XXX_Merge(src proto.Message)

func (*EmbeddedField) XXX_Size

func (m *EmbeddedField) XXX_Size() int

func (*EmbeddedField) XXX_Unmarshal

func (m *EmbeddedField) XXX_Unmarshal(b []byte) error

type EmbeddedNestedField

type EmbeddedNestedField struct {
	// EmbeddedNestedString string field
	EmbeddedNestedString string   `protobuf:"bytes,1,opt,name=EmbeddedNestedString,proto3" json:"embedded_nested_string"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*EmbeddedNestedField) Descriptor

func (*EmbeddedNestedField) Descriptor() ([]byte, []int)

func (*EmbeddedNestedField) ProtoMessage

func (*EmbeddedNestedField) ProtoMessage()

func (*EmbeddedNestedField) Reset

func (m *EmbeddedNestedField) Reset()

func (*EmbeddedNestedField) String

func (m *EmbeddedNestedField) String() string

func (*EmbeddedNestedField) XXX_DiscardUnknown

func (m *EmbeddedNestedField) XXX_DiscardUnknown()

func (*EmbeddedNestedField) XXX_Marshal

func (m *EmbeddedNestedField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EmbeddedNestedField) XXX_Merge

func (m *EmbeddedNestedField) XXX_Merge(src proto.Message)

func (*EmbeddedNestedField) XXX_Size

func (m *EmbeddedNestedField) XXX_Size() int

func (*EmbeddedNestedField) XXX_Unmarshal

func (m *EmbeddedNestedField) XXX_Unmarshal(b []byte) error

type EmptyMessageBranch

type EmptyMessageBranch struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

EmptyMessageBranch message for empty oneof branch

func (*EmptyMessageBranch) Descriptor

func (*EmptyMessageBranch) Descriptor() ([]byte, []int)

func (*EmptyMessageBranch) ProtoMessage

func (*EmptyMessageBranch) ProtoMessage()

func (*EmptyMessageBranch) Reset

func (m *EmptyMessageBranch) Reset()

func (*EmptyMessageBranch) String

func (m *EmptyMessageBranch) String() string

func (*EmptyMessageBranch) XXX_DiscardUnknown

func (m *EmptyMessageBranch) XXX_DiscardUnknown()

func (*EmptyMessageBranch) XXX_Marshal

func (m *EmptyMessageBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EmptyMessageBranch) XXX_Merge

func (m *EmptyMessageBranch) XXX_Merge(src proto.Message)

func (*EmptyMessageBranch) XXX_Size

func (m *EmptyMessageBranch) XXX_Size() int

func (*EmptyMessageBranch) XXX_Unmarshal

func (m *EmptyMessageBranch) XXX_Unmarshal(b []byte) error

type MaxAgeDuration

type MaxAgeDuration struct {
	Value                Duration `protobuf:"varint,1,opt,name=Value,proto3,casttype=Duration" json:"max_age"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MaxAgeDuration) Descriptor

func (*MaxAgeDuration) Descriptor() ([]byte, []int)

func (*MaxAgeDuration) ProtoMessage

func (*MaxAgeDuration) ProtoMessage()

func (*MaxAgeDuration) Reset

func (m *MaxAgeDuration) Reset()

func (*MaxAgeDuration) String

func (m *MaxAgeDuration) String() string

func (*MaxAgeDuration) XXX_DiscardUnknown

func (m *MaxAgeDuration) XXX_DiscardUnknown()

func (*MaxAgeDuration) XXX_Marshal

func (m *MaxAgeDuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MaxAgeDuration) XXX_Merge

func (m *MaxAgeDuration) XXX_Merge(src proto.Message)

func (*MaxAgeDuration) XXX_Size

func (m *MaxAgeDuration) XXX_Size() int

func (*MaxAgeDuration) XXX_Unmarshal

func (m *MaxAgeDuration) XXX_Unmarshal(b []byte) error

type MockValidator

type MockValidator struct{}

MockValidator ensures that a time is in the future

func (MockValidator) Description

func (v MockValidator) Description(_ context.Context) string

Description returns validator description

func (MockValidator) MarkdownDescription

func (v MockValidator) MarkdownDescription(_ context.Context) string

MarkdownDescription returns validator markdown description

func (MockValidator) Validate

Validate performs the validation.

type Mode

type Mode int32
const (
	Mode_UNKNOWN Mode = 0
	Mode_ON      Mode = 1
	Mode_OFF     Mode = 2
)

func (Mode) EnumDescriptor

func (Mode) EnumDescriptor() ([]byte, []int)

func (Mode) String

func (x Mode) String() string

type Nested

type Nested struct {
	// Str string field
	Str string `protobuf:"bytes,1,opt,name=Str,proto3" json:"Str,omitempty"`
	// Nested repeated nested messages
	NestedList []*OtherNested `protobuf:"bytes,2,rep,name=NestedList,proto3" json:"NestedList,omitempty"`
	// Nested map repeated nested messages
	Map map[string]string `` /* 147-byte string literal not displayed */
	// MapObjectNested nested object map
	MapObjectNested      map[string]OtherNested `` /* 161-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

Nested message definition

func (*Nested) Descriptor

func (*Nested) Descriptor() ([]byte, []int)

func (*Nested) ProtoMessage

func (*Nested) ProtoMessage()

func (*Nested) Reset

func (m *Nested) Reset()

func (*Nested) String

func (m *Nested) String() string

func (*Nested) XXX_DiscardUnknown

func (m *Nested) XXX_DiscardUnknown()

func (*Nested) XXX_Marshal

func (m *Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Nested) XXX_Merge

func (m *Nested) XXX_Merge(src proto.Message)

func (*Nested) XXX_Size

func (m *Nested) XXX_Size() int

func (*Nested) XXX_Unmarshal

func (m *Nested) XXX_Unmarshal(b []byte) error

type OtherNested

type OtherNested struct {
	// Str string field
	Str                  string   `protobuf:"bytes,1,opt,name=Str,proto3" json:"Str,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

OtherNested message nested into nested message

func (*OtherNested) Descriptor

func (*OtherNested) Descriptor() ([]byte, []int)

func (*OtherNested) ProtoMessage

func (*OtherNested) ProtoMessage()

func (*OtherNested) Reset

func (m *OtherNested) Reset()

func (*OtherNested) String

func (m *OtherNested) String() string

func (*OtherNested) XXX_DiscardUnknown

func (m *OtherNested) XXX_DiscardUnknown()

func (*OtherNested) XXX_Marshal

func (m *OtherNested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OtherNested) XXX_Merge

func (m *OtherNested) XXX_Merge(src proto.Message)

func (*OtherNested) XXX_Size

func (m *OtherNested) XXX_Size() int

func (*OtherNested) XXX_Unmarshal

func (m *OtherNested) XXX_Unmarshal(b []byte) error

type Test

type Test struct {
	// Str string field
	Str string `protobuf:"bytes,1,opt,name=Str,proto3" json:"str1"`
	// Int32 int32 field
	Int32 int32 `protobuf:"varint,2,opt,name=Int32,proto3" json:"Int32,omitempty"`
	// Int64 int64 field
	Int64 int64 `protobuf:"varint,3,opt,name=Int64,proto3" json:"Int64,omitempty"`
	// Float float field
	Float float32 `protobuf:"fixed32,4,opt,name=Float,proto3" json:"Float,omitempty"`
	// Double double field
	Double float64 `protobuf:"fixed64,5,opt,name=Double,proto3" json:"Double,omitempty"`
	// Bool bool field
	Bool bool `protobuf:"varint,6,opt,name=Bool,proto3" json:"Bool,omitempty"`
	// bytes byte[] field
	Bytes []byte `protobuf:"bytes,7,opt,name=bytes,proto3" json:"bytes,omitempty"`
	// Timestamp time.Time field
	Timestamp time.Time `protobuf:"bytes,8,opt,name=Timestamp,proto3,stdtime" json:"Timestamp"`
	// Timestamp time.Time field
	TimestampMissing time.Time `protobuf:"bytes,9,opt,name=TimestampMissing,proto3,stdtime" json:"TimestampMissing"`
	// TimestampNullable *time.Time field
	TimestampNullable *time.Time `protobuf:"bytes,10,opt,name=TimestampNullable,proto3,stdtime" json:"TimestampNullable,omitempty"`
	// TimestampNullableWithNilValue *time.Time field
	TimestampNullableWithNilValue *time.Time `protobuf:"bytes,11,opt,name=TimestampNullableWithNilValue,proto3,stdtime" json:"TimestampNullableWithNilValue,omitempty"`
	// DurationStandard time.Duration field (standard)
	DurationStandard time.Duration `protobuf:"varint,12,opt,name=DurationStandard,proto3,stdduration" json:"DurationStandard,omitempty"`
	// DurationStandardMissing time.Duration field (standard) missing in input data
	DurationStandardMissing time.Duration `protobuf:"varint,13,opt,name=DurationStandardMissing,proto3,stdduration" json:"DurationStandardMissing,omitempty"`
	// DurationCustom time.Duration field (with casttype)
	DurationCustom Duration `protobuf:"varint,14,opt,name=DurationCustom,proto3,casttype=Duration" json:"DurationCustom,omitempty"`
	// DurationCustomMissing time.Duration field (with casttype) missing in input data
	DurationCustomMissing Duration `protobuf:"varint,15,opt,name=DurationCustomMissing,proto3,casttype=Duration" json:"DurationCustomMissing,omitempty"`
	// StringList []string field
	StringList []string `protobuf:"bytes,16,rep,name=StringList,proto3" json:"StringList,omitempty"`
	// StringListEmpty []string field
	StringListEmpty []string `protobuf:"bytes,17,rep,name=StringListEmpty,proto3" json:"StringListEmpty,omitempty"`
	// BoolCustomList []bool field
	BoolCustomList []BoolCustom `protobuf:"varint,18,rep,packed,name=BoolCustomList,proto3,customtype=BoolCustom" json:"BoolCustomList,omitempty"`
	// BytesList [][]byte field
	BytesList [][]byte `protobuf:"bytes,19,rep,name=BytesList,proto3" json:"BytesList,omitempty"`
	// TimestampList []time.Time field
	TimestampList []*time.Time `protobuf:"bytes,20,rep,name=TimestampList,proto3,stdtime" json:"TimestampList,omitempty"`
	// DurationCustomList []time.Duration field
	DurationCustomList []Duration `protobuf:"varint,21,rep,packed,name=DurationCustomList,proto3,casttype=Duration" json:"DurationCustomList,omitempty"`
	// Nested nested message field, non-nullable
	Nested Nested `protobuf:"bytes,22,opt,name=Nested,proto3" json:"Nested"`
	// NestedNullable nested message field, nullable
	NestedNullable *Nested `protobuf:"bytes,23,opt,name=NestedNullable,proto3" json:"NestedNullable,omitempty"`
	// NestedNullableWithNilValue nested message field, with no value set
	NestedNullableWithNilValue *Nested `protobuf:"bytes,24,opt,name=NestedNullableWithNilValue,proto3" json:"NestedNullableWithNilValue,omitempty"`
	// NestedList nested message array
	NestedList []Nested `protobuf:"bytes,25,rep,name=NestedList,proto3" json:"NestedList"`
	// NestedListNullable nested message array
	NestedListNullable []*Nested `protobuf:"bytes,26,rep,name=NestedListNullable,proto3" json:"NestedListNullable,omitempty"`
	// Map normal map
	Map map[string]string `` /* 148-byte string literal not displayed */
	// MapObject is the object map
	MapObject map[string]Nested `` /* 150-byte string literal not displayed */
	// MapObjectNullable is the object map with nullable values
	MapObjectNullable map[string]*Nested `` /* 176-byte string literal not displayed */
	// Mode is the enum value
	Mode Mode `protobuf:"varint,31,opt,name=Mode,proto3,enum=test.Mode" json:"Mode,omitempty"`
	// Excluded is the excluded field
	Excluded bool `protobuf:"varint,32,opt,name=Excluded,proto3" json:"Excluded,omitempty"`
	// Types that are valid to be assigned to OneOf:
	//
	//	*Test_Branch1
	//	*Test_Branch2
	//	*Test_Branch3
	OneOf isTest_OneOf `protobuf_oneof:"OneOf"`
	// Types that are valid to be assigned to OneOfWithEmptyMessage:
	//
	//	*Test_EmptyMessageBranch
	//	*Test_StringBranch
	OneOfWithEmptyMessage isTest_OneOfWithEmptyMessage `protobuf_oneof:"OneOfWithEmptyMessage"`
	// EmbeddedField encapsulates fields which can be shared among various types
	EmbeddedField   `protobuf:"bytes,38,opt,name=EmbeddedField,proto3,embedded=EmbeddedField" json:""`
	*MaxAgeDuration `protobuf:"bytes,39,opt,name=EmbedNullable,proto3,embedded=EmbedNullable" json:""`
	// BoolCustomOverride []bool field, gogoproto.customtype is not set but there
	// is custom_type override in the configuration
	StringOverride       string   `protobuf:"bytes,40,opt,name=StringOverride,proto3" json:"StringOverride,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Test message definition.

func (*Test) Descriptor

func (*Test) Descriptor() ([]byte, []int)

func (*Test) GetBranch1

func (m *Test) GetBranch1() *Branch1

func (*Test) GetBranch2

func (m *Test) GetBranch2() *Branch2

func (*Test) GetBranch3

func (m *Test) GetBranch3() string

func (*Test) GetEmptyMessageBranch

func (m *Test) GetEmptyMessageBranch() *EmptyMessageBranch

func (*Test) GetOneOf

func (m *Test) GetOneOf() isTest_OneOf

func (*Test) GetOneOfWithEmptyMessage

func (m *Test) GetOneOfWithEmptyMessage() isTest_OneOfWithEmptyMessage

func (*Test) GetStringBranch

func (m *Test) GetStringBranch() string

func (*Test) ProtoMessage

func (*Test) ProtoMessage()

func (*Test) Reset

func (m *Test) Reset()

func (*Test) String

func (m *Test) String() string

func (*Test) XXX_DiscardUnknown

func (m *Test) XXX_DiscardUnknown()

func (*Test) XXX_Marshal

func (m *Test) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Test) XXX_Merge

func (m *Test) XXX_Merge(src proto.Message)

func (*Test) XXX_OneofWrappers

func (*Test) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Test) XXX_Size

func (m *Test) XXX_Size() int

func (*Test) XXX_Unmarshal

func (m *Test) XXX_Unmarshal(b []byte) error

type Test_Branch1

type Test_Branch1 struct {
	Branch1 *Branch1 `protobuf:"bytes,33,opt,name=Branch1,proto3,oneof" json:"Branch1,omitempty"`
}

type Test_Branch2

type Test_Branch2 struct {
	Branch2 *Branch2 `protobuf:"bytes,34,opt,name=Branch2,proto3,oneof" json:"Branch2,omitempty"`
}

type Test_Branch3

type Test_Branch3 struct {
	Branch3 string `protobuf:"bytes,35,opt,name=Branch3,proto3,oneof" json:"Branch3,omitempty"`
}

type Test_EmptyMessageBranch

type Test_EmptyMessageBranch struct {
	EmptyMessageBranch *EmptyMessageBranch `protobuf:"bytes,36,opt,name=EmptyMessageBranch,proto3,oneof" json:"EmptyMessageBranch,omitempty"`
}

type Test_StringBranch

type Test_StringBranch struct {
	StringBranch string `protobuf:"bytes,37,opt,name=StringBranch,proto3,oneof" json:"StringBranch,omitempty"`
}

type TimeType

type TimeType struct {
	attr.Type
	Format string
}

TimeType represents time.Time Terraform type which is stored in RFC3339 format, nanoseconds truncated

func UseRFC3339Time

func UseRFC3339Time() TimeType

UseRFC3339Time creates TimeType for rfc3339

func (TimeType) ApplyTerraform5AttributePathStep

func (t TimeType) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)

ApplyTerraform5AttributePathStep is not implemented for TimeType

func (TimeType) Equal

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

Equal returns type equality

func (TimeType) String

func (t TimeType) String() string

String returns string representation of TimeType

func (TimeType) TerraformType

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

TerraformType returns type which is used in Terraform status (time is stored as string)

func (TimeType) ValueFromTerraform

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

ValueFromTerraform decodes terraform value and returns it as TimeType

type TimeValue

type TimeValue struct {
	// Unknown will be true if the value is not yet known.
	Unknown bool
	// Null will be true if the value was not set, or was explicitly set to
	// null.
	Null bool
	// Value contains the set value, as long as Unknown and Null are both
	// false.
	Value time.Time
	// Format time format
	Format string
}

TimeValue represents Terraform value of type TimeType

func (TimeValue) Equal

func (t TimeValue) Equal(other attr.Value) bool

Equal returns true if `other` is a *String and has the same value as `s`.

func (TimeValue) IsNull

func (t TimeValue) IsNull() bool

IsNull returns true if receiver is null

func (TimeValue) IsUnknown

func (t TimeValue) IsUnknown() bool

IsUnknown returns true if receiver is unknown

func (TimeValue) String

func (t TimeValue) String() string

String returns the string representation of the receiver

func (TimeValue) ToTerraformValue

func (t TimeValue) ToTerraformValue(_ context.Context) (tftypes.Value, error)

ToTerraformValue returns the data contained in the *String as a string. If Unknown is true, it returns a tftypes.UnknownValue. If Null is true, it returns nil.

func (TimeValue) Type

func (t TimeValue) Type(_ context.Context) attr.Type

Type returns value type

Jump to

Keyboard shortcuts

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