Documentation ¶
Overview ¶
Package filter GENERATED BY gengo:enum DON'T EDIT THIS FILE
Package filter GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE
Index ¶
- Variables
- func First[A Arg, O any](args []A, where func(a Arg) (O, bool)) (O, bool)
- func MapFilter[T comparable, A Arg, O any](args []A, where func(a *Filter[T]) (O, bool)) []O
- func MapWhere[A Arg, O any](args []A, where func(a Arg) (O, bool)) []O
- type Arg
- type Composed
- type ErrInvalidFilter
- type ErrInvalidFilterOp
- type ErrUnsupportedQLField
- type Filter
- func And[T comparable](filters ...TypedRule[T]) *Filter[T]
- func Contains[T comparable](v T) *Filter[T]
- func Eq[T comparable](v T) *Filter[T]
- func Gt[T comparable](v T) *Filter[T]
- func Gte[T comparable](v T) *Filter[T]
- func In[T comparable](values []T) *Filter[T]
- func Intersection[T comparable](filters ...TypedRule[T]) *Filter[T]
- func Lt[T comparable](v T) *Filter[T]
- func Lte[T comparable](v T) *Filter[T]
- func Neq[T comparable](v T) *Filter[T]
- func Notin[T comparable](values []T) *Filter[T]
- func Or[T comparable](filters ...TypedRule[T]) *Filter[T]
- func Prefix[T comparable](v T) *Filter[T]
- func Suffix[T comparable](v T) *Filter[T]
- func (v Filter[T]) Args() []Arg
- func (f Filter[T]) IsZero() bool
- func (f Filter[T]) MarshalDirective() ([]byte, error)
- func (f Filter[T]) MarshalText() ([]byte, error)
- func (v Filter[T]) New() *T
- func (Filter[T]) OneOf() []any
- func (f Filter[T]) Op() Op
- func (f Filter[T]) String() string
- func (f *Filter[T]) UnmarshalDirective(dec *directive.Decoder) error
- func (f *Filter[T]) UnmarshalText(data []byte) error
- func (f Filter[T]) WhereOf(name string) Rule
- type Op
- func (Op) EnumValues() []any
- func (v Op) Label() string
- func (v Op) MarshalText() ([]byte, error)
- func (Op) RuntimeDoc(names ...string) ([]string, bool)
- func (v *Op) Scan(src any) error
- func (v Op) String() string
- func (v *Op) UnmarshalText(data []byte) error
- func (v Op) Value() (driver.Value, error)
- type Rule
- type RuleExpr
- type TypedRule
- type Value
Constants ¶
This section is empty.
Variables ¶
View Source
var InvalidOp = pkgerrors.New("invalid Op")
Functions ¶
Types ¶
type Arg ¶
type Arg interface { encoding.TextMarshaler }
type Composed ¶
type Composed struct { Filters []any // contains filtered or unexported fields }
func (Composed) MarshalText ¶
func (*Composed) UnmarshalText ¶
type ErrInvalidFilter ¶
type ErrInvalidFilter struct { Filter string // contains filtered or unexported fields }
func (*ErrInvalidFilter) Error ¶
func (e *ErrInvalidFilter) Error() string
func (ErrInvalidFilter) RuntimeDoc ¶
func (v ErrInvalidFilter) RuntimeDoc(names ...string) ([]string, bool)
func (ErrInvalidFilter) StatusCode ¶
func (ErrInvalidFilter) StatusCode() int
type ErrInvalidFilterOp ¶
type ErrInvalidFilterOp struct { Op string // contains filtered or unexported fields }
func (*ErrInvalidFilterOp) Error ¶
func (e *ErrInvalidFilterOp) Error() string
func (ErrInvalidFilterOp) RuntimeDoc ¶
func (v ErrInvalidFilterOp) RuntimeDoc(names ...string) ([]string, bool)
func (ErrInvalidFilterOp) StatusCode ¶
func (ErrInvalidFilterOp) StatusCode() int
type ErrUnsupportedQLField ¶
type ErrUnsupportedQLField struct { FieldName string // contains filtered or unexported fields }
func (*ErrUnsupportedQLField) Error ¶
func (e *ErrUnsupportedQLField) Error() string
func (ErrUnsupportedQLField) RuntimeDoc ¶
func (v ErrUnsupportedQLField) RuntimeDoc(names ...string) ([]string, bool)
func (ErrUnsupportedQLField) StatusCode ¶
func (ErrUnsupportedQLField) StatusCode() int
type Filter ¶
type Filter[T comparable] struct { // contains filtered or unexported fields }
func And ¶
func And[T comparable](filters ...TypedRule[T]) *Filter[T]
func Intersection ¶
func Intersection[T comparable](filters ...TypedRule[T]) *Filter[T]
func Or ¶
func Or[T comparable](filters ...TypedRule[T]) *Filter[T]
func (Filter[T]) MarshalDirective ¶
func (Filter[T]) MarshalText ¶
func (*Filter[T]) UnmarshalDirective ¶
func (*Filter[T]) UnmarshalText ¶
type Op ¶
type Op uint8
+gengo:enum
func ParseOpFromString ¶
func ParseOpLabelString ¶
func (Op) EnumValues ¶
func (Op) MarshalText ¶
func (*Op) UnmarshalText ¶
type TypedRule ¶
type TypedRule[T comparable] interface { Rule New() *T }
type Value ¶
type Value[T comparable] interface { Arg Value() T }
func Lit ¶
func Lit[T comparable](v T) Value[T]
Source Files ¶
Click to show internal directories.
Click to hide internal directories.