handler

package
v0.0.0-...-4131fa7 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func New

func New(
	models model.Models,
	storage storage.Storage) *App

func (*App) JSONDecode

func (app *App) JSONDecode(r *http.Request, v interface{}) error

JSONDecode decodes given request to object that is given. Call this function with pointer to object that needs to be decoded.

func (*App) JSONRespond

func (app *App) JSONRespond(w http.ResponseWriter, r *http.Request, status int, data interface{})

JSONRespond generic respond func.

func (*App) Router

func (app *App) Router() chi.Router

Jump to

Keyboard shortcuts

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