filter

package
v0.0.0-...-dbf843a Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2025 License: GPL-3.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BooleanFilter

type BooleanFilter struct {
	Eq *bool `json:"eq,omitempty"`
}

func (*BooleanFilter) Include

func (f *BooleanFilter) Include(v bool) bool

type DateTimeFilter

type DateTimeFilter struct {
	Eq  *time.Time `json:"eq,omitempty"`
	Gt  *time.Time `json:"gt,omitempty"`
	Lt  *time.Time `json:"lt,omitempty"`
	Gte *time.Time `json:"gte,omitempty"`
	Lte *time.Time `json:"lte,omitempty"`
}

type Filter

type Filter[T any] interface {
	Include(v T) bool
}

type IntFilter

type IntFilter struct {
	Eq  *int64  `json:"eq,omitempty"`
	Gt  *int64  `json:"gt,omitempty"`
	Lt  *int64  `json:"lt,omitempty"`
	Gte *int64  `json:"gte,omitempty"`
	Lte *int64  `json:"lte,omitempty"`
	In  []int64 `json:"in,omitempty"`
}

func (*IntFilter) Include

func (f *IntFilter) Include(v int64) bool

type StringFilter

type StringFilter struct {
	Eq     *string  `json:"eq,omitempty"`
	Substr *string  `json:"substr,omitempty"`
	In     []string `json:"in,omitempty"`
}

func (*StringFilter) Include

func (f *StringFilter) Include(v string) bool

Jump to

Keyboard shortcuts

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