Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DebugRender ¶
DebugRender like Render but reloads templates at every request For testing purposes only
func (*DebugRender) RenderPage ¶
func (htmlRend *DebugRender) RenderPage(wr io.Writer, tplContext TemplateContext) error
RenderPage render page and writes data to wr. Reloads all templates every time
type EditorContext ¶
EditorContext context for editor.html
type HTMLPageView ¶
type HTMLPageView interface {
RenderPage(wr io.Writer, tplContext TemplateContext) error
}
HTMLPageView renders HTML pages from templates
func NewView ¶
func NewView(filePath string) (HTMLPageView, error)
type OpenGraphInfo ¶
OpenGraphInfo contain Opengraph metadata
type PageContext ¶
type PageContext struct {
Title string
Body template.HTML
OgInfo *OpenGraphInfo
CreateTime string
DocID string
}
PageContext context for page.html
type Render ¶
type Render struct {
// contains filtered or unexported fields
}
Render contains set of templates and pre-rendered pages
func (*Render) RenderPage ¶
func (htmlRend *Render) RenderPage(wr io.Writer, tplContext TemplateContext) error
RenderPage render page and writes data to wr
type StatusContext ¶
StatusContext context for status.html
type TemplateContext ¶
type TemplateContext interface {
// FileName with template file to render
FileName() string
}
TemplateContext provides context for template
Click to show internal directories.
Click to hide internal directories.