rule

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	// contains filtered or unexported fields
}

func NewBase

func NewBase(name string, err error) *Base

func (*Base) Err

func (b *Base) Err() error

func (*Base) Name

func (b *Base) Name() string

type BaseType

type BaseType interface {
	CompareInterface | ~string
}

type Chinese

type Chinese struct {
	*Base
}

func NewChinese

func NewChinese() *Chinese

func (*Chinese) Valid

func (c *Chinese) Valid(key string, val any, params ...any) bool

type CompareInterface

type CompareInterface interface {
	~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~float32 | ~float64 | ~int | ~int8 | ~int16 | ~int32 | ~int64
}

type Domain

type Domain struct {
	*Base
}

func NewDomain

func NewDomain() *Domain

func (*Domain) Valid

func (e *Domain) Valid(key string, val any, params ...any) bool

type Email

type Email struct {
	*Base
}

func NewEmail

func NewEmail() *Email

func (*Email) Valid

func (e *Email) Valid(key string, val any, params ...any) bool

type Eq

type Eq struct {
	*Base
}

func NewEq

func NewEq() *Eq

func (*Eq) Valid

func (g *Eq) Valid(key string, val any, params ...any) bool

type EqFeild

type EqFeild struct {
	*Base
}

func NewEqFeild

func NewEqFeild() *EqFeild

func (*EqFeild) Valid

func (g *EqFeild) Valid(key string, val any, params ...any) bool

type Ge

type Ge struct {
	*Base
}

func NewGe

func NewGe() *Ge

func (*Ge) Valid

func (g *Ge) Valid(key string, val any, params ...any) bool

type Gt

type Gt struct {
	*Base
}

func NewGt

func NewGt() *Gt

func (*Gt) Valid

func (g *Gt) Valid(key string, val any, params ...any) bool

type Jwt

type Jwt struct {
	*Base
}

func NewJwt

func NewJwt() *Jwt

func (*Jwt) Valid

func (j *Jwt) Valid(key string, val any, params ...any) bool

type Le

type Le struct {
	*Base
}

func NewLe

func NewLe() *Le

func (*Le) Valid

func (g *Le) Valid(key string, val any, params ...any) bool

type Len

type Len struct {
	*Base
}

func NewLen

func NewLen() *Len

func (*Len) Valid

func (g *Len) Valid(key string, val any, params ...any) bool

type Lt

type Lt struct {
	*Base
}

func NewLt

func NewLt() *Lt

func (*Lt) Valid

func (g *Lt) Valid(key string, val any, params ...any) bool

type MaxLen

type MaxLen struct {
	*Base
}

func NewMaxLen

func NewMaxLen() *MaxLen

func (*MaxLen) Valid

func (m *MaxLen) Valid(key string, val any, params ...any) bool

type MinLen

type MinLen struct {
	*Base
}

func NewMinLen

func NewMinLen() *MinLen

func (*MinLen) Valid

func (m *MinLen) Valid(key string, val any, params ...any) bool

type ParamInterface

type ParamInterface interface {
	ValidParams() map[string]any
}

type Regx

type Regx struct {
	*Base
}

func NewRegx

func NewRegx() *Regx

func (*Regx) Valid

func (r *Regx) Valid(key string, val any, params ...any) bool

type Rule

type Rule struct {
	Func   string
	Params []any
}

func NewRule

func NewRule(f string, params []any) *Rule

type RuleInterface

type RuleInterface interface {
	Name() string
	Valid(key string, val any, params ...any) bool
	Err() error
}

type Url

type Url struct {
	*Base
}

func NewUrl

func NewUrl() *Url

func (*Url) Valid

func (u *Url) Valid(key string, val any, params ...any) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL