diff --git a/abstract/validate.go b/abstract/validate.go new file mode 100644 index 0000000..d559a42 --- /dev/null +++ b/abstract/validate.go @@ -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 // 结果转任意类型 +}