Documentation ¶
Index ¶
- func B[ARG any](ctx *gin.Context) (arg *ARG, err error)
- func BIND[ARG any](ctx *gin.Context) (arg *ARG, err error)
- func C0[RES any, RESPONSE any](run Handle0cFunc[RES], respFunc MakeRespFunc[RES, RESPONSE]) gin.HandlerFunc
- func C1[ARG, RES any, RESPONSE any](run Handle1cFunc[ARG, RES], parseReq ParseArgFunc[ARG], ...) gin.HandlerFunc
- func CX[ARG, RES any, RESPONSE any](run Handle1cFunc[ARG, RES], respFunc MakeRespFunc[RES, RESPONSE]) gin.HandlerFunc
- func Handle0c[RES any, RESPONSE any](run Handle0cFunc[RES], respFunc MakeRespFunc[RES, RESPONSE]) gin.HandlerFunc
- func Handle0p[RES any, RESPONSE any](run Handle0pFunc[RES], respFunc MakeRespFunc[RES, RESPONSE]) gin.HandlerFunc
- func Handle1c[ARG, RES any, RESPONSE any](run Handle1cFunc[ARG, RES], parseReq ParseArgFunc[ARG], ...) gin.HandlerFunc
- func Handle1p[ARG, RES any, RESPONSE any](run Handle1pFunc[ARG, RES], parseReq ParseArgFunc[ARG], ...) gin.HandlerFunc
- func P0[RES any, RESPONSE any](run Handle0pFunc[RES], respFunc MakeRespFunc[RES, RESPONSE]) gin.HandlerFunc
- func P1[ARG, RES any, RESPONSE any](run Handle1pFunc[ARG, RES], parseReq ParseArgFunc[ARG], ...) gin.HandlerFunc
- func PX[ARG, RES any, RESPONSE any](run Handle1pFunc[ARG, RES], respFunc MakeRespFunc[RES, RESPONSE]) gin.HandlerFunc
- func Q[ARG any](ctx *gin.Context) (arg *ARG, err error)
- func QueryForm[ARG any](ctx *gin.Context) (arg *ARG, err error)
- func QueryJson[ARG any](ctx *gin.Context) (arg *ARG, err error)
- type Handle0cFunc
- type Handle0pFunc
- type Handle1cFunc
- type Handle1pFunc
- type MakeRespFunc
- type ParseArgFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func C0 ¶
func C0[RES any, RESPONSE any](run Handle0cFunc[RES], respFunc MakeRespFunc[RES, RESPONSE]) gin.HandlerFunc
func C1 ¶
func C1[ARG, RES any, RESPONSE any](run Handle1cFunc[ARG, RES], parseReq ParseArgFunc[ARG], respFunc MakeRespFunc[RES, RESPONSE]) gin.HandlerFunc
func CX ¶
func CX[ARG, RES any, RESPONSE any](run Handle1cFunc[ARG, RES], respFunc MakeRespFunc[RES, RESPONSE]) gin.HandlerFunc
func Handle0c ¶
func Handle0c[RES any, RESPONSE any](run Handle0cFunc[RES], respFunc MakeRespFunc[RES, RESPONSE]) gin.HandlerFunc
func Handle0p ¶
func Handle0p[RES any, RESPONSE any](run Handle0pFunc[RES], respFunc MakeRespFunc[RES, RESPONSE]) gin.HandlerFunc
func Handle1c ¶
func Handle1c[ARG, RES any, RESPONSE any](run Handle1cFunc[ARG, RES], parseReq ParseArgFunc[ARG], respFunc MakeRespFunc[RES, RESPONSE]) gin.HandlerFunc
func Handle1p ¶
func Handle1p[ARG, RES any, RESPONSE any](run Handle1pFunc[ARG, RES], parseReq ParseArgFunc[ARG], respFunc MakeRespFunc[RES, RESPONSE]) gin.HandlerFunc
func P0 ¶
func P0[RES any, RESPONSE any](run Handle0pFunc[RES], respFunc MakeRespFunc[RES, RESPONSE]) gin.HandlerFunc
func P1 ¶
func P1[ARG, RES any, RESPONSE any](run Handle1pFunc[ARG, RES], parseReq ParseArgFunc[ARG], respFunc MakeRespFunc[RES, RESPONSE]) gin.HandlerFunc
func PX ¶
func PX[ARG, RES any, RESPONSE any](run Handle1pFunc[ARG, RES], respFunc MakeRespFunc[RES, RESPONSE]) gin.HandlerFunc
Types ¶
type Handle0cFunc ¶
Handle0cFunc 适用于没有参数且有ctx的处理函数的场景,推荐使用
type Handle0pFunc ¶
Handle0pFunc 适用于没有参数且无ctx的处理函数的场景,认为不带ctx的属于非正式的场景,没法拿到上下文的信息,比如监控或者超时等信息,但比较简单
type Handle1cFunc ¶
Handle1cFunc 适用于一个参数且有ctx的处理函数的场景,推荐使用
type Handle1pFunc ¶
Handle1pFunc 适用于一个参数且无ctx的处理函数的场景
type MakeRespFunc ¶
MakeRespFunc 这个函数能把结果再包装成带附加信息的,比如返回带错误码或者再从ctx里取东西,做拼装/翻译等操作
Click to show internal directories.
Click to hide internal directories.