This commit is contained in:
crusader 2017-12-01 15:04:31 +09:00
parent 4de48935bd
commit 597eda88ed
57 changed files with 395 additions and 369 deletions

4
glide.lock generated Normal file
View File

@ -0,0 +1,4 @@
hash: 987b8e6d8a376bcd7d88b53e7e96589051b26a5398cc6679b26065d1a9f81239
updated: 2017-12-01T15:04:06.589083396+09:00
imports: []
testImports: []

1
glide.yaml Normal file
View File

@ -0,0 +1 @@
package: git.loafle.net/overflow/overflow_commons_go

View File

@ -0,0 +1,15 @@
package model
import (
"encoding/json"
domain "git.loafle.net/overflow/overflow_commons_go/modules/domain/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type APIKey struct {
ID json.Number `json:"id,Number,omitempty"`
APIKey string `json:"apiKey,omitempty"`
Date util.Timestamp `json:"createDate,omitempty"`
Domain *domain.Domain `json:"domain,omitempty"`
}

View File

@ -1,14 +0,0 @@
package model
import (
timestamp "git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
domain "git.loafle.net/overflow/overflow_commons_go/modules/domain/model"
"encoding/json"
)
type ApiKey struct {
Id json.Number `json:"id,Number,omitempty"`
ApiKey string `json:"apiKey,omitempty"`
Date timestamp.Timestamp `json:"createDate,omitempty"`
Domain *domain.Domain `json:"domain,omitempty"`
}

View File

@ -1,16 +1,17 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
target "git.loafle.net/overflow/overflow_commons_go/modules/target/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type AuthCrawler struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Crawler *meta.MetaCrawler `json:"crawler,omitempty"`
Target *target.Target `json:"target,omitempty"`
AuthJson string `json:"authJson,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
AuthJSON string `json:"authJson,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
}

View File

@ -5,7 +5,6 @@ type PublishMessage struct {
Message *PublishMessageBody `json:"message,omitempty"`
}
type PublishMessageBody struct {
Method string `json:"method,omitempty"`
Params []string `json:"params,omitempty"`

View File

@ -1,6 +1,4 @@
package model
type SessionMetadata struct {
}

View File

@ -1,8 +1,7 @@
package model
type Connection struct {
Ip string `json:"ip,omitempty"`
IP string `json:"ip,omitempty"`
Port string `json:"port,omitempty"`
PortType string `json:"portType,omitempty"`
SSL bool `json:"ssl,omitempty"`
@ -46,7 +45,7 @@ type Crawler struct {
}
type Config struct {
Id string `json:"id,omitempty"`
ID string `json:"id,omitempty"`
Target Target `json:"target,omitempty"`
Schedule Schedule `json:"schedule,omitempty"`
Crawler Crawler `json:"crawler,omitempty"`

View File

@ -1,12 +1,11 @@
package util
import "git.loafle.net/overflow/overflow_commons_go/modules/config/model"
import config "git.loafle.net/overflow/overflow_commons_go/modules/config/model"
func KeysToMap(keys []model.Keys) map[string]string {
func KeysToMap(keys []config.Keys) map[string]string {
m := make(map[string]string)
for _, key := range keys {
m[key.Key] = key.Metric
}

View File

@ -1,9 +1,9 @@
package model
type DiscoveryStartInfo struct {
StartIp string `json:"startIp,omitempty"`
EndIp string `json:"endIP,omitempty"`
ExcludeIp string `json:"excludeIp,omitempty"`
StartIP string `json:"startIp,omitempty"`
EndIP string `json:"endIP,omitempty"`
ExcludeIP string `json:"excludeIp,omitempty"`
StartPort string `json:"startPort,omitempty"`
EndPort string `json:"endPort,omitempty"`
Services []string `json:"services,omitempty"`

View File

@ -1,18 +1,18 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type Host struct {
Id json.Number `json:"id,Number,omitempty"`
Ip int64 `json:"ip,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
IP int64 `json:"ip,omitempty"`
Mac int64 `json:"mac,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
UpdateDate timestamp.Timestamp `json:"updateDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
UpdateDate util.Timestamp `json:"updateDate,omitempty"`
Os string `json:"os,omitempty"`
Target bool `json:"target,omitempty"`
Ports []*Port `json:"ports,omitempty"`
}

View File

@ -1,16 +1,17 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type Port struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Host *Host `json:"host,omitempty"`
PortType string `json:"portType,omitempty"`
PortNumber json.Number `json:"portNumber,omitempty"`
Services []Service `json:"services,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
UpdateDate timestamp.Timestamp `json:"updateDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
UpdateDate util.Timestamp `json:"updateDate,omitempty"`
}

View File

@ -1,17 +1,16 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type Service struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Port *Port `json:"port,omitempty"`
PortType string `json:"portType,omitempty"`
ServiceName string `json:"serviceName,omitempty"`
UpdateDate timestamp.Timestamp `json:"updateDate,omitempty"`
UpdateDate util.Timestamp `json:"updateDate,omitempty"`
Target bool `json:"target,omitempty"`
}

View File

@ -3,9 +3,9 @@ package model
import "encoding/json"
type Zone struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Network string `json:"network,omitempty"`
Ip string `json:"ip,omitempty"`
IP string `json:"ip,omitempty"`
Iface string `json:"iface,omitempty"`
Mac string `json:"mac,omitempty"`
FirstScanRage json.Number `json:"firstScanRange,omitempty"`

View File

@ -1,6 +1,6 @@
package net
import "git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
import util "git.loafle.net/overflow/overflow_commons_go/util"
type DiscoveryHost struct {
Zone *DiscoveryZone `json:"-"`
@ -8,9 +8,9 @@ type DiscoveryHost struct {
IP string `json:"ip"`
Mac string `json:"mac"`
Os string `json:"os,omitempty"`
OS string `json:"os,omitempty"`
Target bool `json:"target,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
UpdateDate timestamp.Timestamp `json:"updateDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
UpdateDate util.Timestamp `json:"updateDate,omitempty"`
}

View File

@ -3,13 +3,13 @@ package types
import (
"sync"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type DiscoveryHistory struct {
ID int `json:"id,omitempty"`
StartDate timestamp.Timestamp `json:"startDate"`
EndDate timestamp.Timestamp `json:"endDate"`
StartDate util.Timestamp `json:"startDate"`
EndDate util.Timestamp `json:"endDate"`
Result bool `json:"result"`
Zone *DiscoveryZone `json:"zone"`
}
@ -17,7 +17,7 @@ type DiscoveryHistory struct {
func NewDiscoveryHistory(zone *DiscoveryZone) DiscoveryHistory {
return DiscoveryHistory{
Zone: zone,
StartDate: timestamp.Now(),
StartDate: util.Now(),
}
}

View File

@ -4,14 +4,14 @@ import (
"net"
"sync"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type DiscoveryHost struct {
M *sync.RWMutex `json:"-"`
Ports_ map[string]*DiscoveryPort `json:"-"`
HostName string `json:"-"`
PortDiscoveryTime timestamp.Timestamp `json:"-"`
PortDiscoveryTime util.Timestamp `json:"-"`
Zone *DiscoveryZone `json:"-"`
Histories []*PortScanHistory `json:"-"`
@ -23,8 +23,8 @@ type DiscoveryHost struct {
IP string `json:"ip"`
Mac string `json:"mac"`
Ports []*DiscoveryPort `json:"ports"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
UpdateDate timestamp.Timestamp `json:"updateDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
UpdateDate util.Timestamp `json:"updateDate,omitempty"`
Os string `json:"os,omitempty"`
Target bool `json:"target,omitempty"`
@ -45,9 +45,9 @@ func (h *DiscoveryHost) GetPort(key string) *DiscoveryPort {
type HostScanHistory struct {
ID int `json:"id,omitempty"`
IP string `json:"ip"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
SendDate timestamp.Timestamp `json:"sendDate"`
ResultDate timestamp.Timestamp `json:"resultDate"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
SendDate util.Timestamp `json:"sendDate"`
ResultDate util.Timestamp `json:"resultDate"`
ResultType string `json:"resultType"`
Description string `json:"description"`
Zone *DiscoveryZone `json:"-"`
@ -64,8 +64,8 @@ func NewHost(ip net.IP, macAddr net.HardwareAddr) *DiscoveryHost {
Ports_: make(map[string]*DiscoveryPort, 100),
IP: ip.String(),
Mac: macAddr.String(),
CreateDate: timestamp.Now(),
UpdateDate: timestamp.Now(),
CreateDate: util.Now(),
UpdateDate: util.Now(),
}
return host
@ -74,7 +74,7 @@ func NewHost(ip net.IP, macAddr net.HardwareAddr) *DiscoveryHost {
func NewHostHistory(ip net.IP, resultType string, des string) *HostScanHistory {
hh := &HostScanHistory{
IP: ip.String(),
SendDate: timestamp.Now(),
SendDate: util.Now(),
ResultType: resultType,
Description: des,
}

View File

@ -3,15 +3,15 @@ package types
import (
"strconv"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type DiscoveryPort struct {
Port_ string `json:"-"`
ID int `json:"id,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
UpdateDate timestamp.Timestamp `json:"updateDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
UpdateDate util.Timestamp `json:"updateDate,omitempty"`
Host *DiscoveryHost `json:"-"`
Services []*DiscoveryService `json:"services"`
Histories []*ServiceScanHistory `json:"-"`
@ -24,14 +24,14 @@ type DiscoveryPort struct {
type PortScanHistory struct {
ID int `json:"id,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
Host *DiscoveryHost `json:"-"`
PortNumber uint16 `json:"portNumber"`
PortType string `json:"portType"`
DirectionType string `json:"directionType"`
Description string `json:"description"`
StartDate timestamp.Timestamp `json:"startDate"`
EndDate timestamp.Timestamp `json:"endDate"`
StartDate util.Timestamp `json:"startDate"`
EndDate util.Timestamp `json:"endDate"`
}
type PortMgr struct {
@ -49,7 +49,7 @@ func NewPort(port string, host *DiscoveryHost, portType string) *DiscoveryPort {
func NewPortScanHistory(host *DiscoveryHost, port uint16, portType string, directionType string, description string) *PortScanHistory {
rPortSH := &PortScanHistory{
CreateDate: timestamp.Now(),
CreateDate: util.Now(),
Host: host,
PortNumber: port,
PortType: portType,

View File

@ -1,13 +1,13 @@
package types
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type DiscoveryService struct {
ID int `json:"id,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
UpdateDate timestamp.Timestamp `json:"updateDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
UpdateDate util.Timestamp `json:"updateDate,omitempty"`
Port *DiscoveryPort `json:"-"`
PortType string `json:"portType"` /*tls or normal*/
ServiceName string `json:"serviceName"`
@ -27,7 +27,7 @@ const (
type ServiceScanHistory struct {
ID int `json:"id,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
Port *DiscoveryPort `json:"-"`
ServiceName string `json:"serviceName"`
Direction string `json:"direction"`
@ -36,7 +36,7 @@ type ServiceScanHistory struct {
func NewServiceScanHistory(port *DiscoveryPort, serviceName string, direction string, packet []byte) *ServiceScanHistory {
return &ServiceScanHistory{
CreateDate: timestamp.Now(),
CreateDate: util.Now(),
Port: port,
ServiceName: serviceName,
Direction: direction,

View File

@ -10,3 +10,5 @@ func NewServiceScanInfo(port *DiscoveryPort) *ServiceScanInfo {
s.Port = port
return s
}

View File

@ -1,12 +1,13 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type Domain struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Name string `json:"name,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
}

View File

@ -1,14 +1,15 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
member "git.loafle.net/overflow/overflow_commons_go/modules/member/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type DomainMember struct {
Id json.Number `json:"id,Number,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,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"`
}

View File

@ -1,15 +1,16 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
member "git.loafle.net/overflow/overflow_commons_go/modules/member/model"
"encoding/json"
member "git.loafle.net/overflow/overflow_commons_go/modules/member/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type EmailAuth struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
EmailAuthKey string `json:"emailAuthKey,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
AuthConfirmDate timestamp.Timestamp `json:"authConfirmDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
AuthConfirmDate util.Timestamp `json:"authConfirmDate,omitempty"`
Member *member.Member `json:"member,omitempty"`
}

View File

@ -2,16 +2,17 @@ package model
import (
"encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
domain "git.loafle.net/overflow/overflow_commons_go/modules/domain/model"
member "git.loafle.net/overflow/overflow_commons_go/modules/member/model"
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
probe "git.loafle.net/overflow/overflow_commons_go/modules/probe/model"
member "git.loafle.net/overflow/overflow_commons_go/modules/member/model"
domain "git.loafle.net/overflow/overflow_commons_go/modules/domain/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type History struct {
Id json.Number `json:"id,Number,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
Types *meta.MetaHistoryType `json:"type,omitempty"`
Message string `json:"message,omitempty"`
Probe *probe.Probe `json:"probe,omitempty"`

View File

@ -1,18 +1,18 @@
package model
import (
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
"encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
probe "git.loafle.net/overflow/overflow_commons_go/modules/probe/model"
target "git.loafle.net/overflow/overflow_commons_go/modules/target/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type Infra struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
MetaInfraType *meta.MetaInfraType `json:"type,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
Probe *probe.Probe `json:"probe,omitempty"`
Target *target.Target `json:"target,omitempty"`
}

View File

@ -1,14 +1,15 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type InfraHost struct {
Infra
InfraOS *InfraOS `json:"os,omitempty"`
Ip json.Number `json:"ip,omitempty"`
IP json.Number `json:"ip,omitempty"`
Mac json.Number `json:"mac,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
}

View File

@ -1,9 +1,9 @@
package model
import "git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
import util "git.loafle.net/overflow/overflow_commons_go/util"
type InfraMachine struct {
Infra
Meta string `json:"meta,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
}

View File

@ -2,13 +2,13 @@ package model
import (
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type InfraOS struct {
Infra
InfraMachine *InfraMachine `json:"machine,omitempty"`
Meta string `json:"meta,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
MetaInfraVendor *meta.MetaInfraVendor `json:"vendor,omitempty"`
}

View File

@ -1,10 +1,10 @@
package model
import "git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
import util "git.loafle.net/overflow/overflow_commons_go/util"
type InfraOSApplication struct {
Infra
InfraOS *InfraOS `json:"os,omitempty"`
Name string `json:"name,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
}

View File

@ -1,13 +1,12 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type InfraOSDaemon struct {
Infra
InfraOS *InfraOS `json:"os,omitempty"`
Name string `json:"name,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
}

View File

@ -1,17 +1,18 @@
package model
import (
"git.loafle.net/overflow/overflow_service/proxy/meta"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type InfraOSPort struct {
Infra
InfraOS *InfraOS `json:"os,omitempty"`
CreateDate timestamp.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"`
TlsType bool `json:"tlsType,omitempty"`
TLSType bool `json:"tlsType,omitempty"`
}

View File

@ -1,9 +1,10 @@
package model
import (
"git.loafle.net/overflow/overflow_service/proxy/meta"
"encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type InfraServiceApplication struct {
@ -12,6 +13,6 @@ type InfraServiceApplication struct {
PortType string `json:"portType,omitempty"`
Port json.Number `json:"port,omitempty"`
MetaInfraVendor *meta.MetaInfraVendor `json:"vendor,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
TlsType bool `json:"tlsType,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
TLSType bool `json:"tlsType,omitempty"`
}

View File

@ -1,18 +1,19 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
"encoding/json"
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type Member struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Email string `json:"email,omitempty"`
Pw string `json:"pw,omitempty"`
Name string `json:"name,omitempty"`
Phone string `json:"phone,omitempty"`
CompanyName string `json:"companyName,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
Status *meta.MetaMemberStatus `json:"status,omitempty"`
}

View File

@ -1,13 +1,14 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type MetaCrawler struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
}

View File

@ -2,11 +2,12 @@ package model
import (
"encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type MetaHistoryType struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Name string `json:"name,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
}

View File

@ -2,11 +2,12 @@ package model
import (
"encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type MetaInfraType struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Name string `json:"name,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
}

View File

@ -1,13 +1,14 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type MetaInfraVendor struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Name string `json:"name,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
MetaInfraType *MetaInfraType `json:"metaInfraType,omitempty"`
}

View File

@ -3,6 +3,6 @@ package model
import "encoding/json"
type MetaMemberStatus struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Name string `json:"name,omitempty"`
}

View File

@ -3,6 +3,6 @@ package model
import "encoding/json"
type MetaNoAuthProbeStatus struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Name string `json:"name,omitempty"`
}

View File

@ -3,6 +3,6 @@ package model
import "encoding/json"
type MetaProbeStatus struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Name string `json:"name,omitempty"`
}

View File

@ -2,12 +2,13 @@ package model
import (
"encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type MetaProbeTaskType struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
}

View File

@ -2,14 +2,15 @@ package model
import (
"encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type MetaSensorDisplayItem struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Name string `json:"name,omitempty"`
Crawler *MetaCrawler `json:"crawler,omitempty"`
Unit *MetaSensorItemUnit `json:"unit,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
ItemType *MetaSensorItemType `json:"itemType,omitempty"`
}

View File

@ -2,13 +2,14 @@ package model
import (
"encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type MetaSensorItem struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
MetaSensorItemType *MetaSensorItemType `json:"metaSensorItemType,omitempty"`
Key string `json:"key,omitempty"`
Name string `json:"name,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
}

View File

@ -3,16 +3,16 @@ package model
import (
"encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type MetaSensorItemKey struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Item *MetaSensorItem `json:"item,omitempty"`
Key string `json:"key,omitempty"`
Froms string `json:"froms,omitempty"`
Option string `json:"option,omitempty"`
Crawler *MetaCrawler `json:"crawler,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
Unit *MetaSensorItemUnit `json:"unit,omitempty"`
}

View File

@ -1,13 +1,14 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type MetaSensorItemType struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
}

View File

@ -1,13 +1,14 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type MetaSensorItemUnit struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Unit string `json:"unit,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
Mark string `json:"mark,omitempty"`
}

View File

@ -3,6 +3,6 @@ package model
import "encoding/json"
type MetaSensorStatus struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Name string `json:"name,omitempty"`
}

View File

@ -1,20 +1,21 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
domain "git.loafle.net/overflow/overflow_commons_go/modules/domain/model"
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
"encoding/json"
probe "git.loafle.net/overflow/overflow_commons_go/modules/probe/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type NoAuthProbe struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Description string `json:"description,omitempty"`
Status *meta.MetaNoAuthProbeStatus `json:"status,omitempty"`
TempProbeKey string `json:"tempProbeKey,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
ApiKey string `json:"apiKey,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
APIKey string `json:"apiKey,omitempty"`
Domain *domain.DomainMember `json:"domain,omitempty"`
Probe *probe.Probe `json:"probe,omitempty"`
}

View File

@ -1,17 +1,18 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
"git.loafle.net/overflow/overflow_service/proxy/member"
member "git.loafle.net/overflow/overflow_commons_go/modules/member/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type Notification struct {
Id json.Number `json:"id,Number,omitempty"`
CreateDate timestamp.Timestamp `json:"date,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 timestamp.Timestamp `json:"confirmDate,omitempty"`
ConfirmDate util.Timestamp `json:"confirmDate,omitempty"`
Url string `json:"url,omitempty"`
}

View File

@ -1,17 +1,18 @@
package model
import (
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
domain "git.loafle.net/overflow/overflow_commons_go/modules/domain/model"
member "git.loafle.net/overflow/overflow_commons_go/modules/member/model"
"encoding/json"
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type Probe struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Status *meta.MetaProbeStatus `json:"status,omitempty"`
CreateDate timestamp.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"`
@ -19,6 +20,6 @@ type Probe struct {
SensorCount int `json:"sensorCount,omitempty"`
DisplayName string `json:"displayName,omitempty"`
Cidr string `json:"cidr,omitempty"`
AuthorizeDate timestamp.Timestamp `json:"authorizeDate,omitempty"`
AuthorizeDate util.Timestamp `json:"authorizeDate,omitempty"`
AuthorizeMember *member.Member `json:"authorizeMember,omitempty"`
}

View File

@ -2,18 +2,19 @@ package model
import (
"encoding/json"
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type ProbeTask struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
MetaProbeTaskType *meta.MetaProbeTaskType `json:"metaProbeTaskType,omitempty"`
Probe *Probe `json:"probe,omitempty"`
Data string `json:"data,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
SendDate timestamp.Timestamp `json:"sendDate,omitempty"`
StartDate timestamp.Timestamp `json:"startDate,omitempty"`
EndDate timestamp.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"`
}

View File

@ -1,15 +1,16 @@
package model
import (
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
"git.loafle.net/overflow/overflow_service/proxy/target"
"encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
target "git.loafle.net/overflow/overflow_commons_go/modules/target/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type Sensor struct {
Id json.Number `json:"id,Number,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
Description string `json:"description,omitempty"`
MetaSensorStatus *meta.MetaSensorStatus `json:"status,omitempty"`
Target *target.Target `json:"target,omitempty"`

View File

@ -1,14 +1,15 @@
package model
import (
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
"encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type SensorItem struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
Sensor *Sensor `json:"sensor,omitempty"`
MetaSensorItem *meta.MetaSensorItem `json:"item,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
}

View File

@ -1,12 +1,13 @@
package model
import (
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
"encoding/json"
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
)
type SensorItemDependency struct {
Id json.Number `json:"id,Number,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
DisplayItem *meta.MetaSensorDisplayItem `json:"displayItem,omitempty"`
SensorItem *meta.MetaSensorItemKey `json:"sensorItem,omitempty"`
}

View File

@ -1,15 +1,14 @@
package model
import (
"encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
)
type Target struct {
Id json.Number `json:"id,Number,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
ID json.Number `json:"id,Number,omitempty"`
CreateDate util.Timestamp `json:"createDate,omitempty"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
}

View File

@ -1,4 +1,4 @@
package timestamp
package util
import (
"fmt"