Documentation ¶
Index ¶
- Variables
- func DeleteItems(ds entity.DataSource, key string, value string) (err error)
- func GetDataSourceCol(host string, port string, username string, password string, authSource string, ...) (*mgo.Session, *mgo.Collection, error)
- func GetElasticSearchClient(ds entity.DataSource) (client *elastic.Client, err error)
- func GetItem(ds entity.DataSource, key string, value string) (item entity.Item, err error)
- func GetItemKeys(item entity.Item) (res []string)
- func GetItemSqlUpdateStr(item entity.Item) string
- func GetItemValues(item entity.Item) (res []string)
- func GetItemValuesWithQuote(item entity.Item) (res []string)
- func GetKafkaConnection(ds entity.DataSource) (conn *kafka.Conn, err error)
- func GetMongoCol(ds entity.DataSource) (*mgo.Session, *mgo.Collection, error)
- func GetSqlDatabase(ds entity.DataSource) *sqlx.DB
- func GetSqlDatabaseConnectionString(dataSourceType string, host string, port string, username string, ...) (connStr string, err error)
- func IndexItem(ds entity.DataSource, item entity.Item) (err error)
- func InsertItem(ds entity.DataSource, item entity.Item) (err error)
- func SendKafkaMsg(ds entity.DataSource, item entity.Item) (err error)
- func UpdateItem(ds entity.DataSource, item entity.Item, dedupField string) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Db *sqlx.DB
View Source
var Session *mgo.Session
Functions ¶
func DeleteItems ¶
func DeleteItems(ds entity.DataSource, key string, value string) (err error)
func GetDataSourceCol ¶
func GetElasticSearchClient ¶
func GetElasticSearchClient(ds entity.DataSource) (client *elastic.Client, err error)
func GetItemKeys ¶
func GetItemSqlUpdateStr ¶
func GetItemValues ¶
func GetItemValuesWithQuote ¶
func GetKafkaConnection ¶
func GetKafkaConnection(ds entity.DataSource) (conn *kafka.Conn, err error)
func GetMongoCol ¶
func GetMongoCol(ds entity.DataSource) (*mgo.Session, *mgo.Collection, error)
func GetSqlDatabase ¶
func GetSqlDatabase(ds entity.DataSource) *sqlx.DB
func InsertItem ¶
func InsertItem(ds entity.DataSource, item entity.Item) (err error)
func SendKafkaMsg ¶
func SendKafkaMsg(ds entity.DataSource, item entity.Item) (err error)
func UpdateItem ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.