This commit is contained in:
crusader 2018-05-11 11:24:21 +09:00
parent 3ae9f53619
commit f547c15d95
33 changed files with 84 additions and 84 deletions

View File

@ -15,5 +15,5 @@ type Host struct {
Mac string `json:"mac,omitempty"` Mac string `json:"mac,omitempty"`
OS string `json:"os,omitempty"` OS string `json:"os,omitempty"`
DiscoveredDate util.Timestamp `json:"discoveredDate,omitempty"` DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
} }

View File

@ -16,7 +16,7 @@ type Port struct {
PortType constants.PortType `json:"portType,omitempty"` PortType constants.PortType `json:"portType,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"`
UDPLayer gopacket.Layer `json:"-"` UDPLayer gopacket.Layer `json:"-"`
} }

View File

@ -14,5 +14,5 @@ type Service struct {
CryptoType constants.CryptoType `json:"cryptoType,omitempty"` CryptoType constants.CryptoType `json:"cryptoType,omitempty"`
ServiceName string `json:"serviceName,omitempty"` ServiceName string `json:"serviceName,omitempty"`
DiscoveredDate util.Timestamp `json:"discoveredDate,omitempty"` DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
} }

View File

@ -15,7 +15,7 @@ type Zone struct {
Iface string `json:"iface,omitempty"` Iface string `json:"iface,omitempty"`
Mac string `json:"mac,omitempty"` Mac string `json:"mac,omitempty"`
DiscoveredDate util.Timestamp `json:"discoveredDate,omitempty"` DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"`
mtx sync.RWMutex `json:"-"` mtx sync.RWMutex `json:"-"`
} }

View File

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

View File

@ -8,8 +8,8 @@ import (
) )
type DomainMember struct { type DomainMember struct {
ID json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
Member *member.Member `json:"member,omitempty"` Member *member.Member `json:"member,omitempty"`
Domain *Domain `json:"domain,omitempty"` Domain *Domain `json:"domain,omitempty"`
} }

View File

@ -12,7 +12,7 @@ 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:"type,omitempty"` MetaInfraType *meta.MetaInfraType `json:"type,omitempty"`
CreateDate util.Timestamp `json:"createDate,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"` Target *target.Target `json:"target,omitempty"`
} }

View File

@ -6,8 +6,8 @@ import (
type InfraHost struct { type InfraHost struct {
Infra Infra
InfraOS *InfraOS `json:"os,omitempty"` InfraOS *InfraOS `json:"os,omitempty"`
IP string `json:"ip,omitempty"` IP string `json:"ip,omitempty"`
Mac string `json:"mac,omitempty"` Mac string `json:"mac,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -4,6 +4,6 @@ import "git.loafle.net/overflow/commons-go/core/util"
type InfraMachine struct { type InfraMachine struct {
Infra Infra
Meta string `json:"meta,omitempty"` Meta string `json:"meta,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -9,6 +9,6 @@ type InfraOS struct {
Infra Infra
InfraMachine *InfraMachine `json:"machine,omitempty"` InfraMachine *InfraMachine `json:"machine,omitempty"`
Meta string `json:"meta,omitempty"` Meta string `json:"meta,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
MetaInfraVendor *meta.MetaInfraVendor `json:"vendor,omitempty"` MetaInfraVendor *meta.MetaInfraVendor `json:"vendor,omitempty"`
} }

View File

@ -4,7 +4,7 @@ import "git.loafle.net/overflow/commons-go/core/util"
type InfraOSApplication struct { type InfraOSApplication struct {
Infra Infra
InfraOS *InfraOS `json:"os,omitempty"` InfraOS *InfraOS `json:"os,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

@ -6,7 +6,7 @@ import (
type InfraOSDaemon struct { type InfraOSDaemon struct {
Infra Infra
InfraOS *InfraOS `json:"os,omitempty"` InfraOS *InfraOS `json:"os,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

@ -10,7 +10,7 @@ import (
type InfraOSPort struct { type InfraOSPort struct {
Infra Infra
InfraOS *InfraOS `json:"os,omitempty"` InfraOS *InfraOS `json:"os,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
Port json.Number `json:"port,omitempty"` Port json.Number `json:"port,omitempty"`
PortType string `json:"portType,omitempty"` PortType string `json:"portType,omitempty"`
MetaInfraVendor *meta.MetaInfraVendor `json:"vendor,omitempty"` MetaInfraVendor *meta.MetaInfraVendor `json:"vendor,omitempty"`

View File

@ -13,6 +13,6 @@ type InfraServiceApplication struct {
PortType string `json:"portType,omitempty"` PortType string `json:"portType,omitempty"`
Port json.Number `json:"port,omitempty"` Port json.Number `json:"port,omitempty"`
MetaInfraVendor *meta.MetaInfraVendor `json:"vendor,omitempty"` MetaInfraVendor *meta.MetaInfraVendor `json:"vendor,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
TLSType bool `json:"tlsType,omitempty"` TLSType bool `json:"tlsType,omitempty"`
} }

View File

@ -14,7 +14,7 @@ type Member struct {
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"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
Status *meta.MetaMemberStatus `json:"status,omitempty"` Status *meta.MetaMemberStatus `json:"status,omitempty"`
SigninFailCount int `json:"signinFailCount,omitempty"` SigninFailCount int `json:"signinFailCount,omitempty"`
TotpType bool `json:"totpType,omitempty"` TotpType bool `json:"totpType,omitempty"`

View File

@ -7,8 +7,8 @@ import (
) )
type MetaContainer struct { type MetaContainer 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"`
Description string `json:"description,omitempty"` Description string `json:"description,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -7,9 +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"`
Description string `json:"description,omitempty"` Description string `json:"description,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
Container *MetaContainer `json:"container,omitempty"` Container *MetaContainer `json:"container,omitempty"`
} }

View File

@ -7,7 +7,7 @@ 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"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
} }

View File

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

View File

@ -7,8 +7,8 @@ import (
) )
type MetaInfraVendor struct { type MetaInfraVendor 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"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
InfraType *MetaInfraType `json:"infraType,omitempty"` InfraType *MetaInfraType `json:"infraType,omitempty"`
} }

View File

@ -7,8 +7,8 @@ import (
) )
type MetaProbeTaskType struct { type MetaProbeTaskType 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"`
Description string `json:"description,omitempty"` Description string `json:"description,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -11,6 +11,6 @@ type MetaSensorDisplayItem struct {
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
Crawler *MetaCrawler `json:"crawler,omitempty"` Crawler *MetaCrawler `json:"crawler,omitempty"`
Unit *MetaSensorItemUnit `json:"unit,omitempty"` Unit *MetaSensorItemUnit `json:"unit,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
ItemType *MetaSensorItemType `json:"itemType,omitempty"` ItemType *MetaSensorItemType `json:"itemType,omitempty"`
} }

View File

@ -11,5 +11,5 @@ type MetaSensorItem struct {
SensorItemType *MetaSensorItemType `json:"sensorItemType,omitempty"` SensorItemType *MetaSensorItemType `json:"sensorItemType,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

@ -13,6 +13,6 @@ type MetaSensorItemKey struct {
Froms string `json:"froms,omitempty"` Froms string `json:"froms,omitempty"`
Option string `json:"option,omitempty"` Option string `json:"option,omitempty"`
Crawler *MetaCrawler `json:"crawler,omitempty"` Crawler *MetaCrawler `json:"crawler,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
Unit *MetaSensorItemUnit `json:"unit,omitempty"` Unit *MetaSensorItemUnit `json:"unit,omitempty"`
} }

View File

@ -7,8 +7,8 @@ import (
) )
type MetaSensorItemType struct { type MetaSensorItemType 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"`
Description string `json:"description,omitempty"` Description string `json:"description,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
} }

View File

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

View File

@ -14,10 +14,10 @@ type NoAuthProbe struct {
Description string `json:"description,omitempty"` Description string `json:"description,omitempty"`
Status *meta.MetaNoAuthProbeStatus `json:"status,omitempty"` Status *meta.MetaNoAuthProbeStatus `json:"status,omitempty"`
TempProbeKey string `json:"tempProbeKey,omitempty"` TempProbeKey string `json:"tempProbeKey,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
APIKey string `json:"apiKey,omitempty"` APIKey string `json:"apiKey,omitempty"`
Domain *domain.DomainMember `json:"domain,omitempty"` Domain *domain.DomainMember `json:"domain,omitempty"`
Probe *probe.Probe `json:"probe,omitempty"` Probe *probe.Probe `json:"probe,omitempty"`
ConnectDate util.Timestamp `json:"connectDate,omitempty"` ConnectDate *util.Timestamp `json:"connectDate,omitempty"`
ConnectAddress string `json:"connectAddress,omitempty"` ConnectAddress string `json:"connectAddress,omitempty"`
} }

View File

@ -8,11 +8,11 @@ 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"` 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"`
ConfirmDate util.Timestamp `json:"confirmDate,omitempty"` ConfirmDate *util.Timestamp `json:"confirmDate,omitempty"`
Url string `json:"url,omitempty"` Url string `json:"url,omitempty"`
} }

View File

@ -13,15 +13,15 @@ type Probe struct {
ID json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
Status *meta.MetaProbeStatus `json:"status,omitempty"` Status *meta.MetaProbeStatus `json:"status,omitempty"`
Description string `json:"description,omitempty"` Description string `json:"description,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
Domain *domain.Domain `json:"domain,omitempty"` Domain *domain.Domain `json:"domain,omitempty"`
ProbeKey string `json:"probeKey,omitempty"` ProbeKey string `json:"probeKey,omitempty"`
EncryptionKey string `json:"encryptionKey,omitempty"` EncryptionKey string `json:"encryptionKey,omitempty"`
DisplayName string `json:"displayName,omitempty"` DisplayName string `json:"displayName,omitempty"`
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"`
ConnectDate util.Timestamp `json:"connectDate,omitempty"` ConnectDate *util.Timestamp `json:"connectDate,omitempty"`
ConnectAddress string `json:"connectAddress,omitempty"` ConnectAddress string `json:"connectAddress,omitempty"`
TargetCount int `json:"targetCount,omitempty"` TargetCount int `json:"targetCount,omitempty"`

View File

@ -12,9 +12,9 @@ type ProbeTask struct {
MetaProbeTaskType *meta.MetaProbeTaskType `json:"metaProbeTaskType,omitempty"` MetaProbeTaskType *meta.MetaProbeTaskType `json:"metaProbeTaskType,omitempty"`
Probe *Probe `json:"probe,omitempty"` Probe *Probe `json:"probe,omitempty"`
Data string `json:"data,omitempty"` Data string `json:"data,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
SendDate util.Timestamp `json:"sendDate,omitempty"` SendDate *util.Timestamp `json:"sendDate,omitempty"`
StartDate util.Timestamp `json:"startDate,omitempty"` StartDate *util.Timestamp `json:"startDate,omitempty"`
EndDate util.Timestamp `json:"endDate,omitempty"` EndDate *util.Timestamp `json:"endDate,omitempty"`
Succeed bool `json:"succeed,omitempty"` Succeed bool `json:"succeed,omitempty"`
} }

View File

@ -10,7 +10,7 @@ import (
type Sensor struct { type Sensor struct {
ID json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
Description string `json:"description,omitempty"` Description string `json:"description,omitempty"`
MetaSensorStatus *meta.MetaSensorStatus `json:"status,omitempty"` MetaSensorStatus *meta.MetaSensorStatus `json:"status,omitempty"`
Target *target.Target `json:"target,omitempty"` Target *target.Target `json:"target,omitempty"`

View File

@ -11,5 +11,5 @@ type SensorItem struct {
ID json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
Sensor *Sensor `json:"sensor,omitempty"` Sensor *Sensor `json:"sensor,omitempty"`
MetaSensorItem *meta.MetaSensorItem `json:"item,omitempty"` MetaSensorItem *meta.MetaSensorItem `json:"item,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -7,8 +7,8 @@ import (
) )
type Target struct { type Target struct {
ID json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"` CreateDate *util.Timestamp `json:"createDate,omitempty"`
DisplayName string `json:"displayName,omitempty"` DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"` Description string `json:"description,omitempty"`
} }