eval

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package eval translates runtime core.Context data into HCL EvalContext structures and dynamically evaluates HCL AST expressions back into Go primitives.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Any

func Any(expr hcl.Expression, ctx *core.Context) (any, error)

Any evaluates an arbitrary HCL expression into corresponding Go types.

func BaseContext

func BaseContext() *hcl.EvalContext

BaseContext returns the singleton root EvalContext containing all standard functions.

func Bool

func Bool(expr hcl.Expression, ctx *core.Context, defaultVal bool) (bool, error)

Bool evaluates an HCL expression to a boolean value.

func Int

func Int(expr hcl.Expression, ctx *core.Context, defaultVal int) (int, error)

Int evaluates an HCL expression to an integer.

func Map

func Map(expr hcl.Expression, ctx *core.Context) (map[string]any, error)

Map evaluates an HCL expression into a string-keyed dictionary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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