mongo

package
v4.0.6-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Collection = "index"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Codex

type Codex struct {
	QueryNsProvider *meta.NsProvider
	QueryConfigs    configx.Values
	// contains filtered or unexported fields
}

func (*Codex) BuildQuery

func (m *Codex) BuildQuery(query interface{}, offset, limit int32) (interface{}, interface{}, error)

BuildQuery builds a mongo filter plus an Aggregation Pipeline to be performed for computing facets

func (*Codex) FlushCustomFacets

func (m *Codex) FlushCustomFacets() []interface{}

func (*Codex) GetModel

func (m *Codex) GetModel(sc configx.Values) (interface{}, bool)

GetModel returns a mongodb.Model to be inserted in the db

func (*Codex) Marshal

func (m *Codex) Marshal(input interface{}) (interface{}, error)

Marshal does nothing here, input is already marshalled for indexing

func (*Codex) Unmarshal

func (m *Codex) Unmarshal(indexed interface{}) (interface{}, error)

Unmarshal gets a mongo.Cursor for Decoding

func (*Codex) UnmarshalFacet

func (m *Codex) UnmarshalFacet(data interface{}, facets chan interface{})

Jump to

Keyboard shortcuts

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