Documentation ¶ Index ¶ func Controller(list ...func(g *gin.RouterGroup)) func DBService[P any, R any](c *gin.Context, f func(db *gorm.DB, param P) (R, error)) func Init() func Interceptor(handlers ...func(g *gin.Context)) func Service[P any, R any](c *gin.Context, f func(P) (R, error)) type JSON Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Controller ¶ func Controller(list ...func(g *gin.RouterGroup)) Controller 用于controller注册路由 func DBService ¶ added in v1.0.4 func DBService[P any, R any](c *gin.Context, f func(db *gorm.DB, param P) (R, error)) func Init ¶ func Init() Init 对外提供初始化路由的方法 func Interceptor ¶ func Interceptor(handlers ...func(g *gin.Context)) Interceptor 用于注册拦截器 func Service ¶ func Service[P any, R any](c *gin.Context, f func(P) (R, error)) Types ¶ type JSON ¶ type JSON struct { Code int `json:"code"` Msg string `json:"msg"` Data any `json:"data"` } Source Files ¶ View all Source files controller.go init.go interceptor.go response.go service.go Click to show internal directories. Click to hide internal directories.