app

package
v0.0.0-...-50e54af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAttrId

func GetAttrId(g *gin.Context) int

func GetCid

func GetCid(ctx *gin.Context) int

func GetPage

func GetPage(c *gin.Context) int

func GetPageOffset

func GetPageOffset(page, pageSize int) int

func GetPageSize

func GetPageSize(c *gin.Context) int

func GetUid

func GetUid(ctx *gin.Context) int

func ResponseData

func ResponseData(g *gin.Context, data interface{})

func ResponseErr

func ResponseErr(g *gin.Context, err error)

func ResponseSuccess

func ResponseSuccess(g *gin.Context)

func ToResponseList

func ToResponseList(g *gin.Context, list interface{}, totalRows int)

Types

type Pager

type Pager struct {
	// 页码
	Page int `json:"page"`
	// 每页数量
	PageSize int `json:"page_size"`
	// 总行数
	TotalRows int `json:"total_rows"`
}

type Pagination

type Pagination struct {
	Limit     int64 `json:"limit"`
	Offset    int64 `json:"offset"`
	TotalRows int64 `json:"total_rows"`
}

func GetPagination

func GetPagination(c *gin.Context) *Pagination

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL