From 6cc0ec1ee042add54d60d293ac75209bf9814154 Mon Sep 17 00:00:00 2001 From: insanity Date: Wed, 30 Nov 2016 15:37:34 +0900 Subject: [PATCH] port event porttype --- events/event_port.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/events/event_port.go b/events/event_port.go index 6d470f1..d91a4e8 100644 --- a/events/event_port.go +++ b/events/event_port.go @@ -7,16 +7,18 @@ type PortStartEvent struct { Zone int64 Host int64 PortCount uint16 + Type string } func (i PortStartEvent) GetUrl() string { return PORT_START } -func NewPortStartEvent(zone int64, host int64, portCount uint16) *PortStartEvent { +func NewPortStartEvent(zone int64, host int64, portCount uint16, t string) *PortStartEvent { return &PortStartEvent{ Zone: zone, PortCount: portCount, + Type: t, } } @@ -46,16 +48,18 @@ type PortEndEvent struct { Zone int64 Host int64 Histories []*types.PortScanHistory + Type string } func (i PortEndEvent) GetUrl() string { return PORT_START } -func NewPortEndEvent(zone int64, host int64, history []*types.PortScanHistory) *PortEndEvent { +func NewPortEndEvent(zone int64, host int64, history []*types.PortScanHistory, t string) *PortEndEvent { return &PortEndEvent{ Zone: zone, Host: host, Histories: history, + Type: t, } }