This commit is contained in:
crusader 2018-09-05 05:43:44 +09:00
parent af1a9f1eeb
commit a9833d3070
4 changed files with 6 additions and 3 deletions

View File

@ -15,5 +15,6 @@ type Host struct {
Zone *Zone `json:"zone,omitempty"` Zone *Zone `json:"zone,omitempty"`
PortList []*Port `json:"portList,omitempty"` PortList []*Port `json:"portList,omitempty"`
DiscoveredBy string `json:"discoveredBy,omitempty"`
DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"` DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
} }

View File

@ -13,10 +13,10 @@ type Port struct {
PortNumber json.Number `json:"portNumber,omitempty"` PortNumber json.Number `json:"portNumber,omitempty"`
Meta map[string]string `json:"meta,omitempty"` Meta map[string]string `json:"meta,omitempty"`
DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
Host *Host `json:"host,omitempty"` Host *Host `json:"host,omitempty"`
ServiceList []*Service `json:"serviceList,omitempty"` ServiceList []*Service `json:"serviceList,omitempty"`
DiscoveredBy string `json:"discoveredBy,omitempty"`
DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
UDPLayer gopacket.Layer `json:"-"` UDPLayer gopacket.Layer `json:"-"`
} }

View File

@ -14,6 +14,7 @@ type Service struct {
Port *Port `json:"port,omitempty"` Port *Port `json:"port,omitempty"`
DiscoveredBy string `json:"discoveredBy,omitempty"`
DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"` DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"` Metadata map[string]string `json:"metadata,omitempty"`
} }

View File

@ -15,6 +15,7 @@ type Zone struct {
Mac string `json:"mac,omitempty"` Mac string `json:"mac,omitempty"`
Meta map[string]string `json:"meta,omitempty"` Meta map[string]string `json:"meta,omitempty"`
DiscoveredBy string `json:"discoveredBy,omitempty"`
DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"` DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
mtx sync.RWMutex `json:"-"` mtx sync.RWMutex `json:"-"`