Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlebarsRenderer ¶
type HandlebarsRenderer struct {
// contains filtered or unexported fields
}
HandlebarsRenderer is a renderer that uses the raymond library to render Handlebars templates.
func NewHandlebarsRenderer ¶
func NewHandlebarsRenderer( viewGatherer echorend.RawTemplateGatherer, partialsGatherer echorend.RawTemplateGatherer, ) *HandlebarsRenderer
func (*HandlebarsRenderer) CheckRenders ¶
func (r *HandlebarsRenderer) CheckRenders() []error
CheckRenders is a convience tool for rendering all templates with no data to ensure they aren't referencing non-existant partials.
func (*HandlebarsRenderer) MustSetup ¶
func (r *HandlebarsRenderer) MustSetup()
MustSetup initializes the renderer by gathering templates from the view and partial gatherers and parsing them for render calls. If an error occurs, it panics.
func (*HandlebarsRenderer) Render ¶
func (r *HandlebarsRenderer) Render(w io.Writer, name string, data interface{}, _ echo.Context) error
Render renders a template with the given name and daata to the IO writer. this function is designed to slot directly into echo as a renderer
func (*HandlebarsRenderer) Setup ¶
func (r *HandlebarsRenderer) Setup() error
Setup initializes the renderer by gathering templates from the view and partial gatherers and parsing them for render calls.