response

package
v0.0.0-...-8019898 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MulanPSL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataPagination

func DataPagination(c *gin.Context, list interface{}, total int, query *PaginationQ)

拼装json 分页数据

func Fail

func Fail(c *gin.Context, data interface{}, msg string)

func Success

func Success(c *gin.Context, data interface{}, msg string)

Types

type PaginationQ

type PaginationQ struct {
	Ok        bool        `json:"ok"`
	PageSize  int         `form:"size" json:"size"`
	Page      int         `form:"page" json:"page"`
	Data      interface{} `json:"data" comment:"muster be a pointer of slice gorm.Model"`
	TotalSize int         `json:"total"`
}

Jump to

Keyboard shortcuts

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