utils

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

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

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIntOrDefault

func GetIntOrDefault(value string, defaultValue int) int

GetIntOrDefault return value as string or if value is empty or not string return defaultValue

func GetJSONParameters

func GetJSONParameters(body io.ReadCloser, out interface{}) error

GetJSONParameters ...

func RespondWithJSON

func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})

RespondWithJSON prepare response as json with status code

func ResponseBadRequestError

func ResponseBadRequestError(w http.ResponseWriter, err error)

ResponseBadRequestError return response with error and bad request status

Types

This section is empty.

Jump to

Keyboard shortcuts

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