ing
This commit is contained in:
parent
c68381575d
commit
ab936be303
13
.editorconfig
Normal file
13
.editorconfig
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Editor configuration, see http://editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
max_line_length = off
|
||||||
|
trim_trailing_whitespace = false
|
4
.vscode/settings.json
vendored
Normal file
4
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"editor.tabSize": 2,
|
||||||
|
"editor.insertSpaces": true,
|
||||||
|
}
|
|
@ -1,15 +1,16 @@
|
||||||
package discovery
|
package discovery
|
||||||
|
|
||||||
type DiscoverHost struct {
|
import (
|
||||||
FirstScanRangeV4 string `json:"firstScanRangev4,omitempty"`
|
"git.loafle.net/overflow/commons-go/model/meta"
|
||||||
LastScanRangeV4 string `json:"lastScanRangev4,omitempty"`
|
)
|
||||||
ExcludeHostsV4 []string `json:"excludeHostsv4,omitempty"`
|
|
||||||
IncludeHostsV4 []string `json:"includeHostsv4,omitempty"`
|
|
||||||
|
|
||||||
FirstScanRangeV6 string `json:"firstScanRangev6,omitempty"`
|
type DiscoverHost struct {
|
||||||
LastScanRangeV6 string `json:"lastScanRangev6,omitempty"`
|
MetaIPType *meta.MetaIPType `json:"metaIpType,omitempty"`
|
||||||
ExcludeHostsV6 []string `json:"excludeHostsv6,omitempty"`
|
|
||||||
IncludeHostsV6 []string `json:"includeHostsv6,omitempty"`
|
FirstScanRange string `json:"firstScanRange,omitempty"`
|
||||||
|
LastScanRange string `json:"lastScanRange,omitempty"`
|
||||||
|
ExcludeHosts []string `json:"excludeHosts,omitempty"`
|
||||||
|
IncludeHosts []string `json:"includeHosts,omitempty"`
|
||||||
|
|
||||||
DiscoverPort *DiscoverPort `json:"discoverPort,omitempty"`
|
DiscoverPort *DiscoverPort `json:"discoverPort,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,17 @@
|
||||||
package discovery
|
package discovery
|
||||||
|
|
||||||
import "git.loafle.net/overflow/commons-go/core/util"
|
import (
|
||||||
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
|
"git.loafle.net/overflow/commons-go/model/meta"
|
||||||
|
)
|
||||||
|
|
||||||
type Host struct {
|
type Host struct {
|
||||||
//Zone *Zone `json:"zone"`
|
MetaIPType *meta.MetaIPType `json:"metaIpType,omitempty"`
|
||||||
//
|
|
||||||
//ID json.Number `json:"id,Number,omitempty"`
|
|
||||||
//IPV4 string `json:"ipv4,omitempty"`
|
|
||||||
//IPV6 string `json:"ipv6,omitempty"`
|
|
||||||
//Mac string `json:"mac,omitempty"`
|
|
||||||
//OS string `json:"os,omitempty"`
|
|
||||||
//
|
|
||||||
//DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
|
|
||||||
|
|
||||||
MetaIPTypeKey string `json:"metaIpTypeKey, omitempty"`
|
|
||||||
Address string `json:"address,omitempty"`
|
Address string `json:"address,omitempty"`
|
||||||
Mac string `json:"mac,omitempty"`
|
Mac string `json:"mac,omitempty"`
|
||||||
|
|
||||||
Zone *Zone `json:"zone,omitempty"`
|
Zone *Zone `json:"zone,omitempty"`
|
||||||
PortList []Port `json:"portList, omitempty"`
|
PortList []*Port `json:"portList,omitempty"`
|
||||||
|
|
||||||
DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
|
DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,27 +4,17 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
|
"git.loafle.net/overflow/commons-go/model/meta"
|
||||||
"github.com/google/gopacket"
|
"github.com/google/gopacket"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Port struct {
|
type Port struct {
|
||||||
MetaPortTypeKey string `json:"metaPortTypeKey,omitempty"`
|
MetaPortType *meta.MetaPortType `json:"metaPortType,omitempty"`
|
||||||
PortNumber json.Number `json:"portNumber,omitempty"`
|
PortNumber json.Number `json:"portNumber,omitempty"`
|
||||||
DiscoveredDate *util.Timestamp `json:"discoveredDate,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"`
|
|
||||||
|
|
||||||
UDPLayer gopacket.Layer `json:"-"`
|
UDPLayer gopacket.Layer `json:"-"`
|
||||||
|
|
||||||
//Host *Host `json:"host,omitempty"`
|
|
||||||
//
|
|
||||||
//ID json.Number `json:"id,Number,omitempty"`
|
|
||||||
//PortType constants.PortType `json:"portType,omitempty"`
|
|
||||||
//PortNumber json.Number `json:"portNumber,omitempty"`
|
|
||||||
//
|
|
||||||
//DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
|
|
||||||
//
|
|
||||||
//UDPLayer gopacket.Layer `json:"-"`
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,15 @@
|
||||||
package discovery
|
package discovery
|
||||||
|
|
||||||
import "git.loafle.net/overflow/commons-go/core/util"
|
import (
|
||||||
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
|
"git.loafle.net/overflow/commons-go/model/meta"
|
||||||
|
)
|
||||||
|
|
||||||
type Service struct {
|
type Service struct {
|
||||||
|
MetaCryptoTypeKey *meta.MetaCryptoType `json:"metaCryptoType,omitempty"`
|
||||||
MetaCryptoTypeKey string `json:"metaCryptoTypeKey, omitempty"`
|
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
|
|
||||||
Port *Port `json:"port,omitempty"`
|
Port *Port `json:"port,omitempty"`
|
||||||
|
|
||||||
DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
|
DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
|
||||||
|
|
||||||
|
|
||||||
//Port *Port `json:"port,omitempty"`
|
|
||||||
//
|
|
||||||
//ID json.Number `json:"id,Number,omitempty"`
|
|
||||||
//CryptoType constants.CryptoType `json:"cryptoType,omitempty"`
|
|
||||||
//ServiceName string `json:"serviceName,omitempty"`
|
|
||||||
//
|
|
||||||
//DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,16 @@
|
||||||
package discovery
|
package discovery
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
|
"git.loafle.net/overflow/commons-go/model/meta"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Zone struct {
|
type Zone struct {
|
||||||
//ID json.Number `json:"id,Number,omitempty"`
|
|
||||||
//Network string `json:"network,omitempty"`
|
|
||||||
//IPV4 string `json:"ipv4,omitempty"`
|
|
||||||
//IPV6 string `json:"ipv6,omitempty"`
|
|
||||||
//Iface string `json:"iface,omitempty"`
|
|
||||||
//Mac string `json:"mac,omitempty"`
|
|
||||||
//
|
|
||||||
//DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
|
|
||||||
//
|
|
||||||
//mtx sync.RWMutex `json:"-"`
|
|
||||||
|
|
||||||
Network string `json:"network,omitempty"`
|
Network string `json:"network,omitempty"`
|
||||||
Iface string `json:"iface,omitempty"`
|
Iface string `json:"iface,omitempty"`
|
||||||
MetaIPTypeKey string `json:"metaIPTypeKey, omitempty"`
|
MetaIPType *meta.MetaIPType `json:"metaIPType,omitempty"`
|
||||||
Address string `json:"address,omitempty"`
|
Address string `json:"address,omitempty"`
|
||||||
Mac string `json:"mac,omitempty"`
|
Mac string `json:"mac,omitempty"`
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@ import (
|
||||||
type Infra struct {
|
type Infra struct {
|
||||||
ID json.Number `json:"id,Number,omitempty"`
|
ID json.Number `json:"id,Number,omitempty"`
|
||||||
MetaInfraType *meta.MetaInfraType `json:"metaInfraType,omitempty"`
|
MetaInfraType *meta.MetaInfraType `json:"metaInfraType,omitempty"`
|
||||||
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
|
||||||
Probe *probe.Probe `json:"probe,omitempty"`
|
Probe *probe.Probe `json:"probe,omitempty"`
|
||||||
//Target *target.Target `json:"target,omitempty"`
|
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,8 @@ type InfraHost struct {
|
||||||
MetaTargetHostType *meta.MetaTargetHostType `json:"metaTargetHostType,omitempty"`
|
MetaTargetHostType *meta.MetaTargetHostType `json:"metaTargetHostType,omitempty"`
|
||||||
InfraHostMachine *InfraHostMachine `json:"infraHostMachine,omitempty"`
|
InfraHostMachine *InfraHostMachine `json:"infraHostMachine,omitempty"`
|
||||||
InfraHostOS *InfraHostOS `json:"infraHostOS,omitempty"`
|
InfraHostOS *InfraHostOS `json:"infraHostOS,omitempty"`
|
||||||
InfraHostIPs []InfraHostIP `json:"infraHostIPs,omitempty"`
|
InfraHostIPs []*InfraHostIP `json:"infraHostIPs,omitempty"`
|
||||||
InfraHostPorts []InfraHostPort `json:"infraHostPorts,omitempty"`
|
InfraHostPorts []*InfraHostPort `json:"infraHostPorts,omitempty"`
|
||||||
InfraHostApplications []InfraHostApplication `json:"infraHostApplications, omitempty"`
|
InfraHostApplications []*InfraHostApplication `json:"infraHostApplications,omitempty"`
|
||||||
InfraHostDaemons []InfraHostDaemon `json:"infraHostDaemons, omitempty"`
|
InfraHostDaemons []*InfraHostDaemon `json:"infraHostDaemons,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
package infra
|
package infra
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type InfraHostApplication struct {
|
type InfraHostApplication struct {
|
||||||
ID json.Number `json:"id,Number,omitempty"`
|
ID json.Number `json:"id,Number,omitempty"`
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
|
|
||||||
InfraHost *InfraHost `json:"infraHost,omitempty"`
|
InfraHost *InfraHost `json:"infraHost,omitempty"`
|
||||||
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
package infra
|
package infra
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type InfraHostDaemon struct {
|
type InfraHostDaemon struct {
|
||||||
ID json.Number `json:"id,Number,omitempty"`
|
ID json.Number `json:"id,Number,omitempty"`
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
|
|
||||||
InfraHost *InfraHost `json:"infraHost,omitempty"`
|
InfraHost *InfraHost `json:"infraHost,omitempty"`
|
||||||
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package infra
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
"git.loafle.net/overflow/commons-go/model/meta"
|
"git.loafle.net/overflow/commons-go/model/meta"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package infra
|
package infra
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type InfraHostMachine struct {
|
type InfraHostMachine struct {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package infra
|
package infra
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type InfraHostOS struct {
|
type InfraHostOS struct {
|
||||||
|
|
||||||
ID json.Number `json:"id,Number,omitempty"`
|
ID json.Number `json:"id,Number,omitempty"`
|
||||||
InfraHost *InfraHost `json:"infraHost,omitempty"`
|
InfraHost *InfraHost `json:"infraHost,omitempty"`
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
|
|
|
@ -2,6 +2,7 @@ package infra
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
"git.loafle.net/overflow/commons-go/model/meta"
|
"git.loafle.net/overflow/commons-go/model/meta"
|
||||||
)
|
)
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
type Member struct {
|
type Member struct {
|
||||||
ID json.Number `json:"id,Number,omitempty"`
|
ID json.Number `json:"id,Number,omitempty"`
|
||||||
Email string `json:"email,omitempty"`
|
Email string `json:"email,omitempty"`
|
||||||
Pw string `json:"pw,omitempty"`
|
Password string `json:"password,omitempty"`
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
Phone string `json:"phone,omitempty"`
|
Phone string `json:"phone,omitempty"`
|
||||||
CompanyName string `json:"companyName,omitempty"`
|
CompanyName string `json:"companyName,omitempty"`
|
||||||
|
|
|
@ -12,5 +12,4 @@ type MetaCrawler struct {
|
||||||
Key string `json:"key,omitempty"`
|
Key string `json:"key,omitempty"`
|
||||||
IsDefault bool `json:"isDefault,omitempty"`
|
IsDefault bool `json:"isDefault,omitempty"`
|
||||||
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package meta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package meta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -9,7 +10,6 @@ type MetaIPType struct {
|
||||||
ID json.Number `json:"id,Number,omitempty"`
|
ID json.Number `json:"id,Number,omitempty"`
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
Key string `json:"key,omitempty"`
|
Key string `json:"key,omitempty"`
|
||||||
|
|
||||||
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
package meta
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
|
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type MetaInfraVendor struct {
|
|
||||||
ID json.Number `json:"id,Number,omitempty"`
|
|
||||||
Name string `json:"name,omitempty"`
|
|
||||||
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
|
||||||
MetaInfraType *MetaInfraType `json:"metaInfraType,omitempty"`
|
|
||||||
}
|
|
|
@ -2,6 +2,7 @@ package meta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package meta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package meta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -11,3 +12,32 @@ type MetaPortType struct {
|
||||||
Key string `json:"key,omitempty"`
|
Key string `json:"key,omitempty"`
|
||||||
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type MetaPortTypeEnum int
|
||||||
|
|
||||||
|
const (
|
||||||
|
MetaPortTypeEnumTCP MetaPortTypeEnum = 1
|
||||||
|
MetaPortTypeEnumUDP MetaPortTypeEnum = 2
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
metaPortTypeEnumID = map[MetaPortTypeEnum]string{
|
||||||
|
MetaPortTypeEnumTCP: "TCP",
|
||||||
|
MetaPortTypeEnumUDP: "UDP",
|
||||||
|
}
|
||||||
|
|
||||||
|
metaPortTypeEnumKey = map[string]MetaPortTypeEnum{
|
||||||
|
"TCP": MetaPortTypeEnumTCP,
|
||||||
|
"UDP": MetaPortTypeEnumUDP,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
func ToMetaPortTypeEnum(v *MetaPortType) MetaPortTypeEnum {
|
||||||
|
return metaPortTypeEnumKey[v.Key]
|
||||||
|
}
|
||||||
|
|
||||||
|
func ToMetaPortType(v MetaPortTypeEnum) *MetaPortType {
|
||||||
|
return &MetaPortType{
|
||||||
|
Key: metaPortTypeEnumID[v],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package meta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -9,7 +10,6 @@ type MetaProbeStatus struct {
|
||||||
ID json.Number `json:"id,Number,omitempty"`
|
ID json.Number `json:"id,Number,omitempty"`
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
Key string `json:"key,omitempty"`
|
Key string `json:"key,omitempty"`
|
||||||
|
|
||||||
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
package meta
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
|
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type MetaProbeTaskType struct {
|
|
||||||
ID json.Number `json:"id,Number,omitempty"`
|
|
||||||
Name string `json:"name,omitempty"`
|
|
||||||
Description string `json:"description,omitempty"`
|
|
||||||
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
|
||||||
}
|
|
|
@ -2,6 +2,7 @@ package meta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,7 @@ func ToMetaTargetHostTypeEnum(v *MetaTargetHostType) MetaTargetHostTypeEnum {
|
||||||
}
|
}
|
||||||
|
|
||||||
func ToMetaTargetHostType(v MetaTargetHostTypeEnum) *MetaTargetHostType {
|
func ToMetaTargetHostType(v MetaTargetHostTypeEnum) *MetaTargetHostType {
|
||||||
m := &MetaTargetHostType {
|
m := &MetaTargetHostType{}
|
||||||
}
|
|
||||||
m.Key = metaTargetHostTypeEnumID[v]
|
m.Key = metaTargetHostTypeEnumID[v]
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
|
|
@ -25,8 +25,7 @@ func ToMetaTargetServiceTypeEnum(v *MetaTargetServiceType) MetaTargetServiceType
|
||||||
}
|
}
|
||||||
|
|
||||||
func ToMetaTargetServiceType(v MetaTargetServiceTypeEnum) *MetaTargetServiceType {
|
func ToMetaTargetServiceType(v MetaTargetServiceTypeEnum) *MetaTargetServiceType {
|
||||||
m := &MetaTargetServiceType {
|
m := &MetaTargetServiceType{}
|
||||||
}
|
|
||||||
m.Key = metaTargetServiceTypeEnumID[v]
|
m.Key = metaTargetServiceTypeEnumID[v]
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
|
|
@ -2,16 +2,15 @@ package meta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
"git.loafle.net/overflow_backup_2018_0455/overflow_service/proxy/meta"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type MetaTargetType struct {
|
type MetaTargetType struct {
|
||||||
ID json.Number `json:"id,Number,omitempty"`
|
ID json.Number `json:"id,Number,omitempty"`
|
||||||
MetaInfraType *meta.MetaInfraType `json:"metaInfraType, omitempty"`
|
MetaInfraType *MetaInfraType `json:"metaInfraType,omitempty"`
|
||||||
Key string `json:"key,omitempty"`
|
Key string `json:"key,omitempty"`
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
IsSupported bool `json:"isSupported,omitempty"`
|
IsSupported bool `json:"isSupported,omitempty"`
|
||||||
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ type MetaTargetZoneType struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type MetaTargetZoneTypeEnum int
|
type MetaTargetZoneTypeEnum int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MetaTargetZoneTypeEnumUNKNOWN MetaTargetZoneTypeEnum = 1
|
MetaTargetZoneTypeEnumUNKNOWN MetaTargetZoneTypeEnum = 1
|
||||||
MetaTargetZoneTypeEnumZONE MetaTargetZoneTypeEnum = 2
|
MetaTargetZoneTypeEnumZONE MetaTargetZoneTypeEnum = 2
|
||||||
|
@ -27,8 +28,7 @@ func ToMetaTargetZoneTypeEnum(v *MetaTargetZoneType) MetaTargetZoneTypeEnum {
|
||||||
}
|
}
|
||||||
|
|
||||||
func ToMetaTargetZoneType(v MetaTargetZoneTypeEnum) *MetaTargetZoneType {
|
func ToMetaTargetZoneType(v MetaTargetZoneTypeEnum) *MetaTargetZoneType {
|
||||||
m := &MetaTargetZoneType {
|
m := &MetaTargetZoneType{}
|
||||||
}
|
|
||||||
m.Key = metaTargetZoneTypeEnumID[v]
|
m.Key = metaTargetZoneTypeEnumID[v]
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
|
|
@ -4,14 +4,14 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
"git.loafle.net/overflow/commons-go/model/meta"
|
|
||||||
"git.loafle.net/overflow/commons-go/model/domain"
|
"git.loafle.net/overflow/commons-go/model/domain"
|
||||||
|
"git.loafle.net/overflow/commons-go/model/meta"
|
||||||
"git.loafle.net/overflow/commons-go/model/probe"
|
"git.loafle.net/overflow/commons-go/model/probe"
|
||||||
)
|
)
|
||||||
|
|
||||||
type NoAuthProbe struct {
|
type NoAuthProbe struct {
|
||||||
ID json.Number `json:"id,Number,omitempty"`
|
ID json.Number `json:"id,Number,omitempty"`
|
||||||
Domain *domain.DomainMember `json:"domain,omitempty"`
|
Domain *domain.Domain `json:"domain,omitempty"`
|
||||||
Probe *probe.Probe `json:"probe,omitempty"`
|
Probe *probe.Probe `json:"probe,omitempty"`
|
||||||
MetaNoAuthProbeStatus *meta.MetaNoAuthProbeStatus `json:"metaNoAuthProbeStatus,omitempty"`
|
MetaNoAuthProbeStatus *meta.MetaNoAuthProbeStatus `json:"metaNoAuthProbeStatus,omitempty"`
|
||||||
InfraHostMeta string `json:"infraHostMeta,omitempty"`
|
InfraHostMeta string `json:"infraHostMeta,omitempty"`
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
package noauthprobe
|
|
||||||
|
|
||||||
type NoAuthProbeDescription struct {
|
|
||||||
Host *NoAuthProbeDescriptionHost `json:"host,omitempty"`
|
|
||||||
Network *NoAuthProbeDescriptionNetwork `json:"network,omitempty"`
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
package noauthprobe
|
|
||||||
|
|
||||||
type NoAuthProbeDescriptionHost struct {
|
|
||||||
Name string `json:"name,omitempty"`
|
|
||||||
OS string `json:"os,omitempty"`
|
|
||||||
Platform string `json:"paltform,omitempty"`
|
|
||||||
PlatformFamily string `json:"platformFamily,omitempty"`
|
|
||||||
PlatformVersion string `json:"platformVersion,omitempty"`
|
|
||||||
KernelVersion string `json:"kernelVersion,omitempty"`
|
|
||||||
HostID string `json:"hostID,omitempty"`
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
package noauthprobe
|
|
||||||
|
|
||||||
type NoAuthProbeDescriptionNetwork struct {
|
|
||||||
Name string `json:"name,omitempty"`
|
|
||||||
Address string `json:"address,omitempty"`
|
|
||||||
Gateway string `json:"gateway,omitempty"`
|
|
||||||
MacAddress string `json:"macAddress,omitempty"`
|
|
||||||
}
|
|
|
@ -9,10 +9,10 @@ import (
|
||||||
|
|
||||||
type Notification struct {
|
type Notification struct {
|
||||||
ID json.Number `json:"id,Number,omitempty"`
|
ID json.Number `json:"id,Number,omitempty"`
|
||||||
CreateDate *util.Timestamp `json:"date,omitempty"`
|
|
||||||
Title string `json:"title,omitempty"`
|
Title string `json:"title,omitempty"`
|
||||||
Message string `json:"message,omitempty"`
|
Message string `json:"message,omitempty"`
|
||||||
Member *member.Member `json:"member,omitempty"`
|
Member *member.Member `json:"member,omitempty"`
|
||||||
|
URL string `json:"url,omitempty"`
|
||||||
ConfirmDate *util.Timestamp `json:"confirmDate,omitempty"`
|
ConfirmDate *util.Timestamp `json:"confirmDate,omitempty"`
|
||||||
Url string `json:"url,omitempty"`
|
CreateDate *util.Timestamp `json:"date,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
"git.loafle.net/overflow/commons-go/core/util"
|
||||||
"git.loafle.net/overflow/commons-go/model/meta"
|
|
||||||
"git.loafle.net/overflow/commons-go/model/domain"
|
"git.loafle.net/overflow/commons-go/model/domain"
|
||||||
"git.loafle.net/overflow/commons-go/model/member"
|
"git.loafle.net/overflow/commons-go/model/member"
|
||||||
|
"git.loafle.net/overflow/commons-go/model/meta"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Probe struct {
|
type Probe struct {
|
||||||
|
@ -21,7 +21,7 @@ type Probe struct {
|
||||||
AuthorizeDate *util.Timestamp `json:"authorizeDate,omitempty"`
|
AuthorizeDate *util.Timestamp `json:"authorizeDate,omitempty"`
|
||||||
AuthorizeMember *member.Member `json:"authorizeMember,omitempty"`
|
AuthorizeMember *member.Member `json:"authorizeMember,omitempty"`
|
||||||
TargetCount int `json:"targetCount,omitempty"`
|
TargetCount int `json:"targetCount,omitempty"`
|
||||||
ConnectDate *util.Timestamp `json:"connectDate,omitempty"`
|
|
||||||
ConnectAddress string `json:"connectAddress,omitempty"`
|
ConnectAddress string `json:"connectAddress,omitempty"`
|
||||||
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
||||||
|
ConnectDate *util.Timestamp `json:"connectDate,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
package probe
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
|
|
||||||
"git.loafle.net/overflow/commons-go/core/util"
|
|
||||||
"git.loafle.net/overflow/commons-go/model/meta"
|
|
||||||
)
|
|
||||||
|
|
||||||
type ProbeTask struct {
|
|
||||||
ID json.Number `json:"id,Number,omitempty"`
|
|
||||||
MetaProbeTaskType *meta.MetaProbeTaskType `json:"metaProbeTaskType,omitempty"`
|
|
||||||
Probe *Probe `json:"probe,omitempty"`
|
|
||||||
Data string `json:"data,omitempty"`
|
|
||||||
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
|
||||||
SendDate *util.Timestamp `json:"sendDate,omitempty"`
|
|
||||||
StartDate *util.Timestamp `json:"startDate,omitempty"`
|
|
||||||
EndDate *util.Timestamp `json:"endDate,omitempty"`
|
|
||||||
Succeed bool `json:"succeed,omitempty"`
|
|
||||||
}
|
|
|
@ -10,5 +10,5 @@ type Connection struct {
|
||||||
IP string `json:"ip,omitempty"`
|
IP string `json:"ip,omitempty"`
|
||||||
Port json.Number `json:"port,Number,omitempty"`
|
Port json.Number `json:"port,Number,omitempty"`
|
||||||
MetaPortType *meta.MetaPortType `json:"metaPortType,omitempty"`
|
MetaPortType *meta.MetaPortType `json:"metaPortType,omitempty"`
|
||||||
SSL bool `json:"ssl,omitempty"`
|
MetaCryptoType *meta.MetaCryptoType `json:"metaCryptoType,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package sensorconfig
|
package sensorconfig
|
||||||
|
|
||||||
type Item struct {
|
type Item struct {
|
||||||
Keys []Keys `json:"keys,omitempty"`
|
Keys []*Keys `json:"keys,omitempty"`
|
||||||
QueryInfo *QueryInfo `json:"queryInfo,omitempty"`
|
QueryInfo *QueryInfo `json:"queryInfo,omitempty"`
|
||||||
MappingInfo *MappingInfo `json:"mappingInfo,omitempty"`
|
MappingInfo *MappingInfo `json:"mappingInfo,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,5 +8,5 @@ type SensorConfig struct {
|
||||||
Target *Target `json:"target,omitempty"`
|
Target *Target `json:"target,omitempty"`
|
||||||
Schedule *Schedule `json:"schedule,omitempty"`
|
Schedule *Schedule `json:"schedule,omitempty"`
|
||||||
Crawler *Crawler `json:"crawler,omitempty"`
|
Crawler *Crawler `json:"crawler,omitempty"`
|
||||||
Items []Item `json:"items,omitempty"`
|
Items []*Item `json:"items,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,5 +17,5 @@ type Target struct {
|
||||||
Description string `json:"description,omitempty"`
|
Description string `json:"description,omitempty"`
|
||||||
SensorCount json.Number `json:"sensorCount,omitempty"`
|
SensorCount json.Number `json:"sensorCount,omitempty"`
|
||||||
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
CreateDate *util.Timestamp `json:"createDate,omitempty"`
|
||||||
Sensors []sensor.Sensor `json:"sensors,omitempty"`
|
Sensors []*sensor.Sensor `json:"sensors,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user