filter

package
v0.0.0-...-d2a8444 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	Params map[string]Param
}

func NewFilter

func NewFilter() Filter

func (*Filter) Add

func (f *Filter) Add(
	field string,
	Op Operation,
	value interface{},
)

func (*Filter) Match

func (f *Filter) Match(
	candidate map[string]interface{},
) bool

func (*Filter) ToBSON

func (f *Filter) ToBSON() bson.M

type Operation

type Operation int64
const (
	Eq Operation = iota
	In
	NotEq
)

type Param

type Param struct {
	Op    Operation
	Value interface{}
}

Jump to

Keyboard shortcuts

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