Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TemplateCache ¶
type TemplateCache struct {
Cache map[string]TemplateCacheItem
}
TemplateCache holds the template cache as map of TemplateCacheItem
type TemplateCacheItem ¶
TemplateCacheItem holds a pointer to a generated template, and the time it was generated at.
func (*TemplateCacheItem) Execute ¶
func (item *TemplateCacheItem) Execute(d *TemplateData, w http.ResponseWriter) error
Execute writes the template to the supplied writer using the supplied data.
type TemplateData ¶
type TemplateData struct { StringMap map[string]string `json:"StringMap" yaml:"StringMap" toml:"StringMap"` IntMap map[string]int `json:"IntMap" yaml:"IntMap" toml:"IntMap"` FloatMap map[string]float32 `json:"FloatMap" yaml:"FloatMap" toml:"FloatMap"` LinkMap map[string][]Link `json:"LinkMap" yaml:"LinkMap" toml:"LinkMap"` Data map[string]interface{} `json:"Data" yaml:"Data" toml:"Data"` CSRFToken string `json:"Csrftoken" yaml:"Csrftoken" toml:"Csrftoken"` Flash string `json:"Flash" yaml:"Flash" toml:"Flash"` Warning string `json:"Warning" yaml:"Warning" toml:"Warning"` Error string `json:"Error" yaml:"Error" toml:"Error"` }
TemplateData holds data sent from handlers to templates.
Click to show internal directories.
Click to hide internal directories.