Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { Qrunner *qrunner.Qrunner // Web stores the web framework Web *gin.Engine // Config stores the application configuration Config *config.Config // TemplateRenderer stores a service to easily render and cache templates TemplateRenderer *TemplateRenderer // Query is sql entered in textarea Query string }
Container keep the state of application
type TemplateParsed ¶
type TemplateParsed struct { // Template is the parsed template Template *template.Template // contains filtered or unexported fields }
TemplateParsed is a wrapper around parsed templates which are stored in the TemplateRenderer cache
type TemplateRenderer ¶
type TemplateRenderer struct {
// contains filtered or unexported fields
}
TemplateRenderer provides a flexible and easy to use method of rendering simple templates or complex sets of templates while also providing caching and/or hot-reloading depending on your current environment
func NewTemplateRenderer ¶
func NewTemplateRenderer(cfg *config.Config) *TemplateRenderer
NewTemplateRenderer creates a new TemplateRenderer
func (*TemplateRenderer) Load ¶
func (t *TemplateRenderer) Load(group, key string) (*TemplateParsed, error)
Load loads a template from the cache
func (*TemplateRenderer) Parse ¶
func (t *TemplateRenderer) Parse() *templateBuilder
Parse creates a template build operation
Click to show internal directories.
Click to hide internal directories.