enrichment

package
v0.0.0-...-49098ed Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enricher

type Enricher interface {
	Enrich(flow *flowstore.Flow)
	GetName() string
}

type EnrichmentManager

type EnrichmentManager struct {
	InputChannel  chan *flowstore.Flow
	OutputChannel chan *flowstore.Flow
	StopChannel   chan bool
	Stopped       chan bool
	Enrichers     []Enricher
}

func NewEnrichmentManager

func NewEnrichmentManager(input chan *flowstore.Flow, output chan *flowstore.Flow, enrichers []Enricher) EnrichmentManager

func (*EnrichmentManager) Start

func (em *EnrichmentManager) Start()

func (*EnrichmentManager) Stop

func (em *EnrichmentManager) Stop()

type GeoIPEnricher

type GeoIPEnricher struct {
	Language string
	// contains filtered or unexported fields
}

func (*GeoIPEnricher) Enrich

func (e *GeoIPEnricher) Enrich(flow *flowstore.Flow)

func (*GeoIPEnricher) FlattenCity

func (e *GeoIPEnricher) FlattenCity(city *geoip2.City) GeoIPMetadata

func (*GeoIPEnricher) GetName

func (e *GeoIPEnricher) GetName() string

func (*GeoIPEnricher) Initialize

func (e *GeoIPEnricher) Initialize()

type GeoIPMetadata

type GeoIPMetadata struct {
	CityName            string        `json:",omitempty"`
	ContinentCode       string        `json:",omitempty"`
	ContinentName       string        `json:",omitempty"`
	CountryIsoCode      string        `json:",omitempty"`
	CountryName         string        `json:",omitempty"`
	CountryInEU         bool          `json:",omitempty"`
	Latitude            float64       `json:",omitempty"`
	Longitude           float64       `json:",omitempty"`
	MetroCode           uint          `json:",omitempty"`
	TimeZone            string        `json:",omitempty"`
	PostalCode          string        `json:",omitempty"`
	Subdivisions        []Subdivision `json:",omitempty"`
	IsAnonymousProxy    bool          `json:",omitempty"`
	IsSatelliteProvider bool          `json:",omitempty"`
}

type Subdivision

type Subdivision struct {
	IsoCode string
	Name    string
}

Jump to

Keyboard shortcuts

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