Versions in this module Expand all Collapse all v1 v1.0.0 Jan 17, 2019 Changes in this version + const DBErr + const GenErr + const HTTPErr + const JSONErr + func PanicBadRequest(code ErrorCode, msg string) + func PanicConflict(code ErrorCode, msg string) + func PanicInternalError(code ErrorCode, msg string) + func PanicNotFound(code ErrorCode, msg string) + type ErrorCode string + type ErrorResponse struct + Code ErrorCode + Msg string + Status int + type Json struct + SetNoCacheHeaders bool + func (c *Json) Handle(w http.ResponseWriter, r *http.Request, handler RequestHandler) + func (c *Json) ParseJsonBody(r *http.Request, v interface{}) + type RequestHandler func() (status int, response interface{})