This commit is contained in:
crusader 2018-06-12 22:13:22 +09:00
parent c68381575d
commit ab936be303
50 changed files with 274 additions and 329 deletions

13
.editorconfig Normal file
View 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
View File

@ -0,0 +1,4 @@
{
"editor.tabSize": 2,
"editor.insertSpaces": true,
}

View File

@ -1,5 +1,5 @@
package member package member
const ( const (
NG_MEMBER_SERVER_URI ="http://localhost:4200/#" NG_MEMBER_SERVER_URI = "http://localhost:4200/#"
) )

View File

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

View File

@ -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"`
// Address string `json:"address,omitempty"`
//ID json.Number `json:"id,Number,omitempty"` Mac string `json:"mac,omitempty"`
//IPV4 string `json:"ipv4,omitempty"`
//IPV6 string `json:"ipv6,omitempty"` Zone *Zone `json:"zone,omitempty"`
//Mac string `json:"mac,omitempty"` PortList []*Port `json:"portList,omitempty"`
//OS string `json:"os,omitempty"`
//
//DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
MetaIPTypeKey string `json:"metaIpTypeKey, omitempty"`
Address string `json:"address, omitempty"`
Mac string `json:"mac, omitempty"`
Zone *Zone `json:"zone, omitempty"`
PortList []Port `json:"portList, omitempty"`
DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"` DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
} }

View File

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

View File

@ -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"`
Name string `json:"name,omitempty"`
MetaCryptoTypeKey string `json:"metaCryptoTypeKey, omitempty"` Port *Port `json:"port,omitempty"`
Name string `json:"name, 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"`
} }

View File

@ -1,27 +1,18 @@
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"`
//Network string `json:"network,omitempty"` Iface string `json:"iface,omitempty"`
//IPV4 string `json:"ipv4,omitempty"` MetaIPType *meta.MetaIPType `json:"metaIPType,omitempty"`
//IPV6 string `json:"ipv6,omitempty"` Address string `json:"address,omitempty"`
//Iface string `json:"iface,omitempty"` Mac string `json:"mac,omitempty"`
//Mac string `json:"mac,omitempty"`
//
//DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
//
//mtx sync.RWMutex `json:"-"`
Network string `json:"network, omitempty"`
Iface string `json:"iface, omitempty"`
MetaIPTypeKey string `json:"metaIPTypeKey, omitempty"`
Address string `json:"address, omitempty"`
Mac string `json:"mac, omitempty"`
DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"` DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`

View File

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

View File

@ -6,12 +6,12 @@ import (
type InfraHost struct { type InfraHost struct {
Infra Infra
InfraZone *InfraZone `json:"infraZone,omitempty"` InfraZone *InfraZone `json:"infraZone,omitempty"`
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"`
} }

View File

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

View File

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

View File

@ -2,17 +2,18 @@ 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"
) )
type InfraHostIP struct { type InfraHostIP 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"`
MetaIPType *meta.MetaIPType `json:"metaIPType, 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"`
Iface string `json:"iface, omitempty"` Iface string `json:"iface,omitempty"`
Gateway string `json:"gateway, omitempty"` Gateway string `json:"gateway,omitempty"`
CreateDate *util.Timestamp `json:"createDate, omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -1,13 +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 InfraHostMachine struct { type InfraHostMachine 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"`
Meta string `json:"meta,omitempty"` Meta string `json:"meta,omitempty"`
CreateDate *util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -1,21 +1,21 @@
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"` OS string `json:"os,omitempty"`
OS string `json:"os, omitempty"` Platform string `json:"platform,omitempty"`
Platform string `json:"platform, omitempty"` PlatformFamily string `json:"platformFamily,omitempty"`
PlatformFamily string `json:"platformFamily, omitempty"` PlatformVersion string `json:"platformVersion,omitempty"`
PlatformVersion string `json:"platformVersion, omitempty"` KernelVersion string `json:"kernelVersion,omitempty"`
KernelVersion string `json:"kernelVersion, omitempty"` HostID string `json:"hostID,omitempty"`
HostID string `json:"hostID, omitempty"` Meta string `json:"meta,omitempty"`
Meta string `json:"meta, omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
CreateDate *util.Timestamp `json:"createDate, omitempty"`
} }

View File

@ -2,14 +2,15 @@ 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"
) )
type InfraHostPort struct { type InfraHostPort 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"`
MetaPortType *meta.MetaPortType `json:"metaPortType, omitempty"` MetaPortType *meta.MetaPortType `json:"metaPortType,omitempty"`
Port json.Number `json:"port,Number,omitempty"` Port json.Number `json:"port,Number,omitempty"`
CreateDate *util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -4,8 +4,8 @@ import "git.loafle.net/overflow/commons-go/model/meta"
type InfraService struct { type InfraService struct {
Infra Infra
MetaTargetServiceType *meta.MetaTargetServiceType `json:"metaTargetServiceType, omitempty"` MetaTargetServiceType *meta.MetaTargetServiceType `json:"metaTargetServiceType,omitempty"`
InfraHostIP *InfraHostIP `json:"infraHostIP, omitempty"` InfraHostIP *InfraHostIP `json:"infraHostIP,omitempty"`
InfraHostPort *InfraHostPort `json:"infraHostPort, omitempty"` InfraHostPort *InfraHostPort `json:"infraHostPort,omitempty"`
MetaCryptoType *meta.MetaCryptoType `json:"metaCryptoType, omitempty"` MetaCryptoType *meta.MetaCryptoType `json:"metaCryptoType,omitempty"`
} }

View File

@ -4,10 +4,10 @@ import "git.loafle.net/overflow/commons-go/model/meta"
type InfraZone struct { type InfraZone struct {
Infra Infra
MetaTargetZoneType *meta.MetaTargetZoneType `json:"metaTargetZoneType, omitempty"` MetaTargetZoneType *meta.MetaTargetZoneType `json:"metaTargetZoneType,omitempty"`
MetaIPType *meta.MetaIPType `json:"metaIPType, omitempty"` MetaIPType *meta.MetaIPType `json:"metaIPType,omitempty"`
Network string `json:"network, omitempty"` Network string `json:"network,omitempty"`
Iface string `json:"iface, omitempty"` Iface string `json:"iface,omitempty"`
Address string `json:"address, omitempty"` Address string `json:"address,omitempty"`
Mac string `json:"mac, omitempty"` Mac string `json:"mac,omitempty"`
} }

View File

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

View File

@ -7,10 +7,9 @@ import (
) )
type MetaCrawler struct { type MetaCrawler 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"`
IsDefault bool `json:"isDefault, omitempty"` IsDefault bool `json:"isDefault,omitempty"`
CreateDate *util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -2,12 +2,13 @@ package meta
import ( import (
"encoding/json" "encoding/json"
"git.loafle.net/overflow/commons-go/core/util" "git.loafle.net/overflow/commons-go/core/util"
) )
type MetaCryptoType struct { type MetaCryptoType 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"`
} }

View File

@ -9,6 +9,6 @@ import (
type MetaHistoryType struct { type MetaHistoryType 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"`
} }

View File

@ -2,14 +2,14 @@ package meta
import ( import (
"encoding/json" "encoding/json"
"git.loafle.net/overflow/commons-go/core/util" "git.loafle.net/overflow/commons-go/core/util"
) )
type MetaIPType struct { 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"`
} }
@ -21,14 +21,14 @@ const (
) )
var ( var (
metaIPTypeEnumID = map[MetaIPTypeEnum]string { metaIPTypeEnumID = map[MetaIPTypeEnum]string{
MetaIPTypeEnumV4: "V4", MetaIPTypeEnumV4: "V4",
MetaIPTypeEnumV6: "V6", MetaIPTypeEnumV6: "V6",
} }
metaIPTypeEnumKey = map[string]MetaIPTypeEnum{ metaIPTypeEnumKey = map[string]MetaIPTypeEnum{
"V4": MetaIPTypeEnumV4, "V4": MetaIPTypeEnumV4,
"V6": MetaIPTypeEnumV6, "V6": MetaIPTypeEnumV6,
} }
) )

View File

@ -8,7 +8,7 @@ import (
type MetaInfraType struct { type MetaInfraType struct {
ID json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
Key string `json:"key, omitempty"` Key string `json:"key,omitempty"`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
CreateDate *util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
} }
@ -16,22 +16,22 @@ type MetaInfraType struct {
type MetaInfraTypeEnum int type MetaInfraTypeEnum int
const ( const (
MetaInfraTypeEnumZONE MetaInfraTypeEnum = 1 MetaInfraTypeEnumZONE MetaInfraTypeEnum = 1
MetaInfraTypeEnumHOST MetaInfraTypeEnum = 2 MetaInfraTypeEnumHOST MetaInfraTypeEnum = 2
MetaInfraTypeEnumService MetaInfraTypeEnum = 3 MetaInfraTypeEnumService MetaInfraTypeEnum = 3
) )
var ( var (
metaInfraTypeEnumID = map[MetaInfraTypeEnum]string { metaInfraTypeEnumID = map[MetaInfraTypeEnum]string{
MetaInfraTypeEnumZONE: "ZONE", MetaInfraTypeEnumZONE: "ZONE",
MetaInfraTypeEnumHOST: "HOST", MetaInfraTypeEnumHOST: "HOST",
MetaInfraTypeEnumService: "SERVICE", MetaInfraTypeEnumService: "SERVICE",
} }
metaInfraTypeEnumKey = map[string]MetaInfraTypeEnum{ metaInfraTypeEnumKey = map[string]MetaInfraTypeEnum{
"ZONE": MetaInfraTypeEnumZONE, "ZONE": MetaInfraTypeEnumZONE,
"HOST": MetaInfraTypeEnumHOST, "HOST": MetaInfraTypeEnumHOST,
"SERVICE": MetaInfraTypeEnumService, "SERVICE": MetaInfraTypeEnumService,
} }
) )

View File

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

View File

@ -2,38 +2,39 @@ package meta
import ( import (
"encoding/json" "encoding/json"
"git.loafle.net/overflow/commons-go/core/util" "git.loafle.net/overflow/commons-go/core/util"
) )
type MetaMemberStatus struct { type MetaMemberStatus 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"`
} }
type MetaMemberStatusEnum int type MetaMemberStatusEnum int
const ( const (
MetaMemberStatusEnumNOAUTH MetaMemberStatusEnum = 1 MetaMemberStatusEnumNOAUTH MetaMemberStatusEnum = 1
MetaMemberStatusEnumNORMAL MetaMemberStatusEnum = 2 MetaMemberStatusEnumNORMAL MetaMemberStatusEnum = 2
MetaMemberStatusEnumDORMANCY MetaMemberStatusEnum = 3 MetaMemberStatusEnumDORMANCY MetaMemberStatusEnum = 3
MetaMemberStatusEnumWITHDRAWAL MetaMemberStatusEnum = 4 MetaMemberStatusEnumWITHDRAWAL MetaMemberStatusEnum = 4
) )
var ( var (
metaMemberStatusEnumID = map[MetaMemberStatusEnum]string { metaMemberStatusEnumID = map[MetaMemberStatusEnum]string{
MetaMemberStatusEnumNOAUTH: "NOAUTH", MetaMemberStatusEnumNOAUTH: "NOAUTH",
MetaMemberStatusEnumNORMAL: "NORMAL", MetaMemberStatusEnumNORMAL: "NORMAL",
MetaMemberStatusEnumDORMANCY: "DORMANCY", MetaMemberStatusEnumDORMANCY: "DORMANCY",
MetaMemberStatusEnumWITHDRAWAL: "WITHDRAWAL", MetaMemberStatusEnumWITHDRAWAL: "WITHDRAWAL",
} }
metaMemberStatusEnumKey = map[string]MetaMemberStatusEnum{ metaMemberStatusEnumKey = map[string]MetaMemberStatusEnum{
"NOAUTH": MetaMemberStatusEnumNOAUTH, "NOAUTH": MetaMemberStatusEnumNOAUTH,
"NORMAL": MetaMemberStatusEnumNORMAL, "NORMAL": MetaMemberStatusEnumNORMAL,
"DORMANCY": MetaMemberStatusEnumDORMANCY, "DORMANCY": MetaMemberStatusEnumDORMANCY,
"WITHDRAWAL":MetaMemberStatusEnumWITHDRAWAL, "WITHDRAWAL": MetaMemberStatusEnumWITHDRAWAL,
} }
) )

View File

@ -2,12 +2,13 @@ package meta
import ( import (
"encoding/json" "encoding/json"
"git.loafle.net/overflow/commons-go/core/util" "git.loafle.net/overflow/commons-go/core/util"
) )
type MetaNoAuthProbeStatus struct { type MetaNoAuthProbeStatus struct {
ID json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
Key string `json:"key, omitempty"` Key string `json:"key,omitempty"`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
CreateDate *util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
} }
@ -15,20 +16,20 @@ type MetaNoAuthProbeStatus struct {
type NoAuthProbeStatusEnum int type NoAuthProbeStatusEnum int
const ( const (
NoAuthProbeStatusEnumACCEPT NoAuthProbeStatusEnum = 1 NoAuthProbeStatusEnumACCEPT NoAuthProbeStatusEnum = 1
NoAuthProbeStatusEnumDENY NoAuthProbeStatusEnum = 2 NoAuthProbeStatusEnumDENY NoAuthProbeStatusEnum = 2
NoAuthProbeStatusEnumPROCESSING NoAuthProbeStatusEnum = 3 NoAuthProbeStatusEnumPROCESSING NoAuthProbeStatusEnum = 3
) )
var ( var (
noAuthProbeStatusEnumID = map[NoAuthProbeStatusEnum]string{ noAuthProbeStatusEnumID = map[NoAuthProbeStatusEnum]string{
NoAuthProbeStatusEnumACCEPT: "ACCEPT", NoAuthProbeStatusEnumACCEPT: "ACCEPT",
NoAuthProbeStatusEnumDENY: "DENY", NoAuthProbeStatusEnumDENY: "DENY",
NoAuthProbeStatusEnumPROCESSING:"PROCESSING", NoAuthProbeStatusEnumPROCESSING: "PROCESSING",
} }
noAuthProbeStatusEnumKey = map[string]NoAuthProbeStatusEnum{ noAuthProbeStatusEnumKey = map[string]NoAuthProbeStatusEnum{
"ACCEPT": NoAuthProbeStatusEnumACCEPT, "ACCEPT": NoAuthProbeStatusEnumACCEPT,
"DENY": NoAuthProbeStatusEnumDENY, "DENY": NoAuthProbeStatusEnumDENY,
"PROCESSING": NoAuthProbeStatusEnumPROCESSING, "PROCESSING": NoAuthProbeStatusEnumPROCESSING,
} }

View File

@ -2,12 +2,42 @@ package meta
import ( import (
"encoding/json" "encoding/json"
"git.loafle.net/overflow/commons-go/core/util" "git.loafle.net/overflow/commons-go/core/util"
) )
type MetaPortType struct { type MetaPortType 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"`
} }
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],
}
}

View File

@ -2,14 +2,14 @@ package meta
import ( import (
"encoding/json" "encoding/json"
"git.loafle.net/overflow/commons-go/core/util" "git.loafle.net/overflow/commons-go/core/util"
) )
type MetaProbeStatus struct { 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"`
} }
@ -21,14 +21,14 @@ const (
) )
var ( var (
metaProbeStatusEnumID = map[MetaProbeStatusEnum]string { metaProbeStatusEnumID = map[MetaProbeStatusEnum]string{
MetaProbeStatusEnumINITIAL: "INITIAL", MetaProbeStatusEnumINITIAL: "INITIAL",
MetaProbeStatusEnumNORMAL: "NORMAL", MetaProbeStatusEnumNORMAL: "NORMAL",
} }
metaProbeStatusEnumKey = map[string]MetaProbeStatusEnum{ metaProbeStatusEnumKey = map[string]MetaProbeStatusEnum{
"INITIAL": MetaProbeStatusEnumINITIAL, "INITIAL": MetaProbeStatusEnumINITIAL,
"NORMAL": MetaProbeStatusEnumNORMAL, "NORMAL": MetaProbeStatusEnumNORMAL,
} }
) )
@ -40,4 +40,4 @@ func ToMetaProbeStatus(v MetaProbeStatusEnum) *MetaProbeStatus {
return &MetaProbeStatus{ return &MetaProbeStatus{
Key: metaProbeStatusEnumID[v], Key: metaProbeStatusEnumID[v],
} }
} }

View File

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

View File

@ -8,9 +8,9 @@ import (
type MetaSensorDisplayItem struct { type MetaSensorDisplayItem struct {
ID json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
Key string `json:"key, omitempty"` Key string `json:"key,omitempty"`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
IsDefault bool `json:"isDefault,omitempty"` IsDefault bool `json:"isDefault,omitempty"`
MetaCrawler *MetaCrawler `json:"metaCrawler,omitempty"` MetaCrawler *MetaCrawler `json:"metaCrawler,omitempty"`
MetaSensorItemUnit *MetaSensorItemUnit `json:"metaSensorItemUnit,omitempty"` MetaSensorItemUnit *MetaSensorItemUnit `json:"metaSensorItemUnit,omitempty"`
MetaSensorItemType *MetaSensorItemType `json:"metaSensorItemType,omitempty"` MetaSensorItemType *MetaSensorItemType `json:"metaSensorItemType,omitempty"`

View File

@ -9,7 +9,7 @@ import (
type MetaSensorItemKey struct { type MetaSensorItemKey struct {
ID json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
Key string `json:"key,omitempty"` Key string `json:"key,omitempty"`
Name string `json:"name, omitempty"` Name string `json:"name,omitempty"`
Froms string `json:"froms,omitempty"` Froms string `json:"froms,omitempty"`
Option string `json:"option,omitempty"` Option string `json:"option,omitempty"`
MetaSensorItem *MetaSensorItem `json:"metaSensorItem,omitempty"` MetaSensorItem *MetaSensorItem `json:"metaSensorItem,omitempty"`

View File

@ -8,7 +8,7 @@ import (
type MetaSensorItemUnit struct { type MetaSensorItemUnit struct {
ID json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
Key string `json:"key, omitempty"` Key string `json:"key,omitempty"`
Unit string `json:"unit,omitempty"` Unit string `json:"unit,omitempty"`
Mark string `json:"mark,omitempty"` Mark string `json:"mark,omitempty"`
CreateDate *util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`

View File

@ -2,12 +2,13 @@ package meta
import ( import (
"encoding/json" "encoding/json"
"git.loafle.net/overflow/commons-go/core/util" "git.loafle.net/overflow/commons-go/core/util"
) )
type MetaSensorStatus struct { type MetaSensorStatus struct {
ID json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
Key string `json:"key, omitempty"` Key string `json:"key,omitempty"`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
CreateDate *util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -7,16 +7,16 @@ type MetaTargetHostType struct {
type MetaTargetHostTypeEnum int type MetaTargetHostTypeEnum int
const ( const (
MetaTargetHostTypeEnumUNKNOWN MetaTargetHostTypeEnum = 100 MetaTargetHostTypeEnumUNKNOWN MetaTargetHostTypeEnum = 100
) )
var ( var (
metaTargetHostTypeEnumID = map[MetaTargetHostTypeEnum]string{ metaTargetHostTypeEnumID = map[MetaTargetHostTypeEnum]string{
MetaTargetHostTypeEnumUNKNOWN: "UNKNOWN", MetaTargetHostTypeEnumUNKNOWN: "UNKNOWN",
} }
metaTargetHostTypeEnumKey = map[string]MetaTargetHostTypeEnum{ metaTargetHostTypeEnumKey = map[string]MetaTargetHostTypeEnum{
"UNKNOWN": MetaTargetHostTypeEnumUNKNOWN, "UNKNOWN": MetaTargetHostTypeEnumUNKNOWN,
} }
) )
@ -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

View File

@ -7,16 +7,16 @@ type MetaTargetServiceType struct {
type MetaTargetServiceTypeEnum int type MetaTargetServiceTypeEnum int
const ( const (
MetaTargetServiceTypeEnumUNKNOWN MetaTargetServiceTypeEnum = 1000 MetaTargetServiceTypeEnumUNKNOWN MetaTargetServiceTypeEnum = 1000
) )
var ( var (
metaTargetServiceTypeEnumID = map[MetaTargetServiceTypeEnum]string{ metaTargetServiceTypeEnumID = map[MetaTargetServiceTypeEnum]string{
MetaTargetServiceTypeEnumUNKNOWN: "UNKNOWN", MetaTargetServiceTypeEnumUNKNOWN: "UNKNOWN",
} }
metaTargetServiceTypeEnumKey = map[string]MetaTargetServiceTypeEnum{ metaTargetServiceTypeEnumKey = map[string]MetaTargetServiceTypeEnum{
"UNKNOWN": MetaTargetServiceTypeEnumUNKNOWN, "UNKNOWN": MetaTargetServiceTypeEnumUNKNOWN,
} }
) )
@ -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

View File

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

View File

@ -5,19 +5,20 @@ type MetaTargetZoneType struct {
} }
type MetaTargetZoneTypeEnum int type MetaTargetZoneTypeEnum int
const ( const (
MetaTargetZoneTypeEnumUNKNOWN MetaTargetZoneTypeEnum = 1 MetaTargetZoneTypeEnumUNKNOWN MetaTargetZoneTypeEnum = 1
MetaTargetZoneTypeEnumZONE MetaTargetZoneTypeEnum = 2 MetaTargetZoneTypeEnumZONE MetaTargetZoneTypeEnum = 2
) )
var ( var (
metaTargetZoneTypeEnumID = map[MetaTargetZoneTypeEnum]string{ metaTargetZoneTypeEnumID = map[MetaTargetZoneTypeEnum]string{
MetaTargetZoneTypeEnumUNKNOWN: "UNKNOWN", MetaTargetZoneTypeEnumUNKNOWN: "UNKNOWN",
MetaTargetZoneTypeEnumZONE: "ZONE", MetaTargetZoneTypeEnumZONE: "ZONE",
} }
metaTargetZoneTypeEnumKey = map[string]MetaTargetZoneTypeEnum{ metaTargetZoneTypeEnumKey = map[string]MetaTargetZoneTypeEnum{
"UNKNOWN": MetaTargetZoneTypeEnumUNKNOWN, "UNKNOWN": MetaTargetZoneTypeEnumUNKNOWN,
"ZONE": MetaTargetZoneTypeEnumZONE, "ZONE": MetaTargetZoneTypeEnumZONE,
} }
) )
@ -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

View File

@ -4,17 +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"
"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"`
TempProbeKey string `json:"tempProbeKey,omitempty"` TempProbeKey string `json:"tempProbeKey,omitempty"`
APIKey string `json:"apiKey,omitempty"` APIKey string `json:"apiKey,omitempty"`
ConnectDate *util.Timestamp `json:"connectDate,omitempty"` ConnectDate *util.Timestamp `json:"connectDate,omitempty"`

View File

@ -1,6 +0,0 @@
package noauthprobe
type NoAuthProbeDescription struct {
Host *NoAuthProbeDescriptionHost `json:"host,omitempty"`
Network *NoAuthProbeDescriptionNetwork `json:"network,omitempty"`
}

View File

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

View File

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

View File

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

View File

@ -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 {
@ -20,8 +20,8 @@ type Probe struct {
Cidr string `json:"cidr,omitempty"` Cidr string `json:"cidr,omitempty"`
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"`
} }

View File

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

View File

@ -10,12 +10,12 @@ import (
type Sensor struct { type Sensor struct {
ID json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
Target *target.Target `json:"target, omitempty"` Target *target.Target `json:"target,omitempty"`
Name string `json:"name, omitempty"` Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"` Description string `json:"description,omitempty"`
MetaSensorStatus *meta.MetaSensorStatus `json:"metaSensorStatus,omitempty"` MetaSensorStatus *meta.MetaSensorStatus `json:"metaSensorStatus,omitempty"`
MetaCrawler *meta.MetaCrawler `json:"metaCrawler,omitempty"` MetaCrawler *meta.MetaCrawler `json:"metaCrawler,omitempty"`
CrawlerInputItems string `json:"crawlerInputItems,omitempty"` CrawlerInputItems string `json:"crawlerInputItems,omitempty"`
ItemCount json.Number `json:"itemCount,omitempty"` ItemCount json.Number `json:"itemCount,omitempty"`
CreateDate *util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -7,8 +7,8 @@ import (
) )
type Connection struct { 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"`
} }

View File

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

View File

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

View File

@ -10,12 +10,12 @@ import (
) )
type Target struct { type Target struct {
ID json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
Infra *infra.Infra `json:"infra, omitempty"` Infra *infra.Infra `json:"infra,omitempty"`
MetaTargetType *meta.MetaTargetType `json:"metaTargetType, omitempty"` MetaTargetType *meta.MetaTargetType `json:"metaTargetType,omitempty"`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
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"`
} }