hcl

package
v2.7.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2019 License: MIT Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Decode       = hcl.Decode
	DecodeObject = hcl.DecodeObject
	Parse        = hcl.Parse
	ParseBytes   = hcl.ParseBytes
	ParseString  = hcl.ParseString
)

Expose hcl public objects

View Source
var DictionaryHelper collections.IDictionaryHelper = hclDictHelper

DictionaryHelper gives public access to the basic dictionary functions

View Source
var GenericListHelper collections.IListHelper = hclListHelper

GenericListHelper gives public access to the basic list functions

Functions

func Load

func Load(filename string) (result interface{}, err error)

Load loads hcl file into variable

func Marshal

func Marshal(value interface{}) ([]byte, error)

Marshal serialize values to hcl format

func MarshalIndent

func MarshalIndent(value interface{}, prefix, indent string) ([]byte, error)

MarshalIndent serialize values to hcl format with indentation

func MarshalInternal

func MarshalInternal(value interface{}) ([]byte, error)

MarshalInternal serialize values to hcl format for result used in outer hcl struct

func MarshalTFVars

func MarshalTFVars(value interface{}) ([]byte, error)

MarshalTFVars serialize values to hcl format (without hcl map format)

func MarshalTFVarsIndent

func MarshalTFVarsIndent(value interface{}, prefix, indent string) ([]byte, error)

MarshalTFVarsIndent serialize values to hcl format with indentation (without hcl map format)

func SingleContext

func SingleContext(context ...interface{}) interface{}

SingleContext converts array of 1 to single object otherwise, let the context unchanged

func Unmarshal

func Unmarshal(bs []byte, out interface{}) (err error)

Unmarshal adds support to single array and struct representation

Types

type Dictionary

type Dictionary = hclDict

Dictionary implementation of IDictionary for hclDict

type List

type List = hclList

List implementation of IGenericList for hclList

Jump to

Keyboard shortcuts

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