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
- func UnmarshalAuditMetadata(metadataStr string) map[string]interface{}
- 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 v1.1.1
func CompileTimeCheck ¶ added in v1.1.1
func GetTemplate ¶ added in v1.1.1
func GetTemplateFuncs ¶ added in v1.1.1
GetTemplateFuncs will get the template functions
func GetTemplateNames ¶ added in v1.1.1
func GetTemplateNames() []string
func HandleNotFound ¶ added in v1.1.1
func HandleNotFound(w http.ResponseWriter, r *http.Request)
func HandlePageError ¶ added in v1.1.1
func HandlePageError(w http.ResponseWriter, r *http.Request, pageError error)
func HandleTemplateError ¶ added in v1.1.1
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 ¶ added in v1.1.1
func UnmarshalAuditMetadata ¶ added in v1.1.9
UnmarshalAuditMetadata parses audit metadata JSON string into a map
Types ¶
type ErrorPageData ¶ added in v1.1.1
type Frontend ¶ added in v1.1.1
type Frontend struct {
NotFoundHandler func(http.ResponseWriter, *http.Request)
// contains filtered or unexported fields
}
func NewFrontend ¶ added in v1.1.1
Click to show internal directories.
Click to hide internal directories.