2014-11-20 17:32:21 +00:00
|
|
|
package tpl
|
2013-09-01 00:35:17 +00:00
|
|
|
|
|
|
|
import (
|
2016-07-30 15:16:04 +00:00
|
|
|
"html/template"
|
|
|
|
"io"
|
2013-09-01 00:35:17 +00:00
|
|
|
)
|
|
|
|
|
2017-02-17 12:30:50 +00:00
|
|
|
// TODO(bep) make smaller
|
|
|
|
type Template interface {
|
|
|
|
ExecuteTemplate(wr io.Writer, name string, data interface{}) error
|
|
|
|
ExecuteTemplateToHTML(context interface{}, layouts ...string) template.HTML
|
|
|
|
Lookup(name string) *template.Template
|
|
|
|
Templates() []*template.Template
|
|
|
|
New(name string) *template.Template
|
|
|
|
GetClone() *template.Template
|
2017-02-21 12:55:08 +00:00
|
|
|
RebuildClone() *template.Template
|
2017-02-17 12:30:50 +00:00
|
|
|
LoadTemplates(absPath string)
|
|
|
|
LoadTemplatesWithPrefix(absPath, prefix string)
|
|
|
|
AddTemplate(name, tpl string) error
|
|
|
|
AddTemplateFileWithMaster(name, overlayFilename, masterFilename string) error
|
|
|
|
AddAceTemplate(name, basePath, innerPath string, baseContent, innerContent []byte) error
|
|
|
|
AddInternalTemplate(prefix, name, tpl string) error
|
|
|
|
AddInternalShortcode(name, tpl string) error
|
|
|
|
Partial(name string, contextList ...interface{}) template.HTML
|
|
|
|
PrintErrors()
|
|
|
|
Funcs(funcMap template.FuncMap)
|
|
|
|
MarkReady()
|
2015-01-30 23:56:25 +00:00
|
|
|
}
|