util

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadJSONBody

func ReadJSONBody(r *http.Request, v interface{}) error

ReadJSONBody is a generic request reader to unmarshal JSON bodies.

func WriteJSONResponse

func WriteJSONResponse(w http.ResponseWriter, r *http.Request, code int, response interface{})

WriteJSONResponse is a generic wrapper for returning a JSON payload to the client.

Types

This section is empty.

Jump to

Keyboard shortcuts

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