Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { *Registry OutPath string OutPkg string Templates []TemplateConfiguration FuncsMap []string }
Configuration holds all information to run the template compiler.
func New ¶
func New(outpath string, templates []TemplateConfiguration, funcsmap ...string) *Configuration
New creates a new configuration instance
func (*Configuration) SetPkg ¶
func (c *Configuration) SetPkg(s string) *Configuration
SetPkg configures the output package of the produced compilation.
type DataConfiguration ¶
DataConfiguration holds information about the data type consumed by the template.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry registers compiled templates by their name.
func (Registry) Add ¶
func (t Registry) Add(name string, fn parse.CompiledTemplateFunc)
Add registers a func as a compiled template with given name.
type TemplateConfiguration ¶
type TemplateConfiguration struct { HTML bool TemplatesPath string TemplateName string TemplateContent string TemplatesData map[string]interface{} TemplatesDataConfiguration map[string]DataConfiguration FuncsMap []string FuncsExport map[string]interface{} PublicIdents []map[string]string }
TemplateConfiguration holds the configuration for a set of template files.
Click to show internal directories.
Click to hide internal directories.