Documentation ¶
Index ¶
- Constants
- func ClearAllSession(ctx *gin.Context)
- func GetSession(ctx *gin.Context, k string) interface{}
- func Logger() gin.HandlerFunc
- func RemoveSession(ctx *gin.Context, k string)
- func ResultFail(ctx *gin.Context, err interface{})
- func ResultFailData(ctx *gin.Context, data interface{}, err interface{})
- func ResultList(ctx *gin.Context, data interface{}, total int64)
- func ResultMap(ctx *gin.Context, m map[string]interface{})
- func ResultMsg(ctx *gin.Context, msg string)
- func ResultOk(ctx *gin.Context, data interface{})
- func ResultOkMsg(ctx *gin.Context, data interface{}, msg string)
- func ResultPageList(ctx *gin.Context, data interface{}, pager interface{})
- func SetSession(ctx *gin.Context, k string, o interface{})
- func UseSession(router *gin.Engine)
- type Pager
- type RespData
- type RespDataList
- type RespDataPager
Constants ¶
View Source
const ( Success = iota Fail )
Variables ¶
This section is empty.
Functions ¶
func ClearAllSession ¶
func GetSession ¶
func Logger ¶
func Logger() gin.HandlerFunc
func RemoveSession ¶
func ResultFail ¶
func ResultFailData ¶
func ResultList ¶
func ResultOkMsg ¶
func ResultPageList ¶
func SetSession ¶
func UseSession ¶
Types ¶
type Pager ¶
type Pager struct { Page int `form:"page" json:"page"` //当前页 PageSize int `form:"pageSize" json:"pageSize"` //每页条数 Total int `form:"total" json:"total"` //总条数 PageCount int `form:"pageCount" json:"pageCount"` //总页数 NumStart int `form:"numStart" json:"numStart"` //开始序数 }
分页对象
func CreatePager ¶
type RespDataPager ¶
type RespDataPager struct { RespData Pager interface{} `json:"pager"` }
Click to show internal directories.
Click to hide internal directories.