Documentation ¶
Index ¶
- Variables
- func GetTemplateNamesInDirs(paths []string) ([]string, error)
- func LoadTemplates(tmpl *template.Template, role string) error
- func PrepareVars(nodes map[string]nodes.Node, links map[int]*types.Link) map[string]Dict
- func RenderAll(nodes map[string]nodes.Node, links map[int]*types.Link) (map[string]*NodeConfig, error)
- type Dict
- type NodeConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var TemplateNames []string
templates to execute
View Source
var TemplatePaths []string
path to additional templates
Functions ¶
func GetTemplateNamesInDirs ¶
GetTemplateNamesInDirs returns a list of template file names found in a list of dir `paths` without traversing nested dirs template names are following the pattern <some-name>__<role/kind>.tmpl
func LoadTemplates ¶
Load templates from all paths for the specific role/kind
func PrepareVars ¶
Prepare variables for all nodes. This will also prepare all variables for the links
Types ¶
type NodeConfig ¶
type NodeConfig struct { TargetNode *types.NodeConfig // All the variables used to render the template Vars map[string]interface{} // the Rendered templates Data []string Info []string }
func (*NodeConfig) Print ¶
func (c *NodeConfig) Print(printLines int, forceDebug ...bool)
Print the config
Click to show internal directories.
Click to hide internal directories.