Documentation ¶
Index ¶
- func BadRequest(w http.ResponseWriter, errType string, title string)
- func CORS(w http.ResponseWriter)
- func EmptyHandler(w http.ResponseWriter, r *http.Request)
- func Error(w http.ResponseWriter, resp ErrorResponse, code int)
- func InternalError(w http.ResponseWriter, errType string, title string)
- func NoContent(w http.ResponseWriter)
- func NotFound(w http.ResponseWriter, errType string, title string)
- func OK(w http.ResponseWriter, msg interface{})
- func SessionID() string
- func Unauthorized(w http.ResponseWriter, errType string, title string)
- func WrapPanic(fn http.HandlerFunc) http.HandlerFunc
- type ErrorResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadRequest ¶
func BadRequest(w http.ResponseWriter, errType string, title string)
func CORS ¶
func CORS(w http.ResponseWriter)
func EmptyHandler ¶
func EmptyHandler(w http.ResponseWriter, r *http.Request)
func Error ¶
func Error(w http.ResponseWriter, resp ErrorResponse, code int)
func InternalError ¶
func InternalError(w http.ResponseWriter, errType string, title string)
func NoContent ¶
func NoContent(w http.ResponseWriter)
func OK ¶
func OK(w http.ResponseWriter, msg interface{})
func Unauthorized ¶
func Unauthorized(w http.ResponseWriter, errType string, title string)
func WrapPanic ¶
func WrapPanic(fn http.HandlerFunc) http.HandlerFunc
Types ¶
type ErrorResponse ¶
Click to show internal directories.
Click to hide internal directories.