Documentation ¶
Index ¶
- func DefineInternalServerErrCode(c uint)
- func DefineSuccessCode(code ErrCode)
- func HttpResponseError(w http.ResponseWriter, err error)
- func HttpResponseSuccess(w http.ResponseWriter, data interface{})
- func HttpResponseSuccessWithCode(w http.ResponseWriter, errCode int, data interface{})
- func ParseValidateError(err error) string
- func ResponseError(ctx iris.Context, err error)
- func ResponseSuccess(ctx iris.Context, data interface{})
- func Validate(v interface{}) error
- type ErrCode
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefineInternalServerErrCode ¶ added in v2.3.1
func DefineInternalServerErrCode(c uint)
func DefineSuccessCode ¶
func DefineSuccessCode(code ErrCode)
func HttpResponseError ¶
func HttpResponseError(w http.ResponseWriter, err error)
func HttpResponseSuccess ¶
func HttpResponseSuccess(w http.ResponseWriter, data interface{})
func HttpResponseSuccessWithCode ¶
func HttpResponseSuccessWithCode(w http.ResponseWriter, errCode int, data interface{})
func ParseValidateError ¶
func ResponseError ¶
func ResponseError(ctx iris.Context, err error)
func ResponseSuccess ¶
func ResponseSuccess(ctx iris.Context, data interface{})
Types ¶
type ErrCode ¶
type ErrCode struct {
// contains filtered or unexported fields
}
func NewErrCode ¶
func (ErrCode) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.