Documentation ¶
Index ¶
- func LogErrorResponse(r *http.Request, err error, code int, message string)
- func LogSuccessfulResponse(r *http.Request, data interface{})
- func WriteErrorJSON(w *http.ResponseWriter, r *http.Request, code int, message string)
- func WriteSuccessfulJSON(w *http.ResponseWriter, r *http.Request, data interface{})
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogErrorResponse ¶
LogErrorResponse - logs an errornous server server at level debug on standard logger
func LogSuccessfulResponse ¶
LogSuccessfulResponse - logs a successful server response at level debug on standard logger
func WriteErrorJSON ¶
WriteErrorJSON - logs and sends a json response to the client showing the error message
func WriteSuccessfulJSON ¶
func WriteSuccessfulJSON(w *http.ResponseWriter, r *http.Request, data interface{})
WriteSuccessfulJSON - logs and sends a new json response to the client
Types ¶
Click to show internal directories.
Click to hide internal directories.