Documentation
¶
Index ¶
Constants ¶
View Source
const ( PTYPE_DIY = 0 // 自定义校验 PTYPE_USERNAME = 1 // 账号校验 PTYPE_PASSWORD = 2 // 密码校验 PTYPE_INT = 3 // 整数校验 PTYPE_UINT = 4 // 正整数校验 PTYPE_NUMBERS = 5 // 数字列表 1,2,3 PTYPE_ID = 6 // ID校验 )
Variables ¶
View Source
var RouterPools = make(map[string]*XRouter) // 路由函数
Functions ¶
Types ¶
type Param ¶
type Param struct {
Title string // 标题
Key string // 参数的名字
Comment string // 参数备注 生成API用到
Type int // 参数类型
Default string // 默认值
Require bool // 是否是必填
Func func(value string) bool
}
* 参数自动校验
Click to show internal directories.
Click to hide internal directories.