Documentation ¶
Overview ¶
Package converter content relative to the package
Index ¶
- func AttributeToStringWithoutContext(attribute *hcl.Attribute) (string, errors.Error)
- func BoolAttribute(ctx *hcl.EvalContext, attr hcl.Expression, value cty.Value, def bool) (bool, errors.Error)
- func GetExpressionValueAsBool(ctx *hcl.EvalContext, expr hcl.Expression, def bool) (bool, errors.Error)
- func GetExpressionValueAsDuration(ctx *hcl.EvalContext, expr hcl.Expression, def *time.Duration) (*time.Duration, errors.Error)
- func GetExpressionValueAsInt(ctx *hcl.EvalContext, expr hcl.Expression, def int) (int, errors.Error)
- func GetExpressionValueAsInterface(ctx *hcl.EvalContext, expr hcl.Expression, def interface{}) (interface{}, errors.Error)
- func GetExpressionValueAsString(ctx *hcl.EvalContext, expr hcl.Expression, def string) (string, errors.Error)
- func GetValueAsBool(value cty.Value, def bool) bool
- func GetValueAsString(value cty.Value, def string) string
- func StringAttribute(ctx *hcl.EvalContext, attr hcl.Expression, value cty.Value, def string) (string, errors.Error)
- func ToInterface(v cty.Value) (interface{}, errors.Error)
- func ToString(v cty.Value) (string, errors.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttributeToStringWithoutContext ¶
AttributeToStringWithoutContext convert a hc Attribute into a string value.
func BoolAttribute ¶
func BoolAttribute(ctx *hcl.EvalContext, attr hcl.Expression, value cty.Value, def bool) (bool, errors.Error)
BoolAttribute return the attribute as a bool.
func GetExpressionValueAsBool ¶
func GetExpressionValueAsBool(ctx *hcl.EvalContext, expr hcl.Expression, def bool) (bool, errors.Error)
GetExpressionValueAsBool return the expression as bool.
func GetExpressionValueAsDuration ¶
func GetExpressionValueAsDuration(ctx *hcl.EvalContext, expr hcl.Expression, def *time.Duration) (*time.Duration, errors.Error)
GetExpressionValueAsDuration evaluate the expression and return a duration value.
func GetExpressionValueAsInt ¶
func GetExpressionValueAsInt(ctx *hcl.EvalContext, expr hcl.Expression, def int) (int, errors.Error)
GetExpressionValueAsInt evaluate the expression and return a int value.
func GetExpressionValueAsInterface ¶
func GetExpressionValueAsInterface(ctx *hcl.EvalContext, expr hcl.Expression, def interface{}) (interface{}, errors.Error)
GetExpressionValueAsInterface evaluate an hcl expresion and converts into an interface.
func GetExpressionValueAsString ¶
func GetExpressionValueAsString(ctx *hcl.EvalContext, expr hcl.Expression, def string) (string, errors.Error)
GetExpressionValueAsString return the value fo the expression as a string.
func GetValueAsBool ¶
GetValueAsBool return the value as a bool.
func GetValueAsString ¶
GetValueAsString converts a given cty.Value into a string or returns a default valu.
func StringAttribute ¶
func StringAttribute(ctx *hcl.EvalContext, attr hcl.Expression, value cty.Value, def string) (string, errors.Error)
StringAttribute return the attribute as a string.
func ToInterface ¶
ToInterface converts a given cty.Value into an interface.
Types ¶
This section is empty.