Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DBOperationAbnormal occurred db expection. DBOperationAbnormal = http.StatusInternalServerError )
Adds definition status code
Variables ¶
View Source
var ( // OK -> 0 OK = &Error{Code: 0, Error: nil} // StatusDBOperationAbnormal -> DBOperationAbnormal StatusDBOperationAbnormal = &Error{Code: DBOperationAbnormal, Error: errors.New("database operation abnormal")} )
Functions ¶
This section is empty.
Types ¶
type WebAPIResponse ¶
WebAPIResponse wrapper of anything from bi.
func ErrorWithCustomer ¶
func ErrorWithCustomer(r Error) WebAPIResponse
ErrorWithCustomer returns customer results.
func ErrorWithMessage ¶
func ErrorWithMessage(m string) WebAPIResponse
ErrorWithMessage returns customer results.
Click to show internal directories.
Click to hide internal directories.