Documentation
¶
Index ¶
- Constants
- Variables
- func EmptyAttributes(ctx context.Context, attributeTypes map[string]attr.Type) (map[string]attr.Value, diag.Diagnostics)
- func EmptyObject(ctx context.Context, attributeTypes map[string]attr.Type) (types.Object, diag.Diagnostics)
- func NullValueForType(ctx context.Context, attrType attr.Type) (attr.Value, error)
- type Duration
Constants ¶
View Source
const ProviderErrorDetailPrefix = "An unexpected error was encountered trying to validate an attribute value. " +
"This is always an error in the provider. Please report the following to the provider developer:\n\n"
ProviderErrorDetailPrefix contains instructions for reporting provider errors to provider developers
Variables ¶
View Source
var (
DurationType = durationType{}
)
Functions ¶
func EmptyAttributes ¶
func EmptyAttributes(ctx context.Context, attributeTypes map[string]attr.Type) (map[string]attr.Value, diag.Diagnostics)
EmptyObject returns "empty" attributes (all values set to null) for the given attribute types.
Types ¶
type Duration ¶
type Duration struct {
basetypes.StringValue
// contains filtered or unexported fields
}
func DurationNull ¶
func DurationNull() Duration
func DurationUnknown ¶
func DurationUnknown() Duration
func DurationValue ¶
DurationValue initializes a new Duration type with the provided value
This function does not return diagnostics, and therefore invalid duration values are not handled during construction. Invalid values will be detected by the ValidateAttribute method, called by the ValidateResourceConfig RPC during operations like `terraform validate`, `plan`, or `apply`.
func (Duration) ValidateAttribute ¶
func (v Duration) ValidateAttribute(ctx context.Context, req xattr.ValidateAttributeRequest, resp *xattr.ValidateAttributeResponse)
func (Duration) ValueDuration ¶
ValueDuration returns the known time.Duration value. If Duration is null or unknown, returns 0.
Click to show internal directories.
Click to hide internal directories.