template

package
v3.0.0-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: May 30, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

README

Folder Information

This folder contains the template support for Iris. The folder name is singular (template) so the /template/engine, because you can use ONLY ONE at the same time.

How to use

Refer to the Book

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	BuildTemplates() error
	ExecuteWriter(out io.Writer, name string, binding interface{}, layout string) error
}

type Template

type Template struct {
	Engine        Engine
	IsDevelopment bool
	Gzip          bool
	ContentType   string
	Layout        string
	// contains filtered or unexported fields
}

func New

func New(c config.Template) *Template

New creates and returns a Template instance which keeps the Template Engine and helps with render

func (*Template) Render

func (t *Template) Render(ctx context.IContext, name string, binding interface{}, layout ...string) (err error)

func (*Template) RenderString

func (t *Template) RenderString(name string, binding interface{}, layout ...string) (result string, err error)

Directories

Path Synopsis
engine

Jump to

Keyboard shortcuts

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