enrichment

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnrichDevice

func EnrichDevice(ctx context.Context, d EnrichDeviceRequest) (model.Device, error)

func PortScannerFilter

func PortScannerFilter(cfg *PortScanConfig) model.DeviceFilter

func SetFlags added in v0.2.0

func SetFlags(fs *pflag.FlagSet, cfg *Config)

Types

type Config added in v0.2.0

type Config struct {
	Enabled    bool
	MaxWorkers int
	Dns        *DnsConfig
	Oui        *OuiConfig
	PortScan   *PortScanConfig
	Snmp       *SnmpConfig
}

type DnsConfig added in v0.2.0

type DnsConfig struct {
	Enabled bool
}

type EnrichAllDevicesEvent

type EnrichAllDevicesEvent EnrichmentFields

func (EnrichAllDevicesEvent) String

func (e EnrichAllDevicesEvent) String() string

type EnrichDeviceRequest

type EnrichDeviceRequest struct {
	Fields EnrichmentFields
	Device model.Device
}

func (EnrichDeviceRequest) String

func (e EnrichDeviceRequest) String() string

type EnrichmentFields

type EnrichmentFields struct {
	PerformDNSLookup bool
	PerformOUILookup bool
	PerformPortScan  bool
	PerformSNMPScan  bool
	Cfg              *Config
}

TODO: This should probably go away and just use the EnrichmentConfig

func DefaultEnrichmentFields

func DefaultEnrichmentFields(cfg *Config) EnrichmentFields

func (EnrichmentFields) String

func (e EnrichmentFields) String() string

type OuiConfig added in v0.2.0

type OuiConfig struct {
	Enabled bool
}

type PortScanConfig added in v0.2.0

type PortScanConfig struct {
	Enabled             bool
	Timeout             time.Duration
	MaxWorkers          int
	DefaultScanInterval time.Duration
	ServerScanInterval  time.Duration
	PortList            string
}

type SnmpConfig added in v0.2.0

type SnmpConfig struct {
	Enabled   bool
	Timeout   time.Duration
	Community []string
	Ports     []int
}

type Worker added in v0.2.0

func NewWorker added in v0.2.0

func NewWorker() *Worker

func (*Worker) Close added in v0.2.0

func (w *Worker) Close()

func (*Worker) Run added in v0.2.0

func (w *Worker) Run(ctx context.Context, max int)

Jump to

Keyboard shortcuts

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