utils

package
v0.0.0-...-f83a9ed Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleFindError

func HandleFindError(w http.ResponseWriter, err error)

HandleFindError responds when error occurs in FindByID methods

func RespondWithAppError

func RespondWithAppError(w http.ResponseWriter, handlerError error, message string, statusCode int)

func RespondWithJSON

func RespondWithJSON(w http.ResponseWriter, modelObj interface{}, statusCode int)

utility marshaling object into json, setting headers, status code

func SetHeaders

func SetHeaders(w http.ResponseWriter, statusCode int)

utility write headers method

Types

This section is empty.

Jump to

Keyboard shortcuts

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