port event porttype

This commit is contained in:
insanity 2016-11-30 15:37:34 +09:00
parent 0f0ca89ac4
commit 6cc0ec1ee0

View File

@ -7,16 +7,18 @@ type PortStartEvent struct {
Zone int64 Zone int64
Host int64 Host int64
PortCount uint16 PortCount uint16
Type string
} }
func (i PortStartEvent) GetUrl() string { func (i PortStartEvent) GetUrl() string {
return PORT_START 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{ return &PortStartEvent{
Zone: zone, Zone: zone,
PortCount: portCount, PortCount: portCount,
Type: t,
} }
} }
@ -46,16 +48,18 @@ type PortEndEvent struct {
Zone int64 Zone int64
Host int64 Host int64
Histories []*types.PortScanHistory Histories []*types.PortScanHistory
Type string
} }
func (i PortEndEvent) GetUrl() string { func (i PortEndEvent) GetUrl() string {
return PORT_START 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{ return &PortEndEvent{
Zone: zone, Zone: zone,
Host: host, Host: host,
Histories: history, Histories: history,
Type: t,
} }
} }