template

package
v0.0.0-...-f87def4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2016 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlreadySet = xrr.NewXrror("cannot set template functions: already set")
View Source
var TemplateDoesNotExist = xrr.NewXrror("Template %s does not exist.").Out

Functions

This section is empty.

Types

type TemplateData

type TemplateData interface {
	state.State
}

func NewTemplateData

func NewTemplateData(s state.State, in interface{}) TemplateData

type Templater

type Templater interface {
	TemplateDirs(...string) []string
	ListTemplates() []string
	AddTemplateFunctions(fns map[string]interface{}) error
	SetTemplateFunctions()
	Render(io.Writer, string, interface{}) error
	RenderTemplate(state.State, string, interface{}) error
}

func DefaultTemplater

func DefaultTemplater(s store.Store, a asset.Assets) Templater

type Templates

type Templates interface {
	Templater
	SwapTemplater(Templater)
}

func New

func New(t Templater) Templates

Jump to

Keyboard shortcuts

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