ctyconv

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package ctyconv converts Go runtime values to cty.Value and evaluates HCL expressions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuiltinFunctions

func BuiltinFunctions() map[string]function.Function

BuiltinFunctions returns standard helper functions available in HCL expressions.

func EvalAny

func EvalAny(expr hcl.Expression, ctx *hcl.EvalContext) (any, error)

EvalAny evaluates an HCL expression into a native Go value.

func EvalBool

func EvalBool(expr hcl.Expression, ctx *hcl.EvalContext) (bool, error)

EvalBool evaluates an HCL expression expecting a boolean result.

func ToCty

func ToCty(val any) cty.Value

ToCty converts any Go primitive, slice, map, or struct into a cty.Value.

func ToNative

func ToNative(val cty.Value) any

ToNative converts a cty.Value back into standard Go primitives, slices, or maps.

Types

This section is empty.

Jump to

Keyboard shortcuts

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