validate

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RuleAdminExistsId

func RuleAdminExistsId(ctx context.Context, in gvalid.RuleFuncInput) error

RuleAdminExistsId 检测管理员是否存在

func RuleAdminSetStatus

func RuleAdminSetStatus(ctx context.Context, in gvalid.RuleFuncInput) error

RuleAdminSetStatus 设置管理员状态

func RuleAlphaDash

func RuleAlphaDash(ctx context.Context, in gvalid.RuleFuncInput) error

RuleAlphaDash 匹配字母数字下划线和破折号

func RuleAlphaNum

func RuleAlphaNum(ctx context.Context, in gvalid.RuleFuncInput) error

RuleAlphaNum 字母和数字

func RuleArtCategoryDeleteById added in v1.0.2

func RuleArtCategoryDeleteById(ctx context.Context, in gvalid.RuleFuncInput) error

RuleArtCategoryDeleteById 根据文章类目ID验证文章类目删除

func RuleArtCategoryExistsById

func RuleArtCategoryExistsById(ctx context.Context, in gvalid.RuleFuncInput) error

RuleArtCategoryExistsById 通过文章分类ID检测文章分类是否存在

func RuleArticleExistsById

func RuleArticleExistsById(ctx context.Context, in gvalid.RuleFuncInput) error

RuleArticleExistsById 通过文章ID检测文章是否存在

func RuleAssocDepartExistsId

func RuleAssocDepartExistsId(ctx context.Context, in gvalid.RuleFuncInput) error

RuleAssocDepartExistsId 验证关联的部门ID是否存在

func RuleAssocRolesExistsId

func RuleAssocRolesExistsId(ctx context.Context, in gvalid.RuleFuncInput) error

RuleAssocRolesExistsId 验证关联的角色ID是否存在

func RuleAttachExistsUrl added in v1.0.2

func RuleAttachExistsUrl(ctx context.Context, in gvalid.RuleFuncInput) error

RuleAttachExistsUrl 通过URL地址检测附件是否存在

func RuleAttachIdExists

func RuleAttachIdExists(ctx context.Context, in gvalid.RuleFuncInput) error

RuleAttachIdExists 通过附件ID检测附件是否存在

func RuleChsAlphaNum

func RuleChsAlphaNum(ctx context.Context, in gvalid.RuleFuncInput) error

RuleChsAlphaNum 匹配汉字、字母和数字

func RuleChsDash

func RuleChsDash(ctx context.Context, in gvalid.RuleFuncInput) error

RuleChsDash 验证汉字、字母和数字,下划线_及破折号-

func RuleConfigGroupExistsById

func RuleConfigGroupExistsById(ctx context.Context, in gvalid.RuleFuncInput) error

RuleConfigGroupExistsById 通过配置组ID检测配置组是否存在

func RuleConfigGroupUniByGroupName

func RuleConfigGroupUniByGroupName(ctx context.Context, in gvalid.RuleFuncInput) error

RuleConfigGroupUniByGroupName 通过配置组名是否唯一

func RuleConfigSaveParams

func RuleConfigSaveParams(ctx context.Context, in gvalid.RuleFuncInput) error

RuleConfigSaveParams 保存系统配置参数规则

func RuleDates

func RuleDates(ctx context.Context, in gvalid.RuleFuncInput) error

RuleDates 验证时间格式组

func RuleDepartDelete

func RuleDepartDelete(ctx context.Context, in gvalid.RuleFuncInput) error

RuleDepartDelete 检测部门删除规则

func RuleDepartExistsById

func RuleDepartExistsById(ctx context.Context, in gvalid.RuleFuncInput) error

RuleDepartExistsById 检测部门是否存在

func RuleDepartmentDisable

func RuleDepartmentDisable(ctx context.Context, in gvalid.RuleFuncInput) error

RuleDepartmentDisable 检测部门是否被禁用

func RuleInviteAuthByToken added in v1.0.4

func RuleInviteAuthByToken(ctx context.Context, in gvalid.RuleFuncInput) error

RuleInviteAuthByToken 通过邀请Token授权邀请为管理员-登录中

func RuleInviteDeleteById added in v1.0.4

func RuleInviteDeleteById(ctx context.Context, in gvalid.RuleFuncInput) error

RuleInviteDeleteById 通过邀请ID验证是否可以删除

func RuleInviteExistsById added in v1.0.4

func RuleInviteExistsById(ctx context.Context, in gvalid.RuleFuncInput) error

RuleInviteExistsById 通过邀请ID检测邀请是否存在

func RuleInviteValidById added in v1.0.4

func RuleInviteValidById(ctx context.Context, in gvalid.RuleFuncInput) error

RuleInviteValidById 通过邀请ID验证是否属于有效(非已注册和已撤销)

func RuleInviteValidByToken added in v1.0.4

func RuleInviteValidByToken(ctx context.Context, in gvalid.RuleFuncInput) error

RuleInviteValidByToken 验证邀请Token是否有效

func RuleIsHex

func RuleIsHex(ctx context.Context, in gvalid.RuleFuncInput) error

RuleIsHex 匹配十六进制

func RuleIsSuperManage

func RuleIsSuperManage(ctx context.Context, in gvalid.RuleFuncInput) error

RuleIsSuperManage 验证是否超级管理员

func RulePermissionExistsId

func RulePermissionExistsId(ctx context.Context, in gvalid.RuleFuncInput) error

RulePermissionExistsId 检测权限是否存在

func RuleRegister

func RuleRegister()

RuleRegister 自定义注册规则

func RuleRegisterArticle

func RuleRegisterArticle()

RuleRegisterArticle 注册文章规则

func RuleRegisterAttachment

func RuleRegisterAttachment()

RuleRegisterAttachment 注册附件规则

func RuleRegisterCommon

func RuleRegisterCommon()

RuleRegisterCommon 注册公共规则

func RuleRegisterConfig

func RuleRegisterConfig()

RuleRegisterConfig 注册配置规则

func RuleRegisterRbac

func RuleRegisterRbac()

RuleRegisterRbac 注册RBAC

func RuleRegisterSmsTemplate

func RuleRegisterSmsTemplate()

RuleRegisterSmsTemplate 注册短信模板

func RuleRegisterSysMap

func RuleRegisterSysMap()

RuleRegisterSysMap 注册系统字典规则

func RuleRegisterUser

func RuleRegisterUser()

RuleRegisterUser 注册用户验证规则

func RuleRolesExistsId

func RuleRolesExistsId(ctx context.Context, in gvalid.RuleFuncInput) error

RuleRolesExistsId 角色是否存在

func RuleSmsCaptcha

func RuleSmsCaptcha(ctx context.Context, in gvalid.RuleFuncInput) error

RuleSmsCaptcha 短信验证码

func RuleSmsTemplateExistsById

func RuleSmsTemplateExistsById(ctx context.Context, in gvalid.RuleFuncInput) error

RuleSmsTemplateExistsById 通过短信模板ID检测模板是否存在

func RuleSysMapExistsById

func RuleSysMapExistsById(ctx context.Context, in gvalid.RuleFuncInput) error

RuleSysMapExistsById 通过字典ID检测字典值是否存在

func RuleSysMapExistsByName

func RuleSysMapExistsByName(ctx context.Context, in gvalid.RuleFuncInput) error

RuleSysMapExistsByName 通过字典名检测字典是否存在

func RuleSysMapValueExistsById

func RuleSysMapValueExistsById(ctx context.Context, in gvalid.RuleFuncInput) error

RuleSysMapValueExistsById 通过字典值ID检测字典值是否存在

func RuleUserExistsUid

func RuleUserExistsUid(ctx context.Context, in gvalid.RuleFuncInput) error

RuleUserExistsUid 通过用户ID检测用户是否存在

func RuleValidUserByUid

func RuleValidUserByUid(ctx context.Context, in gvalid.RuleFuncInput) error

RuleValidUserByUid 验证有效用户信息

Types

This section is empty.

Jump to

Keyboard shortcuts

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