web

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2021 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AlertErrorMsgGeneric is displayed when any random error
	// is encountered by our backend.
	AlertErrorMsgGeneric       = "Sorry; something went wrong."
	AlertFormParseErrorGeneric = "Sorry; there was a problem parsing your form."
	AlertClassError            = "alert-danger"
	AlertClassSuccess          = "alert-success"
)

Variables

This section is empty.

Functions

func Handler

Handler sets the httprouter routes for the web package

Types

type Alert

type Alert struct {
	Message string
	Class   string
}

Alert is used to render messages in templates

type Data

type Data struct {
	Head
	Alert Alert
	User
	Yield interface{}
}

Data is structure that views expect data to be in

type Head struct {
	Title string
}

Head is the structure for the header part of the templates

type User

type User struct {
	ID        int64
	FirstName string
}

Jump to

Keyboard shortcuts

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