Documentation
¶
Overview ¶
Package value contains types and methods to deal with cty value
Package converter content relative to the package ¶
Package value contains types and methods to deal with cty value
Index ¶
- func AttributeToStringWithoutContext(attribute *hcl.Attribute) (string, errors.Error)
- func EvalAttribute(ctx *hcl.EvalContext, attribute *hcl.Attribute) (cty.Value, errors.Error)
- func EvalAttributeAsSlice(ctx *hcl.EvalContext, attribute *hcl.Attribute) ([]cty.Value, errors.Error)
- func EvalExpression(ctx *hcl.EvalContext, expr hcl.Expression) (cty.Value, errors.Error)
- func EvaluateArrayItemExpression(ctx *hcl.EvalContext, name string, index int, val hcl.Expression) errors.Error
- func EvaluateExpressions(ctx *hcl.EvalContext, expressions map[string]hcl.Expression) 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 IsMap(value cty.Value) bool
- func IsSlice(value cty.Value) bool
- func ToInterface(v cty.Value) (interface{}, errors.Error)
- func ToStrictString(value cty.Value) (string, errors.Error)
- func ToString(v cty.Value) (string, errors.Error)
- func ToValue(value interface{}) cty.Value
- func ToValueList(input []interface{}) cty.Value
- func ToValueMap(input map[string]interface{}) cty.Value
- func ValuesSlice(value cty.Value) ([]cty.Value, 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 EvalAttribute ¶
EvalAttribute evaluate the hcl attribute.
func EvalAttributeAsSlice ¶
func EvalAttributeAsSlice(ctx *hcl.EvalContext, attribute *hcl.Attribute) ([]cty.Value, errors.Error)
EvalAttributeAsSlice evaluate the hcl attribute and convert it into a slice.
func EvalExpression ¶
EvalExpression evaluate the hcl expression.
func EvaluateArrayItemExpression ¶
func EvaluateArrayItemExpression(ctx *hcl.EvalContext, name string, index int, val hcl.Expression) errors.Error
nolint EvaluateArrayItemExpression evaluate the the list of expressions.
func EvaluateExpressions ¶
EvaluateExpressions evaluate the the list of expressions.
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 ToInterface ¶
ToInterface converts a given cty.Value into an interface.
func ToStrictString ¶
ToStrictString convert the value into a string.
func ToValueList ¶
ToValueList convert the array into a value.
func ToValueMap ¶
ToValueMap convert the map into a value.
Types ¶
This section is empty.