render

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2016 License: Apache-2.0 Imports: 5 Imported by: 31

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultDataKey    = `data`
	DefaultTmplKey    = `tmpl`
	DefaultTmplName   = `index`
	DefaultErrorTmpl  = `error`
	JSONPCallbackName = `callback`
	DefaultErrorFunc  = OutputError
	DefaultOutputFunc = Output
)

Functions

func AutoOutput

func AutoOutput(outputFunc func(string, echo.Context) error, skipper ...echo.Skipper) echo.MiddlewareFunc

AutoOutput Outputs the specified format

func Del

func Del(key string)

func Middleware

func Middleware(d echo.Renderer) echo.MiddlewareFunc

Middleware set renderer

func New

func New(key string, tmplDir string, args ...logger.Logger) Driver

func Output

func Output(format string, c echo.Context) error

Output Outputs the specified format

func OutputError

func OutputError(err error, format string, c echo.Context) error

OutputError Outputs the specified format

func Reg

func Reg(key string, val func(string) Driver)

func SetFuncs

func SetFuncs(c echo.Context, v *echo.Data)

SetFuncs register template function

Types

This section is empty.

Directories

Path Synopsis
* * 模板扩展 * @author swh <swh@admpub.com>
* * 模板扩展 * @author swh <swh@admpub.com>

Jump to

Keyboard shortcuts

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