Documentation ¶
Index ¶
- type IRenderer
- type Renderer
- func (r *Renderer) AddTemplates(templateItems ...*Template) error
- func (r *Renderer) AddTemplatesWithLayout(templateItems ...*TemplateWithLayout) error
- func (r *Renderer) LoadFile(fileName string) string
- func (r *Renderer) Render(w io.Writer, name string, data interface{}, ctx echo.Context) error
- func (r *Renderer) SetDebug(value bool)
- type Template
- type TemplateWithLayout
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IRenderer ¶
type IRenderer interface { AddTemplates(templateItems ...*Template) error AddTemplatesWithLayout(templateItems ...*TemplateWithLayout) error LoadFile(fileName string) string Render(w io.Writer, name string, data interface{}, ctx echo.Context) error SetDebug(value bool) }
IRenderer defines an interface for a renderer
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer implements the Echo renderer and IRenderer interfaces
func NewRenderer ¶
NewRenderer creates a new renderer component with an empty set of templates
func (*Renderer) AddTemplates ¶
AddTemplates adds one or more templates
func (*Renderer) AddTemplatesWithLayout ¶
func (r *Renderer) AddTemplatesWithLayout(templateItems ...*TemplateWithLayout) error
AddTemplatesWithLayout adds one ore more templates with layouts
type TemplateWithLayout ¶
A TemplateWithLayout describes a template to be rendered. This includes the template's layout, name, and content
Click to show internal directories.
Click to hide internal directories.