This commit is contained in:
crusader 2018-04-28 01:02:30 +09:00
parent fd618adec1
commit d178d0dc45
5 changed files with 13 additions and 13 deletions

View File

@ -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"`
}

View File

@ -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
}

View File

@ -1,5 +1,5 @@
package discovery
type DiscoveryService struct {
type DiscoverService struct {
IncludeServices []string `json:"includeServices,omitempty"`
}

View File

@ -0,0 +1,7 @@
package discovery
type DiscoverZone struct {
ExcludePatterns []string `json:"excludePatterns,omitempty"`
DiscoverHost *DiscoverHost `json:"discoverHost,omitempty"`
}

View File

@ -1,7 +0,0 @@
package discovery
type DiscoveryZone struct {
ExcludePatterns []string `json:"excludePatterns,omitempty"`
DiscoveryHost *DiscoveryHost `json:"discoveryHost,omitempty"`
}