Version: v0.0.0-...-688727d Latest Latest

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

Go to latest
Published: Aug 6, 2017 License: MIT Imports: 14 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Handler

type Handler struct {
	// contains filtered or unexported fields

Handler receives all app-specific HandlerFunctions, embedding the app's database connection pool and templates.

func GetHandler

func GetHandler() *Handler

GetHandler returns the initialized Handler

func (*Handler) CreateProduct

func (hdl *Handler) CreateProduct(w http.ResponseWriter, r *http.Request)

CreateProduct serves a form for creating a new product

func (*Handler) GETAdmin

func (hdl *Handler) GETAdmin(w http.ResponseWriter, r *http.Request)

GETAdmin GET /admin

func (*Handler) GETIndex

func (hdl *Handler) GETIndex(w http.ResponseWriter, r *http.Request)

GETIndex GET /

func (*Handler) GETLogin

func (hdl *Handler) GETLogin(w http.ResponseWriter, r *http.Request)

GETLogin GET /login

func (*Handler) GETRegister

func (hdl *Handler) GETRegister(w http.ResponseWriter, r *http.Request)

GETRegister GET /register

func (*Handler) GETUsers

func (hdl *Handler) GETUsers(w http.ResponseWriter, r *http.Request)

GETUsers GET /admin/users

func (*Handler) NotFound

func (hdl *Handler) NotFound(w http.ResponseWriter, r *http.Request)

NotFound handles 404 errors

func (*Handler) POSTLogin

func (hdl *Handler) POSTLogin(w http.ResponseWriter, r *http.Request)

POSTLogin POST /login

func (*Handler) POSTRegister

func (hdl *Handler) POSTRegister(w http.ResponseWriter, r *http.Request)

POSTRegister POST /register

func (*Handler) PatchProduct

func (hdl *Handler) PatchProduct(w http.ResponseWriter, r *http.Request)

PatchProduct attempts to update a product from the given request data

func (*Handler) PostProduct

func (hdl *Handler) PostProduct(w http.ResponseWriter, r *http.Request)

PostProduct attempts to create a product from the given request data

func (*Handler) Products

func (hdl *Handler) Products(w http.ResponseWriter, r *http.Request)

Products serves a listing of all products

func (*Handler) UpdateProduct

func (hdl *Handler) UpdateProduct(w http.ResponseWriter, r *http.Request)

UpdateProduct serves a form for editing a product

func (*Handler) ViewProduct

func (hdl *Handler) ViewProduct(w http.ResponseWriter, r *http.Request)

ViewProduct serves details of the identified product

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL