fix #885 : remove dead dependencies for plugin (#891)

This commit is contained in:
Thibault "bui" Koechlin 2021-08-17 10:32:15 +02:00 committed by GitHub
parent 53f9837e6a
commit 25ed1c265d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 8 deletions

View file

@ -1,7 +1,6 @@
package parser
import (
"plugin"
"time"
"github.com/crowdsecurity/crowdsec/pkg/types"
@ -15,7 +14,6 @@ type InitFunc func(map[string]string) (interface{}, error)
type EnricherCtx struct {
Funcs map[string]EnrichFunc
Init InitFunc
Plugin *plugin.Plugin //pointer to the actual plugin
Name string
Path string //path to .so ?
RuntimeCtx interface{} //the internal context of plugin, given back over every call
@ -23,7 +21,6 @@ type EnricherCtx struct {
}
/* mimic plugin loading */
// TODO fix this shit with real plugin loading
func Loadplugin(path string) ([]EnricherCtx, error) {
var err error
@ -58,7 +55,6 @@ func GenDateParse(date string) (string, time.Time) {
"02-Jan-2006 15:04:05 europe/paris",
"01/02/2006 15:04:05",
"2006-01-02 15:04:05.999999999 -0700 MST",
//Jan 5 06:25:11
"Jan 2 15:04:05",
"Mon Jan 02 15:04:05.000000 2006",
"2006-01-02T15:04:05Z07:00",

View file

@ -10,7 +10,6 @@ import (
"github.com/oschwald/geoip2-golang"
"github.com/oschwald/maxminddb-golang"
//"github.com/crowdsecurity/crowdsec/pkg/parser"
)
type GeoIpEnricherCtx struct {
@ -19,9 +18,6 @@ type GeoIpEnricherCtx struct {
dbraw *maxminddb.Reader
}
/* All plugins must export a list of function pointers for exported symbols */
var ExportedFuncs = []string{"GeoIpASN", "GeoIpCity"}
func IpToRange(field string, p *types.Event, ctx interface{}) (map[string]string, error) {
var dummy interface{}
ret := make(map[string]string)