utils

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCollection

func GetCollection() string

func GetDataSource

func GetDataSource() (ds entity.DataSource)

func GetDataSourceType

func GetDataSourceType() string

func GetDedupField

func GetDedupField() string

func GetDedupMethod

func GetDedupMethod() string

func GetIsDedup

func GetIsDedup() string

func GetTaskId

func GetTaskId() string

func IsExistItem

func IsExistItem(item entity.Item) (bool, error)

func IsExistItemMongo

func IsExistItemMongo(item entity.Item) (bool, error)

func NotifyTarget

func NotifyTarget(item entity.Item, files []string) error

func Post

func Post(url string, data interface{}, ret interface{}) error

func SaveFileFrom

func SaveFileFrom(name string, reader io.Reader, timer func()) error

func SaveItem

func SaveItem(item entity.Item) (err error)

func SaveItemElasticSearch

func SaveItemElasticSearch(item entity.Item) error

func SaveItemKafka

func SaveItemKafka(item entity.Item) error

func SaveItemMongo

func SaveItemMongo(item entity.Item) (err error)

func SaveItemSql

func SaveItemSql(item entity.Item) error

Types

type Response

type Response struct {
	Status  string `json:"status`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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