template

package
v0.0.0-...-fd23dd1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: OSL-3.0 Imports: 3 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindCtxFunc

func BindCtxFunc(injector *dingo.Injector, name string, fnc CtxFunc)

func BindFunc

func BindFunc(injector *dingo.Injector, name string, fnc Func)

Types

type CtxFunc

type CtxFunc interface {
	Func(context.Context) interface{}
}

type CtxFuncProvider

type CtxFuncProvider func() map[string]CtxFunc

type Engine

type Engine interface {
	Render(context context.Context, name string, data interface{}) (io.Reader, error)
}

Engine defines the basic template engine

type Func

type Func interface {
	Func() interface{}
}

type FuncProvider

type FuncProvider func() map[string]Func

type PartialEngine

type PartialEngine interface {
	RenderPartials(ctx context.Context, templateName string, data interface{}, partials []string) (map[string]string, error)
}

RenderPartials is used for progressive enhancements / rendering of partial template areas usually this is requested via the appropriate javascript headers and taken care of in the framework renderer

Jump to

Keyboard shortcuts

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