Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApiException ¶
type ApiException struct { // 0表示正常, nil 表示状态未知, 业务异常吗 ErrorCode *int `json:"error_code"` // http 状态码 HttpCode int `json:"http_code"` // 具体的异常信息 Message string `json:"message"` }
之定义异常实现
func NewApiException ¶
func NewApiException(code int, message string) *ApiException
func NewUnauthorized ¶
func NewUnauthorized() *ApiException
func (*ApiException) Error ¶
func (e *ApiException) Error() string
func (*ApiException) SetHttpCode ¶
func (e *ApiException) SetHttpCode(code int) *ApiException
Click to show internal directories.
Click to hide internal directories.