Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLoggedOut = &ErrResponse{ Err: nil, HTTPStatusCode: http.StatusUnauthorized, AppErrCode: http.StatusUnauthorized, AppErrMessage: http.StatusText(http.StatusUnauthorized), }
Functions ¶
func ErrBadRequest ¶
func ErrInternal ¶
func IsConflict ¶
func IsNotFound ¶
Types ¶
type ErrResponse ¶
type ErrResponse struct { Err error `json:"-"` HTTPStatusCode int `json:"-"` AppErrCode int `json:"code"` AppErrMessage string `json:"message"` Fields validate.Errors `json:"fields,omitempty"` }
func (ErrResponse) Render ¶
func (e ErrResponse) Render(w http.ResponseWriter, r *http.Request) error
Click to show internal directories.
Click to hide internal directories.