Documentation
¶
Index ¶
- Constants
- func DELETE(context *gin.Context, ...)
- func Failed(c *gin.Context, err error)
- func GET(context *gin.Context, ...)
- func Ok(c *gin.Context, data interface{})
- func POST(context *gin.Context, ...)
- func PUT(context *gin.Context, ...)
- func Response(c *gin.Context, result Result)
- type IPreCheck
- type ParamError
- type Result
- type ResultErr
Constants ¶
View Source
const ( CodeUnknown = -1 CodeSuccess = 0 CodeBindJsonFailed = 1001 + iota CodePreCheckFailed )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IPreCheck ¶
type IPreCheck interface {
PreCheck() *ParamError
}
type ParamError ¶
type ParamError struct {
IllegalParams []string
}
func NewParamError ¶
func NewParamError() *ParamError
func (*ParamError) Add ¶
func (err *ParamError) Add(paramName string)
func (ParamError) Error ¶
func (err ParamError) Error() string
func (ParamError) String ¶
func (err ParamError) String() string
type Result ¶
type ResultErr ¶
func DefaultErr ¶
Click to show internal directories.
Click to hide internal directories.