Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dummy ¶
type Dummy struct {
// contains filtered or unexported fields
}
func NewDummy ¶
func NewDummy(config *DummyConfig) *Dummy
func (*Dummy) SetConfig ¶
func (o *Dummy) SetConfig(config *DummyConfig)
type DummyConfig ¶
type DummyConfig struct {
Print bool
}
type Elasticsearch ¶
type Elasticsearch struct {
HTTP
// contains filtered or unexported fields
}
func NewElasticsearch ¶
func NewElasticsearch(config *ElasticsearchConfig) *Elasticsearch
func (*Elasticsearch) TransformConfig ¶
func (o *Elasticsearch) TransformConfig(config *ElasticsearchConfig) *HTTPConfig
type ElasticsearchConfig ¶
type ElasticsearchConfig struct {
Host string `default:"localhost" description:"elastic host port "`
Port int `default:"9200" description:"elastic search port "`
Index string `description:"index name"`
Type string `description:"index type"`
Timeout int `default:"1" description:"contection timeout"`
UidField string `description:"copied as id into into _uid, which consists of 'type#id'"`
}
type HTTP ¶
type HTTP struct {
// contains filtered or unexported fields
}
func NewHTTP ¶
func NewHTTP(config *HTTPConfig) *HTTP
func (*HTTP) SetConfig ¶
func (o *HTTP) SetConfig(config *HTTPConfig)
type HTTPConfig ¶
type HTTPConfig struct {
Url string `description:"url of the request"`
Format string `default:"form" description:"format of the request body (json or form)"`
ContentType string `default:"application/x-www-form-urlencoded" description:"Content-Type header"`
Method string `default:"POST" description:"request method"`
Timeout int `default:"1" description:"contection timeout"`
Header []string `description:"additional headers, format: header,value"`
}
type Mongo ¶
type Mongo struct {
// contains filtered or unexported fields
}
func NewMongo ¶
func NewMongo(config *MongoConfig) *Mongo
func (*Mongo) SetConfig ¶
func (o *Mongo) SetConfig(config *MongoConfig)
type MongoConfig ¶
type MongoConfig struct {
Url string `description:"server urls following the format from: http://godoc.org/labix.org/v2/mgo#Dial"`
Database string `description:"database name"`
Collection string `description:"collection name"`
Safe bool `description:"sets the session safe mode: http://godoc.org/labix.org/v2/mgo#Session.SetSafe"`
KillOnError bool `description:"if true the server will die on any error, excep duplicate key error."`
}
Click to show internal directories.
Click to hide internal directories.