Documentation
¶
Overview ¶
xtemplate provides html/templates
this module is different from the others because, this one uses a static configuration into the module itself and does not load configs from env vars, I have made this decision because usually the location of templates is defined at compilation time and not at runtime.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
func LoadConfig ¶
func LoadConfig(params LoadConfigParams) (Config, error)
type FuncMapMappings ¶
FuncMapMappings gets populated by the container with all the FuncMapping regostered in the given group
type FuncMapping ¶
FuncMapping Necessary to register more than one Func
func NewFuncMapping ¶
func NewFuncMapping(name string, fn interface{}) FuncMapping
type LoadConfigParams ¶
type TemplateQualifier ¶
TemplateQualifier is necessary to give a name to the template
func NewTemplate ¶
func NewTemplate(config Config, funcs FuncMapMappings, logger xlog.OptionalLogger) (TemplateQualifier, error)
NewTemplate creates a new html/template with templates in config dir and given functions registered by the FuncMapMappings
Click to show internal directories.
Click to hide internal directories.