Versions in this module Expand all Collapse all v0 v0.2.0 Sep 4, 2019 Changes in this version + type And []Expression + func (e *And) Prepare(validator schema.Validator) error + func (e And) Match(payload map[string]interface{}) bool + func (e And) String() string + type ElemMatch struct + Exps []Expression + Field string + func (e *ElemMatch) Prepare(validator schema.Validator) error + func (e ElemMatch) Match(payload map[string]interface{}) bool + func (e ElemMatch) String() string + type Equal struct + Field string + Value Value + func (e *Equal) Prepare(validator schema.Validator) error + func (e Equal) Match(payload map[string]interface{}) bool + func (e Equal) String() string + type Exist struct + Field string + func (e *Exist) Prepare(validator schema.Validator) error + func (e Exist) Match(payload map[string]interface{}) bool + func (e Exist) String() string + type Expression interface + Match func(payload map[string]interface{}) bool + Prepare func(validator schema.Validator) error + String func() string + type GreaterOrEqual struct + Field string + Value Value + func (e *GreaterOrEqual) Prepare(validator schema.Validator) error + func (e GreaterOrEqual) Match(payload map[string]interface{}) bool + func (e GreaterOrEqual) String() string + type GreaterThan struct + Field string + Value Value + func (e *GreaterThan) Prepare(validator schema.Validator) error + func (e GreaterThan) Match(payload map[string]interface{}) bool + func (e GreaterThan) String() string + type In struct + Field string + Values []Value + func (e *In) Prepare(validator schema.Validator) error + func (e In) Match(payload map[string]interface{}) bool + func (e In) String() string + type LowerOrEqual struct + Field string + Value Value + func (e *LowerOrEqual) Prepare(validator schema.Validator) error + func (e LowerOrEqual) Match(payload map[string]interface{}) bool + func (e LowerOrEqual) String() string + type LowerThan struct + Field string + Value Value + func (e *LowerThan) Prepare(validator schema.Validator) error + func (e LowerThan) Match(payload map[string]interface{}) bool + func (e LowerThan) String() string + type NotEqual struct + Field string + Value Value + func (e *NotEqual) Prepare(validator schema.Validator) error + func (e NotEqual) Match(payload map[string]interface{}) bool + func (e NotEqual) String() string + type NotExist struct + Field string + func (e *NotExist) Prepare(validator schema.Validator) error + func (e NotExist) Match(payload map[string]interface{}) bool + func (e NotExist) String() string + type NotIn struct + Field string + Values []Value + func (e *NotIn) Prepare(validator schema.Validator) error + func (e NotIn) Match(payload map[string]interface{}) bool + func (e NotIn) String() string + type Or []Expression + func (e *Or) Prepare(validator schema.Validator) error + func (e Or) Match(payload map[string]interface{}) bool + func (e Or) String() string + type Predicate []Expression + func MustParsePredicate(query string) Predicate + func ParsePredicate(predicate string) (Predicate, error) + func (e Predicate) Match(payload map[string]interface{}) bool + func (e Predicate) Prepare(validator schema.Validator) error + func (e Predicate) String() string + type Projection []ProjectionField + func MustParseProjection(projection string) Projection + func ParseProjection(projection string) (Projection, error) + func (p Projection) Eval(ctx context.Context, payload map[string]interface{}, rsc Resource) (map[string]interface{}, error) + func (p Projection) String() string + func (p Projection) Validate(fg schema.FieldGetter) error + type ProjectionField struct + Alias string + Children Projection + Name string + Params map[string]interface{} + func (pf ProjectionField) String() string + func (pf ProjectionField) Validate(fg schema.FieldGetter) error + type Query struct + Predicate Predicate + Projection Projection + Sort Sort + Window *Window + func New(projection, predicate, sort string, window *Window) (*Query, error) + func (q *Query) Validate(validator schema.Validator) error + type Regex struct + Field string + Value *regexp.Regexp + func (e *Regex) Prepare(validator schema.Validator) error + func (e Regex) Match(payload map[string]interface{}) bool + func (e Regex) String() string + type Resource interface + Find func(ctx context.Context, query *Query) ([]map[string]interface{}, error) + MultiGet func(ctx context.Context, ids []interface{}) ([]map[string]interface{}, error) + Path func() string + SubResource func(ctx context.Context, path string) (Resource, error) + Validator func() schema.Validator + type Sort []SortField + func MustParseSort(sort string) Sort + func ParseSort(sort string) (Sort, error) + func (s Sort) Validate(validator schema.Validator) error + type SortField struct + Name string + Reversed bool + type Value = interface + type Window struct + Limit int + Offset int + func Page(page, perPage, skip int) *Window