validate/abstract/validate.go

18 lines
564 B
Go

// 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 // 结果转任意类型
}