Documentation ¶
Index ¶
- Variables
- func BuildPageHeader() (string, error)
- func CompileTimeCheck(fsys fs.FS) error
- func GetTemplate(files ...string) *template.Template
- 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, ...) error
- 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 ¶ added in v0.0.4
func CompileTimeCheck ¶
func GetTemplate ¶
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, functionIdentifier, infoIdentifier string, err error) error
used to handle errors constructed by Template.ExecuteTemplate correctly
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.