ing
This commit is contained in:
43
api/module/discovery/model/discovery.go
Normal file
43
api/module/discovery/model/discovery.go
Normal file
@@ -0,0 +1,43 @@
|
||||
package model
|
||||
|
||||
type DiscoveryZone struct {
|
||||
ExcludePatterns []string `json:"excludePatterns"`
|
||||
|
||||
DiscoveryHost *DiscoveryHost `json:"discoveryHost"`
|
||||
}
|
||||
|
||||
type DiscoveryHost struct {
|
||||
Zone Zone `json:"zone"`
|
||||
|
||||
FirstScanRange string `json:"firstScanRange"`
|
||||
LastScanRange string `json:"lastScanRange"`
|
||||
ExcludeHosts []string `json:"excludeHosts"`
|
||||
|
||||
DiscoveryPort *DiscoveryPort `json:"discoveryPort"`
|
||||
}
|
||||
|
||||
type DiscoveryPort struct {
|
||||
Host Host `json:"host"`
|
||||
|
||||
FirstScanRange int `json:"firstScanRange"`
|
||||
LastScanRange int `json:"lastScanRange"`
|
||||
ExcludePorts []int `json:"excludePorts"`
|
||||
|
||||
DiscoveryService *DiscoveryService `json:"discoveryService"`
|
||||
}
|
||||
|
||||
type DiscoveryService struct {
|
||||
Port Port `json:"port"`
|
||||
|
||||
IncludeServices []string `json:"includeServices"`
|
||||
}
|
||||
|
||||
/*
|
||||
Dzone --> zone --> Dhost --> host --> Dport --> port --> Dservice --> service
|
||||
|
||||
zone --> Dhost --> host --> Dport --> port --> Dservice --> service
|
||||
|
||||
host --> Dport --> port --> Dservice --> service
|
||||
|
||||
port --> Dservice --> service
|
||||
*/
|
||||
11
api/module/discovery/model/host.go
Normal file
11
api/module/discovery/model/host.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
type Host struct {
|
||||
Zone *Zone `json:"zone"`
|
||||
|
||||
ID int `json:"id,omitempty"`
|
||||
IP string `json:"ip"`
|
||||
Mac string `json:"mac"`
|
||||
|
||||
OS string `json:"os,omitempty"`
|
||||
}
|
||||
9
api/module/discovery/model/port.go
Normal file
9
api/module/discovery/model/port.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package model
|
||||
|
||||
type Port struct {
|
||||
Host *Host `json:"host,omitempty"`
|
||||
|
||||
ID int `json:"id,omitempty"`
|
||||
PortType string `json:"portType,omitempty"`
|
||||
PortNumber int `json:"portNumber,omitempty"`
|
||||
}
|
||||
9
api/module/discovery/model/service.go
Normal file
9
api/module/discovery/model/service.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package model
|
||||
|
||||
type Service struct {
|
||||
Port *Port `json:"port,omitempty"`
|
||||
|
||||
ID int `json:"id,omitempty"`
|
||||
TLSType string `json:"tlsType,omitempty"`
|
||||
ServiceName string `json:"serviceName,omitempty"`
|
||||
}
|
||||
9
api/module/discovery/model/zone.go
Normal file
9
api/module/discovery/model/zone.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package model
|
||||
|
||||
type Zone struct {
|
||||
ID int `json:"id,omitempty"`
|
||||
Network string `json:"network"`
|
||||
IP string `json:"ip"`
|
||||
Iface string `json:"iface"`
|
||||
Mac string `json:"mac"`
|
||||
}
|
||||
Reference in New Issue
Block a user