engines

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const EngineTypeHTML = "html"

Variables

This section is empty.

Functions

func RegisterEngine

func RegisterEngine(name string, e Engine)

RegisterEngine allows external go plugins to register new engines

func Render

func Render(w io.Writer, template *models.ThemeTemplate, vars map[string]interface{}) error

Render the given template using the engine it specifies and the given vars. Output is written to w.

Types

type Engine

type Engine interface {
	Execute(w io.Writer, templateData string, data interface{}) error
}

Engine has an ExecuteTemplate method which renders data into a template

Jump to

Keyboard shortcuts

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