jsonio

package
v0.0.0-...-e38db06 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

HTTPStatusMap maps custom error types to relevant HTTP status codes

Functions

func DecodeRequest

func DecodeRequest(w http.ResponseWriter, r *http.Request, dest any) error

DecodeRequest

func EncodeError

func EncodeError(w http.ResponseWriter, r *http.Request, err error)

EncodeError writes error messages to the response writer

func EncodeResponse

func EncodeResponse(w http.ResponseWriter, r *http.Request, code int, data any)

EncodeResponse

Types

This section is empty.

Jump to

Keyboard shortcuts

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