Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigType ¶
type ConfigType string
ConfigType represents the type of configuration (static or dynamic)
const ( ConfigTypeStatic ConfigType = "static" ConfigTypeDynamic ConfigType = "dynamic" )
type HclField ¶
type HclField struct { Type ConfigType `hcl:"type" json:"type"` Static interface{} `hcl:"static,optional" json:"static,omitempty"` Dynamic string `hcl:"dynamic,optional" json:"dynamic,omitempty"` ValueType ValueType `hcl:"value_type" json:"value_type"` }
HclField represents a field in HCL that can be either static or dynamic
type HclGenerator ¶
type HclGenerator struct {
// contains filtered or unexported fields
}
HclGenerator provides functionality to generate HCL from structs
func NewHclGenerator ¶
func NewHclGenerator(blockType string, blockLabels []string) *HclGenerator
NewHclGenerator creates a new HclGenerator
func (*HclGenerator) GenerateHCL ¶
func (g *HclGenerator) GenerateHCL(config interface{}) (string, error)
GenerateHCL generates HCL from a struct using reflection
Click to show internal directories.
Click to hide internal directories.