ui

package
v0.6.0-next.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorWriter

func ErrorWriter(w http.ResponseWriter, err error)

ErrorWriter writes an UI error with the 500 status code.

func ErrorWriter404

func ErrorWriter404(w http.ResponseWriter, name string, ok bool)

ErrorWriter404 writes an UI error with a 404 code.

func ErrorWriterCustom

func ErrorWriterCustom(w http.ResponseWriter, err error, code int, title string)

ErrorWriterCustom writes an UI error to the http.ResponseWriter with a custom status code.

func GetTemplate

func GetTemplate(name string) *template.Template

GetTemplate returns a template from the template map.

func RegisterHandlers

func RegisterHandlers(r pure.IRouteGroup)

RegisterHandlers registers the handlers for the ui module.

Types

type Page

type Page struct {
	Title   string
	URL     []string
	Details interface{}
}

Page describes the information that will be sent to the template.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL