From d178d0dc45af7a6a28b939f116922cbe8afed214 Mon Sep 17 00:00:00 2001 From: crusader Date: Sat, 28 Apr 2018 01:02:30 +0900 Subject: [PATCH] ing --- model/discovery/{DiscoveryHost.go => DiscoverHost.go} | 4 ++-- model/discovery/{DiscoveryPort.go => DiscoverPort.go} | 6 +++--- .../discovery/{DiscoveryService.go => DiscoverService.go} | 2 +- model/discovery/DiscoverZone.go | 7 +++++++ model/discovery/DiscoveryZone.go | 7 ------- 5 files changed, 13 insertions(+), 13 deletions(-) rename model/discovery/{DiscoveryHost.go => DiscoverHost.go} (73%) rename model/discovery/{DiscoveryPort.go => DiscoverPort.go} (75%) rename model/discovery/{DiscoveryService.go => DiscoverService.go} (72%) create mode 100644 model/discovery/DiscoverZone.go delete mode 100644 model/discovery/DiscoveryZone.go diff --git a/model/discovery/DiscoveryHost.go b/model/discovery/DiscoverHost.go similarity index 73% rename from model/discovery/DiscoveryHost.go rename to model/discovery/DiscoverHost.go index 2bc62de..92429ef 100644 --- a/model/discovery/DiscoveryHost.go +++ b/model/discovery/DiscoverHost.go @@ -1,10 +1,10 @@ package discovery -type DiscoveryHost struct { +type DiscoverHost struct { FirstScanRange string `json:"firstScanRange,omitempty"` LastScanRange string `json:"lastScanRange,omitempty"` ExcludeHosts []string `json:"excludeHosts,omitempty"` IncludeHosts []string `json:"includeHosts,omitempty"` - DiscoveryPort *DiscoveryPort `json:"discoveryPort,omitempty"` + DiscoverPort *DiscoverPort `json:"discoverPort,omitempty"` } diff --git a/model/discovery/DiscoveryPort.go b/model/discovery/DiscoverPort.go similarity index 75% rename from model/discovery/DiscoveryPort.go rename to model/discovery/DiscoverPort.go index 395cf03..8e7e37f 100644 --- a/model/discovery/DiscoveryPort.go +++ b/model/discovery/DiscoverPort.go @@ -1,6 +1,6 @@ package discovery -type DiscoveryPort struct { +type DiscoverPort struct { FirstScanRange int `json:"firstScanRange,omitempty"` LastScanRange int `json:"lastScanRange,omitempty"` ExcludePorts []int `json:"excludePorts,omitempty"` @@ -8,10 +8,10 @@ type DiscoveryPort struct { IncludeTCP bool `json:"includeTCP,omitempty"` IncludeUDP bool `json:"includeUDP,omitempty"` - DiscoveryService *DiscoveryService `json:"discoveryService,omitempty"` + DiscoverService *DiscoverService `json:"discoverService,omitempty"` } -func (dp *DiscoveryPort) Contains(port int) bool { +func (dp *DiscoverPort) Contains(port int) bool { if dp.FirstScanRange > port { return false } diff --git a/model/discovery/DiscoveryService.go b/model/discovery/DiscoverService.go similarity index 72% rename from model/discovery/DiscoveryService.go rename to model/discovery/DiscoverService.go index 239d3fa..5b32960 100644 --- a/model/discovery/DiscoveryService.go +++ b/model/discovery/DiscoverService.go @@ -1,5 +1,5 @@ package discovery -type DiscoveryService struct { +type DiscoverService struct { IncludeServices []string `json:"includeServices,omitempty"` } diff --git a/model/discovery/DiscoverZone.go b/model/discovery/DiscoverZone.go new file mode 100644 index 0000000..73b078e --- /dev/null +++ b/model/discovery/DiscoverZone.go @@ -0,0 +1,7 @@ +package discovery + +type DiscoverZone struct { + ExcludePatterns []string `json:"excludePatterns,omitempty"` + + DiscoverHost *DiscoverHost `json:"discoverHost,omitempty"` +} diff --git a/model/discovery/DiscoveryZone.go b/model/discovery/DiscoveryZone.go deleted file mode 100644 index dd9dce6..0000000 --- a/model/discovery/DiscoveryZone.go +++ /dev/null @@ -1,7 +0,0 @@ -package discovery - -type DiscoveryZone struct { - ExcludePatterns []string `json:"excludePatterns,omitempty"` - - DiscoveryHost *DiscoveryHost `json:"discoveryHost,omitempty"` -}