Documentation ¶
Overview ¶
Package handlebars the HandlebarsEngine's functionality
Index ¶
- Constants
- type Config
- type Engine
- func (e *Engine) ExecuteRaw(src string, wr io.Writer, binding interface{}) (err error)
- func (e *Engine) ExecuteWriter(out io.Writer, name string, binding interface{}, ...) error
- func (e *Engine) Funcs() map[string]interface{}
- func (e *Engine) LoadAssets(virtualDirectory string, virtualExtension string, ...) error
- func (e *Engine) LoadDirectory(dir string, extension string) error
Constants ¶
View Source
const (
// NoLayout to disable layout for a particular template file
NoLayout = "@.|.@no_layout@.|.@"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Helpers for Handlebars, you can register your own by raymond.RegisterHelper(name string, a interface{}) or RegisterHelpers(map[string]interface{}) // or just fill this method, do not override it it is not nil by default (because of Iris' helpers (url and urlpath) Helpers map[string]interface{} Layout string }
Config for handlebars template engine
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the default configs for the handlebars template engine
type Engine ¶
type Engine struct { Config Config // contains filtered or unexported fields }
Engine the Handlebars engine
func (*Engine) ExecuteRaw ¶
ExecuteRaw receives, parse and executes raw source template contents it's super-simple function without options and funcs, it's not used widely implements the EngineRawExecutor interface
func (*Engine) ExecuteWriter ¶
func (e *Engine) ExecuteWriter(out io.Writer, name string, binding interface{}, options ...map[string]interface{}) error
ExecuteWriter executes a templates and write its results to the out writer
Click to show internal directories.
Click to hide internal directories.