Documentation
¶
Index ¶
- Variables
- func WithFiber[T any](val T, c *fiber.Ctx, funcs ...ExFunc) (T, []error)
- func WithGin[T any](val T, c *gin.Context, funcs ...ExFunc) (T, []error)
- type Checker
- type CheckerBool
- type CheckerBoolPtr
- type CheckerFloat64
- type CheckerFloat64Ptr
- type CheckerInt64
- type CheckerInt64Ptr
- type CheckerSlice
- type CheckerSlicePtr
- type CheckerString
- type CheckerStringPtr
- type CheckerUint64
- type CheckerUint64Ptr
- type ExFunc
- type Validator
- type ValidatorField
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRequired = errors.New("必填") ErrNoZero = errors.New("不能为空") ErrEq = errors.New("必须等于") ErrNotEq = errors.New("不能等于") ErrIn = errors.New("仅允许") ErrNotIn = errors.New("不允许") ErrRegex = errors.New("内容不匹配") ErrParseData = errors.New("解析数据错误") ErrInvalidType = errors.New("无效的类型") )
View Source
var APP struct { Validator Validator ValidatorField ValidatorField }
Functions ¶
Types ¶
type CheckerBool ¶
type CheckerBool struct {
// contains filtered or unexported fields
}
func (CheckerBool) Check ¶
func (my CheckerBool) Check() error
type CheckerBoolPtr ¶
type CheckerBoolPtr struct {
// contains filtered or unexported fields
}
func (CheckerBoolPtr) Check ¶
func (my CheckerBoolPtr) Check() error
type CheckerFloat64 ¶
type CheckerFloat64 struct {
// contains filtered or unexported fields
}
func (CheckerFloat64) Check ¶
func (my CheckerFloat64) Check() error
type CheckerFloat64Ptr ¶
type CheckerFloat64Ptr struct {
// contains filtered or unexported fields
}
func (CheckerFloat64Ptr) Check ¶
func (my CheckerFloat64Ptr) Check() error
type CheckerInt64 ¶
type CheckerInt64 struct {
// contains filtered or unexported fields
}
func (CheckerInt64) Check ¶
func (my CheckerInt64) Check() error
type CheckerInt64Ptr ¶
type CheckerInt64Ptr struct {
// contains filtered or unexported fields
}
func (CheckerInt64Ptr) Check ¶
func (my CheckerInt64Ptr) Check() error
type CheckerSlice ¶
type CheckerSlice struct {
// contains filtered or unexported fields
}
func (CheckerSlice) Check ¶
func (my CheckerSlice) Check() error
type CheckerSlicePtr ¶
type CheckerSlicePtr struct {
// contains filtered or unexported fields
}
func (CheckerSlicePtr) Check ¶
func (my CheckerSlicePtr) Check() error
type CheckerString ¶
type CheckerString struct {
// contains filtered or unexported fields
}
func (CheckerString) Check ¶
func (my CheckerString) Check() error
type CheckerStringPtr ¶
type CheckerStringPtr struct {
// contains filtered or unexported fields
}
func (CheckerStringPtr) Check ¶
func (my CheckerStringPtr) Check() error
type CheckerUint64 ¶
type CheckerUint64 struct {
// contains filtered or unexported fields
}
func (CheckerUint64) Check ¶
func (my CheckerUint64) Check() error
type CheckerUint64Ptr ¶
type CheckerUint64Ptr struct {
// contains filtered or unexported fields
}
func (CheckerUint64Ptr) Check ¶
func (my CheckerUint64Ptr) Check() error
type Validator ¶
type Validator struct {
Errors []error
ValidatorFields []ValidatorField
// contains filtered or unexported fields
}
type ValidatorField ¶
type ValidatorField struct {
Error error
// contains filtered or unexported fields
}
func (ValidatorField) New ¶
func (ValidatorField) New(value reflect.Value, field reflect.StructField, vName string) ValidatorField
Source Files
¶
Click to show internal directories.
Click to hide internal directories.