Documentation ¶
Overview ¶
TODO: Move this to a shared 'types' package.
Index ¶
Constants ¶
View Source
const (
DurationType durationType = iota
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Duration ¶
type Duration 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 }
func (Duration) String ¶
String returns a summary representation of either the underlying Value, or UnknownValueString (`<unknown>`) when IsUnknown() returns true, or NullValueString (`<null>`) when IsNull() return true.
This is an intentionally lossy representation, that are best suited for logging and error reporting, as they are not protected by compatibility guarantees within the framework.
func (Duration) ToTerraformValue ¶
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.
Click to show internal directories.
Click to hide internal directories.