Documentation
¶
Index ¶
- Variables
- func BuildPageHeader() (string, error)
- func CompileTimeCheck(fsys fs.FS) error
- func FormatTimeDiff(ts time.Time) template.HTML
- func GetTemplate(files ...string) *template.Template
- func GetTemplateFuncs() template.FuncMap
- func GetTemplateNames() []string
- func HandleNotFound(w http.ResponseWriter, r *http.Request)
- func HandlePageError(w http.ResponseWriter, r *http.Request, pageError error)
- func HandleTemplateError(w http.ResponseWriter, r *http.Request, fileIdentifier string, ...) error
- func IncludeHTML(path string) template.HTML
- type ErrorPageData
- type Frontend
- type Meta
- type PageData
Constants ¶
This section is empty.
Variables ¶
View Source
var LayoutTemplateFiles = []string{
"_layout/layout.html",
"_layout/header.html",
"_layout/footer.html",
}
Functions ¶
func BuildPageHeader ¶
func CompileTimeCheck ¶
func GetTemplate ¶
func GetTemplateFuncs ¶
GetTemplateFuncs will get the template functions
func GetTemplateNames ¶
func GetTemplateNames() []string
func HandleNotFound ¶
func HandleNotFound(w http.ResponseWriter, r *http.Request)
func HandlePageError ¶
func HandlePageError(w http.ResponseWriter, r *http.Request, pageError error)
func HandleTemplateError ¶
func HandleTemplateError(w http.ResponseWriter, r *http.Request, fileIdentifier string, functionIdentifier string, infoIdentifier string, err error) error
used to handle errors constructed by Template.ExecuteTemplate correctly
func IncludeHTML ¶
Types ¶
type ErrorPageData ¶
type Frontend ¶
type Frontend struct {
NotFoundHandler func(http.ResponseWriter, *http.Request)
// contains filtered or unexported fields
}
func NewFrontend ¶
func NewFrontend(config *types.FrontendConfig) (*Frontend, error)
Click to show internal directories.
Click to hide internal directories.