Documentation
¶
Index ¶
- Constants
- func AnyEqual[T comparable](arr []T, item T) (bool, error)
- func AnyFind[T comparable](arr []T, item T) bool
- func AnyGreaterThan[T comparable](arr []T, item T) (bool, error)
- func AnyLessThan[T comparable](arr []T, item T) (bool, error)
- func GetDataField(data any, ctype string) (string, any)
- func GetFnMaps(item any, fs map[string]RulePool) map[string]interface{}
- type Filter
- type FilterFunc
- type GValuate
- type Rule
- type RulePool
- type Stack
Constants ¶
View Source
const ( AND = 0 OR = 1 )
View Source
const ( IN = iota NIN // 和in相反 GT LT EQ NE LE GE )
Variables ¶
This section is empty.
Functions ¶
func AnyEqual ¶
func AnyEqual[T comparable](arr []T, item T) (bool, error)
func AnyFind ¶
func AnyFind[T comparable](arr []T, item T) bool
func AnyGreaterThan ¶
func AnyGreaterThan[T comparable](arr []T, item T) (bool, error)
func AnyLessThan ¶
func AnyLessThan[T comparable](arr []T, item T) (bool, error)
func GetDataField ¶
GetDataField 通过反射获取结构体字段名称, data类型必须是struct
Types ¶
type Filter ¶
type Filter struct {
Rule Rule `json:"rules,omitempty"`
// contains filtered or unexported fields
}
func (*Filter) ExecWithSlice ¶ added in v1.0.4
type FilterFunc ¶ added in v1.0.1
type GValuate ¶
type GValuate struct {
Name string
Valuate *govaluate.EvaluableExpression
// contains filtered or unexported fields
}
func NewGValuate ¶
Click to show internal directories.
Click to hide internal directories.