home

package
v0.0.0-...-9f75418 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type News

type News struct {
	NewsType string  `form:"newsType" json:"newsType"  binding:"required,min=1"` //  验证规则:必填,最小长度为1
	Page     float64 `form:"page" json:"page"  binding:"required,min=1"`         //  验证规则:必填,最小值为1(float类型,min=1代表最小值为1)
	Limit    float64 `form:"limit" json:"limit"  binding:"required,min=1"`       //  验证规则:必填,最小值为1(float类型,min=1代表最小值为1)
}

门户类前端接口模拟一个获取新闻的参数验证器

func (News) CheckParams

func (n News) CheckParams(context *gin.Context)

Jump to

Keyboard shortcuts

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