json

package
v0.0.0-...-3b39f08 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2018 License: Apache-2.0 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 sends a JSON response with the status code 400.

func Created

func Created(w http.ResponseWriter, v interface{})

Created sends a JSON response with the status code 201.

func Forbidden

func Forbidden(w http.ResponseWriter)

Forbidden sends a JSON response with the status code 403.

func NoContent

func NoContent(w http.ResponseWriter)

NoContent sends a JSON response with the status code 204.

func NotFound

func NotFound(w http.ResponseWriter, err error)

NotFound sends a JSON response with the status code 404.

func OK

func OK(w http.ResponseWriter, v interface{})

OK sends a JSON response with the status code 200.

func ServerError

func ServerError(w http.ResponseWriter, err error)

ServerError sends a JSON response with the status code 500.

func Unauthorized

func Unauthorized(w http.ResponseWriter)

Unauthorized sends a JSON response with the status code 401.

Types

This section is empty.

Jump to

Keyboard shortcuts

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