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 package model
import ( import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json" "encoding/json"
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model" meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
target "git.loafle.net/overflow/overflow_commons_go/modules/target/model" target "git.loafle.net/overflow/overflow_commons_go/modules/target/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
) )
type AuthCrawler struct { type AuthCrawler struct {
Id json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
Crawler *meta.MetaCrawler `json:"crawler,omitempty"` Crawler *meta.MetaCrawler `json:"crawler,omitempty"`
Target *target.Target `json:"target,omitempty"` Target *target.Target `json:"target,omitempty"`
AuthJson string `json:"authJson,omitempty"` AuthJSON string `json:"authJson,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
} }

View File

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

View File

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

View File

@ -1,8 +1,7 @@
package model package model
type Connection struct { type Connection struct {
Ip string `json:"ip,omitempty"` IP string `json:"ip,omitempty"`
Port string `json:"port,omitempty"` Port string `json:"port,omitempty"`
PortType string `json:"portType,omitempty"` PortType string `json:"portType,omitempty"`
SSL bool `json:"ssl,omitempty"` SSL bool `json:"ssl,omitempty"`
@ -46,7 +45,7 @@ type Crawler struct {
} }
type Config struct { type Config struct {
Id string `json:"id,omitempty"` ID string `json:"id,omitempty"`
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"`

View File

@ -1,12 +1,11 @@
package util 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) m := make(map[string]string)
for _, key := range keys { for _, key := range keys {
m[key.Key] = key.Metric m[key.Key] = key.Metric
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
package net 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 { type DiscoveryHost struct {
Zone *DiscoveryZone `json:"-"` Zone *DiscoveryZone `json:"-"`
@ -8,9 +8,9 @@ type DiscoveryHost struct {
IP string `json:"ip"` IP string `json:"ip"`
Mac string `json:"mac"` Mac string `json:"mac"`
Os string `json:"os,omitempty"` OS string `json:"os,omitempty"`
Target bool `json:"target,omitempty"` Target bool `json:"target,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
UpdateDate timestamp.Timestamp `json:"updateDate,omitempty"` UpdateDate util.Timestamp `json:"updateDate,omitempty"`
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,12 +1,13 @@
package model package model
import ( import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json" "encoding/json"
util "git.loafle.net/overflow/overflow_commons_go/util"
) )
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 timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
} }

View File

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

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

View File

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

View File

@ -1,18 +1,18 @@
package model package model
import ( import (
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
"encoding/json" "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" probe "git.loafle.net/overflow/overflow_commons_go/modules/probe/model"
target "git.loafle.net/overflow/overflow_commons_go/modules/target/model" target "git.loafle.net/overflow/overflow_commons_go/modules/target/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
) )
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 timestamp.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

@ -1,14 +1,15 @@
package model package model
import ( import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json" "encoding/json"
util "git.loafle.net/overflow/overflow_commons_go/util"
) )
type InfraHost struct { type InfraHost struct {
Infra Infra
InfraOS *InfraOS `json:"os,omitempty"` InfraOS *InfraOS `json:"os,omitempty"`
Ip json.Number `json:"ip,omitempty"` IP json.Number `json:"ip,omitempty"`
Mac json.Number `json:"mac,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 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 { type InfraMachine struct {
Infra Infra
Meta string `json:"meta,omitempty"` 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 ( import (
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model" 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 { 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 timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
MetaInfraVendor *meta.MetaInfraVendor `json:"vendor,omitempty"` MetaInfraVendor *meta.MetaInfraVendor `json:"vendor,omitempty"`
} }

View File

@ -1,10 +1,10 @@
package model 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 { 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 timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -1,13 +1,12 @@
package model package model
import ( import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model" util "git.loafle.net/overflow/overflow_commons_go/util"
) )
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 timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
} }

View File

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

View File

@ -1,9 +1,10 @@
package model package model
import ( import (
"git.loafle.net/overflow/overflow_service/proxy/meta"
"encoding/json" "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 { type InfraServiceApplication struct {
@ -12,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 timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
TlsType bool `json:"tlsType,omitempty"` TLSType bool `json:"tlsType,omitempty"`
} }

View File

@ -1,18 +1,19 @@
package model package model
import ( import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
"encoding/json" "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 { 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"` Pw string `json:"pw,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"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
Status *meta.MetaMemberStatus `json:"status,omitempty"` Status *meta.MetaMemberStatus `json:"status,omitempty"`
} }

View File

@ -1,13 +1,14 @@
package model package model
import ( import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json" "encoding/json"
util "git.loafle.net/overflow/overflow_commons_go/util"
) )
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 timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -2,11 +2,12 @@ package model
import ( import (
"encoding/json" "encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
) )
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 timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -2,11 +2,12 @@ package model
import ( import (
"encoding/json" "encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
) )
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 timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -1,13 +1,14 @@
package model package model
import ( import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json" "encoding/json"
util "git.loafle.net/overflow/overflow_commons_go/util"
) )
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 timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
MetaInfraType *MetaInfraType `json:"metaInfraType,omitempty"` MetaInfraType *MetaInfraType `json:"metaInfraType,omitempty"`
} }

View File

@ -3,6 +3,6 @@ package model
import "encoding/json" import "encoding/json"
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"`
} }

View File

@ -3,6 +3,6 @@ package model
import "encoding/json" import "encoding/json"
type MetaNoAuthProbeStatus struct { type MetaNoAuthProbeStatus 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"`
} }

View File

@ -3,6 +3,6 @@ package model
import "encoding/json" import "encoding/json"
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"`
} }

View File

@ -2,12 +2,13 @@ package model
import ( import (
"encoding/json" "encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
) )
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 timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -2,14 +2,15 @@ package model
import ( import (
"encoding/json" "encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
) )
type MetaSensorDisplayItem struct { type MetaSensorDisplayItem 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"`
Crawler *MetaCrawler `json:"crawler,omitempty"` Crawler *MetaCrawler `json:"crawler,omitempty"`
Unit *MetaSensorItemUnit `json:"unit,omitempty"` Unit *MetaSensorItemUnit `json:"unit,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
ItemType *MetaSensorItemType `json:"itemType,omitempty"` ItemType *MetaSensorItemType `json:"itemType,omitempty"`
} }

View File

@ -2,13 +2,14 @@ package model
import ( import (
"encoding/json" "encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
) )
type MetaSensorItem struct { type MetaSensorItem struct {
Id json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
MetaSensorItemType *MetaSensorItemType `json:"metaSensorItemType,omitempty"` MetaSensorItemType *MetaSensorItemType `json:"metaSensorItemType,omitempty"`
Key string `json:"key,omitempty"` Key string `json:"key,omitempty"`
Name string `json:"name,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 ( import (
"encoding/json" "encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model" util "git.loafle.net/overflow/overflow_commons_go/util"
) )
type MetaSensorItemKey struct { type MetaSensorItemKey struct {
Id json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
Item *MetaSensorItem `json:"item,omitempty"` Item *MetaSensorItem `json:"item,omitempty"`
Key string `json:"key,omitempty"` Key string `json:"key,omitempty"`
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 timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
Unit *MetaSensorItemUnit `json:"unit,omitempty"` Unit *MetaSensorItemUnit `json:"unit,omitempty"`
} }

View File

@ -1,13 +1,14 @@
package model package model
import ( import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json" "encoding/json"
util "git.loafle.net/overflow/overflow_commons_go/util"
) )
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 timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
} }

View File

@ -1,13 +1,14 @@
package model package model
import ( import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json" "encoding/json"
util "git.loafle.net/overflow/overflow_commons_go/util"
) )
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 timestamp.Timestamp `json:"createDate,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"`
Mark string `json:"mark,omitempty"` Mark string `json:"mark,omitempty"`
} }

View File

@ -3,6 +3,6 @@ package model
import "encoding/json" import "encoding/json"
type MetaSensorStatus struct { type MetaSensorStatus 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"`
} }

View File

@ -1,20 +1,21 @@
package model package model
import ( import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model" "encoding/json"
domain "git.loafle.net/overflow/overflow_commons_go/modules/domain/model" domain "git.loafle.net/overflow/overflow_commons_go/modules/domain/model"
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/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" probe "git.loafle.net/overflow/overflow_commons_go/modules/probe/model"
util "git.loafle.net/overflow/overflow_commons_go/util"
) )
type NoAuthProbe struct { type NoAuthProbe struct {
Id json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
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 timestamp.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"`
} }

View File

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

View File

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

View File

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

View File

@ -1,15 +1,16 @@
package model package model
import ( import (
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
"git.loafle.net/overflow/overflow_service/proxy/target"
"encoding/json" "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 { type Sensor struct {
Id json.Number `json:"id,Number,omitempty"` ID json.Number `json:"id,Number,omitempty"`
CreateDate timestamp.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

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

View File

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

View File

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

View File

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