Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Filter ¶
type Filter struct {
Operator string `json:"operator,omitempty"`
Value interface{} `json:"value,omitempty"`
}
type Filters ¶
func FiltersFromFlatMap ¶
FiltersFromFlatMap builds a *Filters from a map[string]interface{} whose structure mirrors the JSON form of Filters:
{
"and": { "name": [{"operator":"like","value":"foo"}] },
"or": { "source": [{"operator":"equal","value":"bar"}] }
}
Keys inside "and"/"or" are json tag names; the function resolves each to its full dotted BSON path using the target struct. Unknown keys are kept as-is.
type Operator ¶
type Operator int
func StringToOperator ¶
func (Operator) ToMongoOperator ¶
func (Operator) ToValueOperator ¶
Click to show internal directories.
Click to hide internal directories.