web

package
v0.0.0-...-81b12a4 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(w http.ResponseWriter, err error)

BadRequest ...

func InternalError

func InternalError(w http.ResponseWriter, err error)

InternalError ...

func NotFound

func NotFound(w http.ResponseWriter)

NotFound ...

func OK

func OK(w http.ResponseWriter)

OK ...

func ReadJSONBody

func ReadJSONBody(body io.ReadCloser, data interface{}) error

ReadJSONBody ...

func RespondJSON

func RespondJSON(w http.ResponseWriter, payload interface{})

RespondJSON ...

func RespondText

func RespondText(w http.ResponseWriter, text string)

RespondText ...

func Unauthorized

func Unauthorized(w http.ResponseWriter)

Unauthorized ...

Types

type MethodNotAllowedHandler

type MethodNotAllowedHandler struct {
}

MethodNotAllowedHandler ...

func (*MethodNotAllowedHandler) ServeHTTP

type NotFoundHandler

type NotFoundHandler struct {
}

NotFoundHandler ...

func (*NotFoundHandler) ServeHTTP

func (h *NotFoundHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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