2014-11-20 12:32:21 -05:00
|
|
|
package tpl
|
2013-08-31 20:35:17 -04:00
|
|
|
|
|
|
|
import (
|
2016-07-30 11:16:04 -04:00
|
|
|
"html/template"
|
|
|
|
"io"
|
2013-08-31 20:35:17 -04:00
|
|
|
)
|
|
|
|
|
2017-02-17 07:30:50 -05: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
|
|
|
|
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 18:56:25 -05:00
|
|
|
}
|