ginc

package
v0.0.0-...-15b0c83 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPage

func GetPage(c *gin.Context) int

func GetPageSize

func GetPageSize(c *gin.Context) int

Types

type Pager

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

type Response

type Response struct {
	Ctx *gin.Context
}

func NewResponse

func NewResponse(ctx *gin.Context) *Response

func (*Response) List

func (r *Response) List(list, totalRows int)

func (*Response) Raw

func (r *Response) Raw(data interface{})

func (*Response) ToErrorResponse

func (r *Response) ToErrorResponse(err *errcode.Error)

Jump to

Keyboard shortcuts

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