handlers

package
v0.0.0-...-a55ffd3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFiles

func GetFiles(path string) http.HandlerFunc

func GetProtocol

func GetProtocol(r *http.Request) string

GetProtocol returns type of HTTP protocol

func HeaderMiddleware

func HeaderMiddleware(next http.Handler) http.Handler

HeaderMiddleware makes every handler use headers CORS and JSON

func HealthCheck

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

func Info

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

func Login

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

func UploadFile

func UploadFile(uploadPath string, maxUploadSize int64) http.HandlerFunc

Types

type Cards

type Cards struct {
	DB *sqlx.DB
}

Cards defines all of the handlers related to cards. It holds the apllication state needed by the handler method.

func (*Cards) AddCard

func (c *Cards) AddCard(w http.ResponseWriter, r *http.Request)

func (*Cards) DeleteCard

func (c *Cards) DeleteCard(w http.ResponseWriter, r *http.Request)

func (*Cards) GetCard

func (c *Cards) GetCard(w http.ResponseWriter, r *http.Request)

GetCard gets all cards from the service layer encodes them for the client response

func (*Cards) GetCards

func (c *Cards) GetCards(w http.ResponseWriter, r *http.Request)

func (*Cards) SecuredContent

func (c *Cards) SecuredContent(w http.ResponseWriter, r *http.Request)

func (*Cards) UpdateCard

func (c *Cards) UpdateCard(w http.ResponseWriter, r *http.Request)
type Menus struct {
	DB *sqlx.DB
}

Menus defines all of the handlers related to menus. It holds the apllication state needed by the handler method.

func (m *Menus) AddMenu(w http.ResponseWriter, r *http.Request)
func (m *Menus) DeleteMenu(w http.ResponseWriter, r *http.Request)
func (m *Menus) GetCardOfMenu(w http.ResponseWriter, r *http.Request)
func (m *Menus) GetMenu(w http.ResponseWriter, r *http.Request)

GetMenu gets all menus from the service layer encodes them for the client response

func (m *Menus) GetMenus(w http.ResponseWriter, r *http.Request)
func (m *Menus) UpdateMenu(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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