template

package
v2.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: OSL-3.0 Imports: 3 Imported by: 0

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