From f547c15d95c4d22e14dd33a19a43ab03b29b93d6 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 11 May 2018 11:24:21 +0900 Subject: [PATCH] ing --- model/discovery/Host.go | 2 +- model/discovery/Port.go | 2 +- model/discovery/Service.go | 2 +- model/discovery/Zone.go | 2 +- model/domain/Domain.go | 6 +++--- model/domain/DomainMember.go | 8 ++++---- model/infra/Infra.go | 2 +- model/infra/InfraHost.go | 8 ++++---- model/infra/InfraMachine.go | 4 ++-- model/infra/InfraOS.go | 2 +- model/infra/InfraOSApplication.go | 6 +++--- model/infra/InfraOSDaemon.go | 6 +++--- model/infra/InfraOSPort.go | 2 +- model/infra/InfraServiceApplication.go | 2 +- model/member/Member.go | 2 +- model/meta/MetaContainer.go | 8 ++++---- model/meta/MetaCrawler.go | 10 +++++----- model/meta/MetaHistoryType.go | 6 +++--- model/meta/MetaInfraType.go | 6 +++--- model/meta/MetaInfraVendor.go | 8 ++++---- model/meta/MetaProbeTaskType.go | 8 ++++---- model/meta/MetaSensorDisplayItem.go | 2 +- model/meta/MetaSensorItem.go | 2 +- model/meta/MetaSensorItemKey.go | 2 +- model/meta/MetaSensorItemType.go | 8 ++++---- model/meta/MetaSensorItemUnit.go | 8 ++++---- model/noauthprobe/NoAuthProbe.go | 4 ++-- model/notification/Notification.go | 14 +++++++------- model/probe/Probe.go | 6 +++--- model/probe/ProbeTask.go | 8 ++++---- model/sensor/Sensor.go | 2 +- model/sensor/SensorItem.go | 2 +- model/target/Target.go | 8 ++++---- 33 files changed, 84 insertions(+), 84 deletions(-) diff --git a/model/discovery/Host.go b/model/discovery/Host.go index 791d800..ac05365 100644 --- a/model/discovery/Host.go +++ b/model/discovery/Host.go @@ -15,5 +15,5 @@ type Host struct { Mac string `json:"mac,omitempty"` OS string `json:"os,omitempty"` - DiscoveredDate util.Timestamp `json:"discoveredDate,omitempty"` + DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"` } diff --git a/model/discovery/Port.go b/model/discovery/Port.go index 28ac1cb..d49a562 100644 --- a/model/discovery/Port.go +++ b/model/discovery/Port.go @@ -16,7 +16,7 @@ type Port struct { PortType constants.PortType `json:"portType,omitempty"` PortNumber json.Number `json:"portNumber,omitempty"` - DiscoveredDate util.Timestamp `json:"discoveredDate,omitempty"` + DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"` UDPLayer gopacket.Layer `json:"-"` } diff --git a/model/discovery/Service.go b/model/discovery/Service.go index 5465e9c..a6c56fc 100644 --- a/model/discovery/Service.go +++ b/model/discovery/Service.go @@ -14,5 +14,5 @@ type Service struct { CryptoType constants.CryptoType `json:"cryptoType,omitempty"` ServiceName string `json:"serviceName,omitempty"` - DiscoveredDate util.Timestamp `json:"discoveredDate,omitempty"` + DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"` } diff --git a/model/discovery/Zone.go b/model/discovery/Zone.go index 9458087..50cc4fa 100644 --- a/model/discovery/Zone.go +++ b/model/discovery/Zone.go @@ -15,7 +15,7 @@ type Zone struct { Iface string `json:"iface,omitempty"` Mac string `json:"mac,omitempty"` - DiscoveredDate util.Timestamp `json:"discoveredDate,omitempty"` + DiscoveredDate *util.Timestamp `json:"discoveredDate,omitempty"` mtx sync.RWMutex `json:"-"` } diff --git a/model/domain/Domain.go b/model/domain/Domain.go index a58526b..91aa489 100644 --- a/model/domain/Domain.go +++ b/model/domain/Domain.go @@ -7,7 +7,7 @@ import ( ) type Domain struct { - ID json.Number `json:"id,Number,omitempty"` - Name string `json:"name,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + ID json.Number `json:"id,Number,omitempty"` + Name string `json:"name,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` } diff --git a/model/domain/DomainMember.go b/model/domain/DomainMember.go index 379a575..1d19559 100644 --- a/model/domain/DomainMember.go +++ b/model/domain/DomainMember.go @@ -8,8 +8,8 @@ import ( ) type DomainMember struct { - ID json.Number `json:"id,Number,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` - Member *member.Member `json:"member,omitempty"` - Domain *Domain `json:"domain,omitempty"` + ID json.Number `json:"id,Number,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` + Member *member.Member `json:"member,omitempty"` + Domain *Domain `json:"domain,omitempty"` } diff --git a/model/infra/Infra.go b/model/infra/Infra.go index 05c9348..b4590f6 100644 --- a/model/infra/Infra.go +++ b/model/infra/Infra.go @@ -12,7 +12,7 @@ import ( type Infra struct { ID json.Number `json:"id,Number,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"` Target *target.Target `json:"target,omitempty"` } diff --git a/model/infra/InfraHost.go b/model/infra/InfraHost.go index c564b0e..596c7fb 100644 --- a/model/infra/InfraHost.go +++ b/model/infra/InfraHost.go @@ -6,8 +6,8 @@ import ( type InfraHost struct { Infra - InfraOS *InfraOS `json:"os,omitempty"` - IP string `json:"ip,omitempty"` - Mac string `json:"mac,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + InfraOS *InfraOS `json:"os,omitempty"` + IP string `json:"ip,omitempty"` + Mac string `json:"mac,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` } diff --git a/model/infra/InfraMachine.go b/model/infra/InfraMachine.go index c72ca93..9429e01 100644 --- a/model/infra/InfraMachine.go +++ b/model/infra/InfraMachine.go @@ -4,6 +4,6 @@ import "git.loafle.net/overflow/commons-go/core/util" type InfraMachine struct { Infra - Meta string `json:"meta,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + Meta string `json:"meta,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` } diff --git a/model/infra/InfraOS.go b/model/infra/InfraOS.go index 7623b43..232368b 100644 --- a/model/infra/InfraOS.go +++ b/model/infra/InfraOS.go @@ -9,6 +9,6 @@ type InfraOS struct { Infra InfraMachine *InfraMachine `json:"machine,omitempty"` Meta string `json:"meta,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` MetaInfraVendor *meta.MetaInfraVendor `json:"vendor,omitempty"` } diff --git a/model/infra/InfraOSApplication.go b/model/infra/InfraOSApplication.go index 38ccb1d..95d0182 100644 --- a/model/infra/InfraOSApplication.go +++ b/model/infra/InfraOSApplication.go @@ -4,7 +4,7 @@ import "git.loafle.net/overflow/commons-go/core/util" type InfraOSApplication struct { Infra - InfraOS *InfraOS `json:"os,omitempty"` - Name string `json:"name,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + InfraOS *InfraOS `json:"os,omitempty"` + Name string `json:"name,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` } diff --git a/model/infra/InfraOSDaemon.go b/model/infra/InfraOSDaemon.go index 9acaf12..20abd35 100644 --- a/model/infra/InfraOSDaemon.go +++ b/model/infra/InfraOSDaemon.go @@ -6,7 +6,7 @@ import ( type InfraOSDaemon struct { Infra - InfraOS *InfraOS `json:"os,omitempty"` - Name string `json:"name,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + InfraOS *InfraOS `json:"os,omitempty"` + Name string `json:"name,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` } diff --git a/model/infra/InfraOSPort.go b/model/infra/InfraOSPort.go index 9c32ae1..71049f7 100644 --- a/model/infra/InfraOSPort.go +++ b/model/infra/InfraOSPort.go @@ -10,7 +10,7 @@ import ( type InfraOSPort struct { Infra InfraOS *InfraOS `json:"os,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` Port json.Number `json:"port,omitempty"` PortType string `json:"portType,omitempty"` MetaInfraVendor *meta.MetaInfraVendor `json:"vendor,omitempty"` diff --git a/model/infra/InfraServiceApplication.go b/model/infra/InfraServiceApplication.go index c104e7c..d769036 100644 --- a/model/infra/InfraServiceApplication.go +++ b/model/infra/InfraServiceApplication.go @@ -13,6 +13,6 @@ type InfraServiceApplication struct { PortType string `json:"portType,omitempty"` Port json.Number `json:"port,omitempty"` MetaInfraVendor *meta.MetaInfraVendor `json:"vendor,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` TLSType bool `json:"tlsType,omitempty"` } diff --git a/model/member/Member.go b/model/member/Member.go index 24ef033..05b45bd 100644 --- a/model/member/Member.go +++ b/model/member/Member.go @@ -14,7 +14,7 @@ type Member struct { Name string `json:"name,omitempty"` Phone string `json:"phone,omitempty"` CompanyName string `json:"companyName,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` Status *meta.MetaMemberStatus `json:"status,omitempty"` SigninFailCount int `json:"signinFailCount,omitempty"` TotpType bool `json:"totpType,omitempty"` diff --git a/model/meta/MetaContainer.go b/model/meta/MetaContainer.go index bbcbe14..1a4772a 100644 --- a/model/meta/MetaContainer.go +++ b/model/meta/MetaContainer.go @@ -7,8 +7,8 @@ import ( ) type MetaContainer struct { - ID json.Number `json:"id,Number,omitempty"` - Name string `json:"name,omitempty"` - Description string `json:"description,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + ID json.Number `json:"id,Number,omitempty"` + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` } diff --git a/model/meta/MetaCrawler.go b/model/meta/MetaCrawler.go index 2f57395..0c1755f 100644 --- a/model/meta/MetaCrawler.go +++ b/model/meta/MetaCrawler.go @@ -7,9 +7,9 @@ import ( ) type MetaCrawler struct { - ID json.Number `json:"id,Number,omitempty"` - Name string `json:"name,omitempty"` - Description string `json:"description,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` - Container *MetaContainer `json:"container,omitempty"` + ID json.Number `json:"id,Number,omitempty"` + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` + Container *MetaContainer `json:"container,omitempty"` } diff --git a/model/meta/MetaHistoryType.go b/model/meta/MetaHistoryType.go index b000282..e70e54a 100644 --- a/model/meta/MetaHistoryType.go +++ b/model/meta/MetaHistoryType.go @@ -7,7 +7,7 @@ import ( ) type MetaHistoryType struct { - ID json.Number `json:"id,Number,omitempty"` - Name string `json:"name,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + ID json.Number `json:"id,Number,omitempty"` + Name string `json:"name,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` } diff --git a/model/meta/MetaInfraType.go b/model/meta/MetaInfraType.go index 99ac0d1..d9ee9fc 100644 --- a/model/meta/MetaInfraType.go +++ b/model/meta/MetaInfraType.go @@ -7,7 +7,7 @@ import ( ) type MetaInfraType struct { - ID json.Number `json:"id,Number,omitempty"` - Name string `json:"name,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + ID json.Number `json:"id,Number,omitempty"` + Name string `json:"name,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` } diff --git a/model/meta/MetaInfraVendor.go b/model/meta/MetaInfraVendor.go index cbbc554..b3f8281 100644 --- a/model/meta/MetaInfraVendor.go +++ b/model/meta/MetaInfraVendor.go @@ -7,8 +7,8 @@ import ( ) type MetaInfraVendor struct { - ID json.Number `json:"id,Number,omitempty"` - Name string `json:"name,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` - InfraType *MetaInfraType `json:"infraType,omitempty"` + ID json.Number `json:"id,Number,omitempty"` + Name string `json:"name,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` + InfraType *MetaInfraType `json:"infraType,omitempty"` } diff --git a/model/meta/MetaProbeTaskType.go b/model/meta/MetaProbeTaskType.go index f880a80..8b50c9d 100644 --- a/model/meta/MetaProbeTaskType.go +++ b/model/meta/MetaProbeTaskType.go @@ -7,8 +7,8 @@ import ( ) 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"` + ID json.Number `json:"id,Number,omitempty"` + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` } diff --git a/model/meta/MetaSensorDisplayItem.go b/model/meta/MetaSensorDisplayItem.go index 332a098..fe531c3 100644 --- a/model/meta/MetaSensorDisplayItem.go +++ b/model/meta/MetaSensorDisplayItem.go @@ -11,6 +11,6 @@ type MetaSensorDisplayItem struct { Name string `json:"name,omitempty"` Crawler *MetaCrawler `json:"crawler,omitempty"` Unit *MetaSensorItemUnit `json:"unit,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` ItemType *MetaSensorItemType `json:"itemType,omitempty"` } diff --git a/model/meta/MetaSensorItem.go b/model/meta/MetaSensorItem.go index 8d9645b..5d6ba61 100644 --- a/model/meta/MetaSensorItem.go +++ b/model/meta/MetaSensorItem.go @@ -11,5 +11,5 @@ type MetaSensorItem struct { SensorItemType *MetaSensorItemType `json:"sensorItemType,omitempty"` Key string `json:"key,omitempty"` Name string `json:"name,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` } diff --git a/model/meta/MetaSensorItemKey.go b/model/meta/MetaSensorItemKey.go index 2c3621d..da907d0 100644 --- a/model/meta/MetaSensorItemKey.go +++ b/model/meta/MetaSensorItemKey.go @@ -13,6 +13,6 @@ type MetaSensorItemKey struct { Froms string `json:"froms,omitempty"` Option string `json:"option,omitempty"` Crawler *MetaCrawler `json:"crawler,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` Unit *MetaSensorItemUnit `json:"unit,omitempty"` } diff --git a/model/meta/MetaSensorItemType.go b/model/meta/MetaSensorItemType.go index cad0a70..2638fec 100644 --- a/model/meta/MetaSensorItemType.go +++ b/model/meta/MetaSensorItemType.go @@ -7,8 +7,8 @@ import ( ) type MetaSensorItemType struct { - ID json.Number `json:"id,Number,omitempty"` - Name string `json:"name,omitempty"` - Description string `json:"description,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + ID json.Number `json:"id,Number,omitempty"` + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` } diff --git a/model/meta/MetaSensorItemUnit.go b/model/meta/MetaSensorItemUnit.go index 9529a16..f0b93ed 100644 --- a/model/meta/MetaSensorItemUnit.go +++ b/model/meta/MetaSensorItemUnit.go @@ -7,8 +7,8 @@ import ( ) type MetaSensorItemUnit struct { - ID json.Number `json:"id,Number,omitempty"` - Unit string `json:"unit,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` - Mark string `json:"mark,omitempty"` + ID json.Number `json:"id,Number,omitempty"` + Unit string `json:"unit,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` + Mark string `json:"mark,omitempty"` } diff --git a/model/noauthprobe/NoAuthProbe.go b/model/noauthprobe/NoAuthProbe.go index 2ecedaf..601b848 100644 --- a/model/noauthprobe/NoAuthProbe.go +++ b/model/noauthprobe/NoAuthProbe.go @@ -14,10 +14,10 @@ type NoAuthProbe struct { Description string `json:"description,omitempty"` Status *meta.MetaNoAuthProbeStatus `json:"status,omitempty"` TempProbeKey string `json:"tempProbeKey,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` APIKey string `json:"apiKey,omitempty"` Domain *domain.DomainMember `json:"domain,omitempty"` Probe *probe.Probe `json:"probe,omitempty"` - ConnectDate util.Timestamp `json:"connectDate,omitempty"` + ConnectDate *util.Timestamp `json:"connectDate,omitempty"` ConnectAddress string `json:"connectAddress,omitempty"` } diff --git a/model/notification/Notification.go b/model/notification/Notification.go index d233aec..eb7e8a7 100644 --- a/model/notification/Notification.go +++ b/model/notification/Notification.go @@ -8,11 +8,11 @@ import ( ) type Notification struct { - ID json.Number `json:"id,Number,omitempty"` - CreateDate util.Timestamp `json:"date,omitempty"` - Title string `json:"title,omitempty"` - Message string `json:"message,omitempty"` - Member *member.Member `json:"member,omitempty"` - ConfirmDate util.Timestamp `json:"confirmDate,omitempty"` - Url string `json:"url,omitempty"` + ID json.Number `json:"id,Number,omitempty"` + CreateDate *util.Timestamp `json:"date,omitempty"` + Title string `json:"title,omitempty"` + Message string `json:"message,omitempty"` + Member *member.Member `json:"member,omitempty"` + ConfirmDate *util.Timestamp `json:"confirmDate,omitempty"` + Url string `json:"url,omitempty"` } diff --git a/model/probe/Probe.go b/model/probe/Probe.go index c1944e9..80a7fc4 100644 --- a/model/probe/Probe.go +++ b/model/probe/Probe.go @@ -13,15 +13,15 @@ type Probe struct { ID json.Number `json:"id,Number,omitempty"` Status *meta.MetaProbeStatus `json:"status,omitempty"` Description string `json:"description,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` Domain *domain.Domain `json:"domain,omitempty"` ProbeKey string `json:"probeKey,omitempty"` EncryptionKey string `json:"encryptionKey,omitempty"` DisplayName string `json:"displayName,omitempty"` Cidr string `json:"cidr,omitempty"` - AuthorizeDate util.Timestamp `json:"authorizeDate,omitempty"` + AuthorizeDate *util.Timestamp `json:"authorizeDate,omitempty"` AuthorizeMember *member.Member `json:"authorizeMember,omitempty"` - ConnectDate util.Timestamp `json:"connectDate,omitempty"` + ConnectDate *util.Timestamp `json:"connectDate,omitempty"` ConnectAddress string `json:"connectAddress,omitempty"` TargetCount int `json:"targetCount,omitempty"` diff --git a/model/probe/ProbeTask.go b/model/probe/ProbeTask.go index a95f42f..e38010d 100644 --- a/model/probe/ProbeTask.go +++ b/model/probe/ProbeTask.go @@ -12,9 +12,9 @@ type ProbeTask struct { 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"` + 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"` } diff --git a/model/sensor/Sensor.go b/model/sensor/Sensor.go index c11e9fb..011f367 100644 --- a/model/sensor/Sensor.go +++ b/model/sensor/Sensor.go @@ -10,7 +10,7 @@ import ( type Sensor struct { ID json.Number `json:"id,Number,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` Description string `json:"description,omitempty"` MetaSensorStatus *meta.MetaSensorStatus `json:"status,omitempty"` Target *target.Target `json:"target,omitempty"` diff --git a/model/sensor/SensorItem.go b/model/sensor/SensorItem.go index a140389..9f8a5f9 100644 --- a/model/sensor/SensorItem.go +++ b/model/sensor/SensorItem.go @@ -11,5 +11,5 @@ type SensorItem struct { ID json.Number `json:"id,Number,omitempty"` Sensor *Sensor `json:"sensor,omitempty"` MetaSensorItem *meta.MetaSensorItem `json:"item,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` } diff --git a/model/target/Target.go b/model/target/Target.go index 0ba1de2..8202f9c 100644 --- a/model/target/Target.go +++ b/model/target/Target.go @@ -7,8 +7,8 @@ import ( ) type Target struct { - ID json.Number `json:"id,Number,omitempty"` - CreateDate util.Timestamp `json:"createDate,omitempty"` - DisplayName string `json:"displayName,omitempty"` - Description string `json:"description,omitempty"` + ID json.Number `json:"id,Number,omitempty"` + CreateDate *util.Timestamp `json:"createDate,omitempty"` + DisplayName string `json:"displayName,omitempty"` + Description string `json:"description,omitempty"` }