validate 增加接口定义
This commit is contained in:
parent
b3b4cc8e57
commit
db381c7df5
17
abstract/validate.go
Normal file
17
abstract/validate.go
Normal file
@ -0,0 +1,17 @@
|
||||
// Package abstract ...
|
||||
//
|
||||
// Description : abstract ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2025-04-28 14:48
|
||||
package abstract
|
||||
|
||||
// IValidate 验证接口约束
|
||||
type IValidate interface {
|
||||
Run() error // 执行验证
|
||||
Result() any // 获取验证结果
|
||||
Marshal(marshalType string) ([]byte, error) // 结果序列化
|
||||
Map(marshalType string) (map[string]any, error) // 结果转map
|
||||
Transform(targetType string, receiver any) error // 结果转任意类型
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user