app

package
v0.0.0-...-44b14cd Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitTemplates

func InitTemplates(path string)

InitTemplates parses the templates and panics if it can't

func RenderTemplate

func RenderTemplate(w http.ResponseWriter, template string, data interface{})

RenderTemplate writes a template to a Response Panics if the templates haven't been initialized.

Types

type ErrorInfo

type ErrorInfo struct {
	Info          string
	RedirectLink  string
	RedirectTimer int
}

ErrorInfo is used to fill the error with redirect page

type PageInfo

type PageInfo struct {
	// Username is populated if the user is logged in
	Username *string

	// Error is populated if an error message should be shown
	Error []string
}

PageInfo holds pieces of information that slot into standard placeholders on pages Any field may be null if not applicable

Jump to

Keyboard shortcuts

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