Documentation
¶
Index ¶
- Constants
- Variables
- func Failed(c *gin.Context, err error)
- func GenericReq[T any](context *gin.Context, handler func(receive T) (interface{}, error))
- func RegisterHandler(engine gin.IRouter, rootPath string, handler Handler)
- func Response(c *gin.Context, result Result)
- func SimpleReq(context *gin.Context, handler func() (interface{}, error))
- func Success(c *gin.Context, data interface{})
- type Check
- type Handler
- type HttpError
- type Result
- type Route
- type Router
Constants ¶
View Source
const ( CodeUnknown = -1 CodeSuccess = 0 CodeBindJsonFailed = 1 CodePreCheckFailed = 2 )
Variables ¶
View Source
var ErrFunc func(err error)
Functions ¶
func GenericReq ¶ added in v1.2.0
func RegisterHandler ¶ added in v1.2.2
Types ¶
type HttpError ¶
func StatusError ¶
type Result ¶
Click to show internal directories.
Click to hide internal directories.