monstachemap

package
v3.26.6 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertMapForJSON added in v3.24.3

func ConvertMapForJSON(m map[string]interface{}) map[string]interface{}

func ConvertSliceForJSON added in v3.24.3

func ConvertSliceForJSON(a []interface{}) []interface{}

func EncodeBinData added in v3.24.4

func EncodeBinData(bi Binary) string

Types

type Binary added in v3.24.4

type Binary struct {
	bson.Binary
}

func (Binary) MarshalJSON added in v3.24.4

func (bi Binary) MarshalJSON() ([]byte, error)

type Decimal128 added in v3.25.0

type Decimal128 struct {
	bson.Decimal128
}

func (Decimal128) MarshalJSON added in v3.25.0

func (dec Decimal128) MarshalJSON() ([]byte, error)

type MapperPluginInput

type MapperPluginInput struct {
	Document          map[string]interface{} // the original document from MongoDB
	Database          string                 // the origin database in MongoDB
	Collection        string                 // the origin collection in MongoDB
	Namespace         string                 // the entire namespace for the original document
	Operation         string                 // "i" for a insert or "u" for update
	Session           *mgo.Session           // MongoDB session handle
	UpdateDescription map[string]interface{} // map describing changes to the document
}

MapperPluginInput is the input to the Map function

type MapperPluginOutput

type MapperPluginOutput struct {
	Document        map[string]interface{} // an updated document to index into Elasticsearch
	Index           string                 // the name of the index to use
	Type            string                 // the document type
	Routing         string                 // the routing value to use
	Drop            bool                   // set to true to indicate that the document should not be indexed but removed
	Passthrough     bool                   // set to true to indicate the original document should be indexed unchanged
	Parent          string                 // the parent id to use
	Version         int64                  // the version of the document
	VersionType     string                 // the version type of the document (internal, external, external_gte)
	TTL             string                 // the expiration time
	Pipeline        string                 // the pipeline to index with
	RetryOnConflict int                    // how many times to retry updates before failing
	Skip            bool                   // set to true to indicate the the document should be ignored
	ID              string                 // override the _id of the indexed document; not recommended
}

MapperPluginOutput is the output of the Map function

type ProcessPluginInput added in v3.17.0

type ProcessPluginInput struct {
	MapperPluginInput
	ElasticClient        *elastic.Client
	ElasticBulkProcessor *elastic.BulkProcessor
	Timestamp            bson.MongoTimestamp
}

ProcessPluginInput is the input to the Process function

type Time added in v3.24.3

type Time struct {
	time.Time
}

func (Time) MarshalJSON added in v3.24.3

func (t Time) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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