Documentation ¶
Index ¶
- Variables
- func ReadJSON(r *http.Request, obj interface{}) error
- func Response302(w http.ResponseWriter, url string)
- func Response404(w http.ResponseWriter)
- func ResponseWithError(w http.ResponseWriter, err error)
- func ResponseWithJSON(w http.ResponseWriter, code int, msg string, payload interface{})
- type Error
- type HttpStatusError
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger *logrus.Logger
Functions ¶
func Response302 ¶
func Response302(w http.ResponseWriter, url string)
func Response404 ¶
func Response404(w http.ResponseWriter)
func ResponseWithError ¶
func ResponseWithError(w http.ResponseWriter, err error)
func ResponseWithJSON ¶
func ResponseWithJSON(w http.ResponseWriter, code int, msg string, payload interface{})
Types ¶
type HttpStatusError ¶
func (*HttpStatusError) Error ¶
func (e *HttpStatusError) Error() string
func (*HttpStatusError) Status ¶
func (e *HttpStatusError) Status() int
Click to show internal directories.
Click to hide internal directories.