Documentation
¶
Overview ¶
Package convert is taken from github.com/tmccombs/hcl2json added support to convert hcl.Body
Index ¶
- func Body(hclBody hcl.Body, options Options) ([]byte, error)
- func Bytes(bytes []byte, filename string, options Options) ([]byte, error)
- func ConvertFile(file *hcl.File, options Options) (jsonObj, error)
- func File(file *hcl.File, options Options) ([]byte, error)
- func GetEvalContext(basePath string) *hcl.EvalContext
- func MakeFileFunc(basePath string) function.Function
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Body ¶
Body takes the contents of an HCL Body, and converts them into a JSON representation of the HCL file.
func Bytes ¶
Bytes takes the contents of an HCL file, as bytes, and converts them into a JSON representation of the HCL file.
func GetEvalContext ¶ added in v0.13.8
func GetEvalContext(basePath string) *hcl.EvalContext
GetEvalContext returns the hcl eval context.
func MakeFileFunc ¶ added in v0.13.8
Types ¶
Click to show internal directories.
Click to hide internal directories.