templateset

package
v0.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitTemplateSet added in v0.0.8

func InitTemplateSet() error

InitTemplateSet creates templateSet instance

Types

type TemplateSet

type TemplateSet struct {
	// contains filtered or unexported fields
}

TemplateSet proccessed templates container

var Templates *TemplateSet

Templates global templateset

func (*TemplateSet) IsExist added in v0.0.14

func (t *TemplateSet) IsExist(templateName string) (tmpl *template.Template, ok bool)

IsExist checks if a given template exist and returns it

func (*TemplateSet) ReloadTemplates added in v0.0.8

func (t *TemplateSet) ReloadTemplates(quiet bool)

ReloadTemplates reloads all templates from templateDir

func (*TemplateSet) Render

func (t *TemplateSet) Render(ctx *fasthttp.RequestCtx, templateName string, data map[string]interface{})

Render todo

func (*TemplateSet) RenderError added in v0.0.13

func (t *TemplateSet) RenderError(ctx *fasthttp.RequestCtx, status int)

RenderError renders error page with status code set

type TemplateSetError

type TemplateSetError struct {
	Err error
}

func (*TemplateSetError) Error

func (tse *TemplateSetError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL