Documentation
¶
Index ¶
- Constants
- func DataYay(w http.ResponseWriter, r *http.Request, filename string, content []byte)
- func Nay(w http.ResponseWriter, r *http.Request, err error, details ...interface{})
- func Yay(w http.ResponseWriter, r *http.Request, status int, content interface{})
- type Causer
- type Error
- type ErrorBadRequest
- type ErrorForbiddenError
- type ErrorInternalServerError
- type Response
- type ResponseBadRequest
- type ResponseForbiddenError
- type ResponseInternalServerError
- type ResponseSuccess
Constants ¶
View Source
const ErrMaxStack = 5
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
type Error struct {
Code utils.BusinessCode `json:"code"`
Message string `json:"message"`
Reasons map[string]string `json:"reasons"`
Details []interface{} `json:"details,omitempty"`
}
type ErrorBadRequest ¶
type ErrorForbiddenError ¶
type Response ¶
type ResponseBadRequest ¶
type ResponseBadRequest struct {
RequestId string `json:"request_id" example:"onelabs/IkhB54kdJd-000006"`
Error *ErrorBadRequest `json:"error,omitempty"`
Status int `json:"status" example:"400"`
}
type ResponseForbiddenError ¶
type ResponseForbiddenError struct {
RequestId string `json:"request_id" example:"onelabs/IkhB54kdJd-000006"`
Error *ErrorForbiddenError `json:"error,omitempty"`
Status int `json:"status" example:"403"`
}
type ResponseInternalServerError ¶
type ResponseInternalServerError struct {
RequestId string `json:"request_id" example:"onelabs/IkhB54kdJd-000006"`
Error *ErrorInternalServerError `json:"error,omitempty"`
Status int `json:"status" example:"500"`
}
type ResponseSuccess ¶
Click to show internal directories.
Click to hide internal directories.