controllers

package
v0.0.0-...-c0b4908 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DropCodeHandler

func DropCodeHandler(w http.ResponseWriter, r *http.Request)

DropCodeHandler handles the "/dropcode" route.

func DropNoteHandler

func DropNoteHandler(w http.ResponseWriter, r *http.Request)

DropNoteHandler handles the "/dropnote" route.

func Handle

func Handle(e error)

Handle deals with top-level errors

func IndexHandler

func IndexHandler(w http.ResponseWriter, r *http.Request)

IndexHandler handles the "/", "/home", "/favicon.ico" and all undefined routes.

func LoginHandler

func LoginHandler(w http.ResponseWriter, r *http.Request)

LoginHandler handles the "/login" route.

func LogoutHandler

func LogoutHandler(w http.ResponseWriter, r *http.Request)

LogoutHandler handles the "/logout" route.

func MeHandler

func MeHandler(w http.ResponseWriter, r *http.Request)

MeHandler handles the "/me" route.

func MyActionsHandler

func MyActionsHandler(w http.ResponseWriter, r *http.Request)

MyActionsHandler handles the "/me/actions" route.

func MyNotesHandler

func MyNotesHandler(w http.ResponseWriter, r *http.Request)

MyNotesHandler handles displaying details for one note

func MyUpdateHandler

func MyUpdateHandler(w http.ResponseWriter, r *http.Request)

MyUpdateHandler handles the "/me/update" route.

func NoteActionsHandler

func NoteActionsHandler(w http.ResponseWriter, r *http.Request)

NoteActionsHandler handles toggle and delete actions for notes

func NoteUpdateHandler

func NoteUpdateHandler(w http.ResponseWriter, r *http.Request)

NoteUpdateHandler takes care of updating notes

func QRHandler

func QRHandler(w http.ResponseWriter, r *http.Request)

QRHandler creates and serves QR Codes for notes

func ResetHandler

func ResetHandler(w http.ResponseWriter, r *http.Request)

ResetHandler handles the "/reset" route.

func SignupHandler

func SignupHandler(w http.ResponseWriter, r *http.Request)

SignupHandler handles the "/signup" route.

Types

type Data

type Data struct {
	Title, Site, Link, Description string
}

Data stores page information

type Flash

type Flash struct {
	Message string
	Status  flashStatus
	Custom  bool
}

Flash stores flash messages

type Info

type Info struct {
	Heading, Message string
}

Info holds data for informational pages

type Page

type Page struct {
	Data
	Info
	Flashes     []Flash
	models.User `json:"-"`
	models.Note `json:"-"`
	Notes       []models.Note
}

Page holds page data

Jump to

Keyboard shortcuts

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