validate

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckGenCoinsBillParam added in v1.0.5

func CheckGenCoinsBillParam(in model.PGCoinRechargeBillInput) error

CheckGenCoinsBillParam 验证生成盘古币账单参数

func CheckUserAvailableCoins added in v1.0.5

func CheckUserAvailableCoins(in model.CheckAvailableCoins) error

CheckUserAvailableCoins 消费时验证账户可用盘古币

func CheckVideoBillRefund added in v1.0.5

func CheckVideoBillRefund(ctx context.Context, in model.RefundVideoBillInput) (detail *model.VideoBillRefundItem, err error)

CheckVideoBillRefund 验证视频退款账单退款信息

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

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

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 RuleBuyExistsById added in v1.0.6

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

RuleBuyExistsById 验证购买信息是否存在

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 RuleEmailTplExistsById added in v1.0.15

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

RuleEmailTplExistsById 验证邮件模板是否存在

func RuleEpisodesExistsById added in v1.0.2

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

RuleEpisodesExistsById 通过剧集ID检测视频剧集是否存在

func RuleInviteAuthByToken

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

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

func RuleInviteDeleteById

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

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

func RuleInviteExistsById

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

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

func RuleInviteValidById

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

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

func RuleInviteValidByToken

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

RuleInviteValidByToken 验证邀请Token是否有效

func RuleIsBuyEpisodesIdSet added in v1.0.5

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

RuleIsBuyEpisodesIdSet 验证视频剧集是否已购买

func RuleIsEmail added in v1.0.15

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

RuleIsEmail 匹配邮件格式

func RuleIsHex

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

RuleIsHex 匹配十六进制

func RuleIsJson added in v1.0.2

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

RuleIsJson 验证JSON格式

func RuleIsNo added in v1.0.8

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

RuleIsNo 验证系统编号格式

func RuleIsSuperManage

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

RuleIsSuperManage 验证是否超级管理员

func RuleIsTopVideoCategory added in v1.0.11

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

RuleIsTopVideoCategory 验证类目是否符合推荐要求

func RulePGCoinBillExistsById added in v1.0.5

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

RulePGCoinBillExistsById 检测盘古币账单是否存在

func RulePGCoinBillValidById added in v1.0.5

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

RulePGCoinBillValidById 校验盘古币是否有效适用于(设置效期、交易盘古币)

func RulePGCoinOrderExistsById added in v1.0.7

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

RulePGCoinOrderExistsById 验证盘古币订单是否存在

func RulePGCoinUserOrderExistsById added in v1.0.9

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

RulePGCoinUserOrderExistsById 检测用户订单是否存在

func RulePGCoinUserValid added in v1.0.8

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

RulePGCoinUserValid 验证用户充值订单有效性

func RulePermissionExistsId

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

RulePermissionExistsId 检测权限是否存在

func RulePersonalExistsById added in v1.0.2

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

RulePersonalExistsById 通过视频常用人员ID检测参演信息是否存在

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 RuleRegisterEmail added in v1.0.15

func RuleRegisterEmail()

RuleRegisterEmail 注册邮件规则

func RuleRegisterPGCoin added in v1.0.5

func RuleRegisterPGCoin()

RuleRegisterPGCoin 注册盘古币规则

func RuleRegisterRbac

func RuleRegisterRbac()

RuleRegisterRbac 注册RBAC

func RuleRegisterSmsTemplate

func RuleRegisterSmsTemplate()

RuleRegisterSmsTemplate 注册短信模板

func RuleRegisterSysMap

func RuleRegisterSysMap()

RuleRegisterSysMap 注册系统字典规则

func RuleRegisterUser

func RuleRegisterUser()

RuleRegisterUser 注册用户验证规则

func RuleRegisterVideo added in v1.0.1

func RuleRegisterVideo()

RuleRegisterVideo 视频注册规则

func RuleResolutionExistsById added in v1.0.2

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

RuleResolutionExistsById 通过清晰度ID检测视频清晰度是否存在

func RuleRolesExistsId

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

RuleRolesExistsId 角色是否存在

func RuleSearchAt added in v1.0.6

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

RuleSearchAt 验证搜索查询时间

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 RuleStrings added in v1.0.2

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

RuleStrings 验证数组字符串

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 验证有效用户信息

func RuleValidVideoById added in v1.0.1

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

RuleValidVideoById 验证有效视频信息

func RuleVideoBillExistsById added in v1.0.6

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

RuleVideoBillExistsById 视频购买账单是否存在

func RuleVideoCategoryDelete added in v1.0.1

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

RuleVideoCategoryDelete 检测视频类目删除规则

func RuleVideoCategoryExistsById added in v1.0.2

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

RuleVideoCategoryExistsById 检测视频类目是否存在

func RuleVideoDelete added in v1.0.1

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

RuleVideoDelete 视频删除验证

func RuleVideoExistsById added in v1.0.1

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

RuleVideoExistsById 通过视频ID验证视频是否存在

Types

This section is empty.

Jump to

Keyboard shortcuts

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