Documentation ¶
Index ¶
- func HandlerFuncErrorHandling(next http.HandlerFunc) http.HandlerFunc
- func JWTMiddleware(next http.Handler, secret string, claims jwt.MapClaims) http.Handler
- func ResponseError(w http.ResponseWriter, r *http.Request, body []byte, status int, ...)
- func ResponseJSON(w http.ResponseWriter, r *http.Request, body []byte, status int, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandlerFuncErrorHandling ¶
func HandlerFuncErrorHandling(next http.HandlerFunc) http.HandlerFunc
HandlerFuncErrorHandling is a middleware function to defer and return an error response in case of panic during the request
func JWTMiddleware ¶
JWTMiddleware is a middleware function to check the authorization JWT Bearer token header of the request
func ResponseError ¶
ResponseError makes the error response with payload as json format
func ResponseJSON ¶
func ResponseJSON(w http.ResponseWriter, r *http.Request, body []byte, status int, payload interface{})
ResponseJSON makes the response with payload as json format
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.