Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanPaginate ¶
func SqlNullString ¶
func SqlNullString(value string) sql.NullString
Types ¶
type CursorResult ¶
type CursorResult struct { Results interface{} `json:"results"` // 数据 Cursor string `json:"cursor"` // 下一页 }
Cursor分页返回数据
type PageResult ¶
type PageResult struct { Page *Paging `json:"page"` // 分页信息 Results interface{} `json:"results"` // 数据 }
分页返回数据
type Pagination ¶
type Pagination struct { Total uint `json:"total"` PerPage uint `json:"per_page"` CurrentPage uint `json:"current_page"` LastPage uint `json:"last_page"` From uint `json:"from"` To uint `json:"to"` Data interface{} `json:"data"` }
func EmptyPagination ¶
func EmptyPagination(page, pageSize uint) Pagination
func Paginate ¶
func Paginate(page, pageSize, count uint, data interface{}) Pagination
Click to show internal directories.
Click to hide internal directories.