request

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 文件不存在
	FILE_NOT_EXIST = "file not exist"
)

Variables

This section is empty.

Functions

func Bing

func Bing(c *gin.Context, obj interface{}) (err error)

Bing BingHeader header参数验证器

func BingFile

func BingFile(c *gin.Context, name ...string) (file *multipart.FileHeader, err error)

BingFile file参数验证器

func BingForm

func BingForm(c *gin.Context, obj interface{}) (err error)

BingForm form参数验证器

func BingJson

func BingJson(c *gin.Context, obj interface{}) (err error)

BingJson json参数验证器

func BingQuery

func BingQuery(c *gin.Context, obj interface{}) (err error)

BingQuery query参数验证器

func BingUri

func BingUri(c *gin.Context, obj interface{}) (err error)

BingUri uri参数验证器

func NewPageReq

func NewPageReq() *dao.PageRequest

NewPageReq 初始化分页请求参数 默认第一页 每页10条

Types

type ListRequest

type ListRequest struct {
	Page     int    `form:"page" json:"page" query:"page" binding:"omitempty,min=1" msg:"页码最小为1" example:"1"`
	PageSize int    `form:"page_size" json:"page_size" query:"page_size" binding:"omitempty,min=1" msg:"每页数量最小为1" example:"10"`
	Order    string `form:"order" json:"order" query:"order" msg:"排序" example:"descend"`
	Field    string `form:"field" json:"field" query:"field" msg:"排序字段" example:"id"`
}

ListRequest 列表请求参数

type ListResponse

type ListResponse struct {
	Total int `json:"total"`
	Page  int `json:"page"`
}

ListResponse 列表响应参数

Jump to

Keyboard shortcuts

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