es

package
v0.0.0-...-2247000 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Conn *elastigo.Conn
	Conf ElasticConf
}

elasticsearch client stuct

func Connect

func Connect(conf ElasticConf) *Client

create connection

func (*Client) Execute

func (c *Client) Execute(esdata Elasticsearch)

insert, update or delete index

type ElasticConf

type ElasticConf struct {
	Server string
	Port   string
	User   string
	Pass   string
	Index  string
	Type   string
}

elasticsearch config struct

type Elasticsearch

type Elasticsearch struct {
	Id        string
	Data      map[string]interface{}
	Operation string
}

struct to store data before sent request to elasticserach

func Mapping

func Mapping(oplog interface{}) (object Elasticsearch)

map a struct to the model defined in mapping.json

type Node

type Node struct {
	MongoField string `json:"mongo"`
	Type       string `json:"type"`
	EsField    string `json:"es"`
	ConvertIso string `json:"convert_iso"`
}

Mapping struct

Jump to

Keyboard shortcuts

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