Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NilTemplateError = Drror("nil template named %s").Out NoTemplateError = Drror("no template named %s").Out EmptyTemplateError = Drror("empty template named %s").Out ConfigurationError = Drror("Could not configure: %s").Out )
View Source
var NoLoadMethod = Drror("load method not implemented")
View Source
var PathError = Drror("path: %s returned error").Out
Functions ¶
Types ¶
type BaseLoader ¶
func (*BaseLoader) ListTemplates ¶
func (b *BaseLoader) ListTemplates() []string
func (*BaseLoader) ValidExtension ¶
func (b *BaseLoader) ValidExtension(ext string) bool
type Cache ¶
type Cache interface { Add(string, *template.Template) Get(string) (*template.Template, bool) Remove(string) Clear() On() bool SetCaching(bool) }
Cache is an interface to template caching.
type Configuration ¶
type Djinn ¶
type Djinn struct { Configuration *LoaderSet *FuncSet Cache }
The primary renderer, containing loaders, template functions, cache, & configuration.
func (*Djinn) Fetch ¶
Given a string name, Fetch attempts to get a *template.Template from cache or loaders, returning any error.
type FuncSet ¶
type FuncSet struct {
// contains filtered or unexported fields
}
func NewFuncSet ¶
func NewFuncSet() *FuncSet
type LoaderSet ¶
type LoaderSet struct {
// contains filtered or unexported fields
}
func NewLoaderSet ¶
func NewLoaderSet() *LoaderSet
func (*LoaderSet) AddLoaders ¶
func (*LoaderSet) GetLoaders ¶
Click to show internal directories.
Click to hide internal directories.