Documentation ¶
Index ¶
- func Install(g *gin.RouterGroup, c BaseInterface, path string)
- func ListPaging(c *gin.Context, obj interface{}, db *model.GormDB, ...)
- type Auth
- type BaseInterface
- type Controller
- func (t *Controller) Add(c *gin.Context)
- func (t *Controller) Count(c *gin.Context)
- func (t *Controller) DefaultListPaging(c *gin.Context, midd model.Middleware)
- func (t *Controller) Delete(c *gin.Context)
- func (t *Controller) Detail(c *gin.Context)
- func (t *Controller) GetAuth() Auth
- func (t *Controller) Install(g *gin.RouterGroup, path string)
- func (t *Controller) ListAll(c *gin.Context)
- func (t *Controller) ListPaging(c *gin.Context)
- func (t *Controller) Update(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListPaging ¶
func ListPaging(c *gin.Context, obj interface{}, db *model.GormDB, result func(data interface{}) interface{}, pagingMidd model.Middleware, midd ...model.Middleware)
ListPaging 处理通用 page size orderby search
Types ¶
type BaseInterface ¶
type BaseInterface interface { ListAll(c *gin.Context) ListPaging(c *gin.Context) Detail(c *gin.Context) Add(c *gin.Context) Update(c *gin.Context) Delete(c *gin.Context) Count(c *gin.Context) // Install Install Install(g *gin.RouterGroup, path string) }
BaseInterface ControllerInterface
type Controller ¶
type Controller struct { DB *model.GormDB Model model.Controller Auth }
Controller Controller
func (*Controller) DefaultListPaging ¶
func (t *Controller) DefaultListPaging(c *gin.Context, midd model.Middleware)
DefaultListPaging DefaultListPaging
func (*Controller) Install ¶
func (t *Controller) Install(g *gin.RouterGroup, path string)
Install Install
func (*Controller) ListPaging ¶
func (t *Controller) ListPaging(c *gin.Context)
ListPaging ListPaging
Click to show internal directories.
Click to hide internal directories.