menu

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Add = validates.Validates{Validate: AddValidate{}}

Add 重写验证器结构体,切记不使用引用,而是拷贝

View Source
var Delete = validates.Validates{Validate: DeleteValidate{}}

Delete 重写验证器结构体,切记不使用引用,而是拷贝

View Source
var Find = validates.Validates{Validate: FindValidate{}}

Find 重写验证器结构体,切记不使用引用,而是拷贝

List 重写验证器结构体,切记不使用引用,而是拷贝

View Source
var Modify = validates.Validates{Validate: ModifyValidate{}}

Modify 重写验证器结构体,切记不使用引用,而是拷贝

Functions

This section is empty.

Types

type AddValidate

type AddValidate struct {
	Pid    uint   `json:"pid" validate:"omitempty,numeric" label:"父菜单ID"`
	Name   string `json:"name" validate:"required,max=20" label:"菜单名称"`
	Path   string `json:"path" validate:"required,max=100" label:"菜单路由"`
	Method string `json:"method" validate:"required,max=20" label:"请求方法"`
	Sort   uint   `json:"sort" validate:"omitempty,numeric" label:"排序"`
}

AddValidate 菜单添加验证规则

type DeleteValidate

type DeleteValidate struct {
	Id []uint `json:"id" validate:"required" label:"菜单ID"`
}

DeleteValidate 删除菜单验证规则

type FindValidate

type FindValidate struct {
	Id uint `json:"id" validate:"required,numeric" label:"菜单ID"`
}

FindValidate 查询菜单验证规则

type ModifyValidate

type ModifyValidate struct {
	Id     uint   `json:"id" validate:"required,numeric" label:"菜单ID"`
	Pid    uint   `json:"pid" validate:"omitempty,numeric" label:"父菜单ID"`
	Name   string `json:"name" validate:"required,max=20" label:"菜单名称"`
	Path   string `json:"path" validate:"required,max=100" label:"菜单路由"`
	Method string `json:"method" validate:"required,max=20" label:"请求方法"`
	Sort   uint   `json:"sort" validate:"omitempty,numeric" label:"排序"`
}

ModifyValidate 菜单添加验证规则

Jump to

Keyboard shortcuts

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