json

package
v0.0.0-...-73d33f3 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBody

func DecodeBody(w http.ResponseWriter, r *http.Request, v interface{}) error

DecodeBody reads the json-encoded request body and stores it in the value pointed to by v if fails, writes error response and return error

func Error

func Error(w http.ResponseWriter, err interface{}, code int)

Error prepares json error response

func Response

func Response(w http.ResponseWriter, v interface{}, code int)

Response prepares json response Sets content type and response body

Types

This section is empty.

Jump to

Keyboard shortcuts

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