v0.1
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// HTTPHandler HTTP处理器接口
|
||||
@@ -95,6 +96,11 @@ type RequestValidator interface {
|
||||
|
||||
// 绑定和验证
|
||||
BindAndValidate(c *gin.Context, dto interface{}) error
|
||||
|
||||
// 业务逻辑验证方法
|
||||
GetValidator() *validator.Validate
|
||||
ValidateValue(field interface{}, tag string) error
|
||||
ValidateStruct(s interface{}) error
|
||||
}
|
||||
|
||||
// PaginationMeta 分页元数据
|
||||
|
||||
Reference in New Issue
Block a user