added model

This commit is contained in:
snoop 2017-11-08 18:50:44 +09:00
parent 3d6d1bf5ab
commit 92bc1ce712
45 changed files with 628 additions and 0 deletions

View File

@ -0,0 +1,14 @@
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

@ -0,0 +1,16 @@
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"
)
type AuthCrawler struct {
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"`
}

View File

@ -0,0 +1,8 @@
package model
type PageParams struct {
PageNo int `json:"pageNo,omitempty"`
CountPerPage int `json:"countPerPage,omitempty"`
SortCol string `json:"sortCol,omitempty"`
SortDirection string `json:"sortDirection,omitempty"`
}

View File

@ -0,0 +1,12 @@
package model
type PublishMessage struct {
Targets []string `json:"targets,omitempty"`
Message *PublishMessageBody `json:"message,omitempty"`
}
type PublishMessageBody struct {
Method string `json:"method,omitempty"`
Params []string `json:"params,omitempty"`
}

View File

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

View File

@ -0,0 +1,10 @@
package model
type DiscoveryStartInfo struct {
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

@ -0,0 +1,18 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
)
type Host struct {
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"`
Os string `json:"os,omitempty"`
Target bool `json:"target,omitempty"`
Ports []*Port `json:"ports,omitempty"`
}

View File

@ -0,0 +1,16 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
)
type Port struct {
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"`
}

View File

@ -0,0 +1,17 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
"encoding/json"
)
type Service struct {
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"`
Target bool `json:"target,omitempty"`
}

View File

@ -0,0 +1,13 @@
package model
import "encoding/json"
type Zone struct {
Id json.Number `json:"id,Number,omitempty"`
Network string `json:"network,omitempty"`
Ip string `json:"ip,omitempty"`
Iface string `json:"iface,omitempty"`
Mac string `json:"mac,omitempty"`
FirstScanRage json.Number `json:"firstScanRange,omitempty"`
LastScanRange json.Number `json:"lastScanRange,omitempty"`
}

View File

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

View File

@ -0,0 +1,14 @@
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"
)
type DomainMember struct {
Id json.Number `json:"id,Number,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
Member *member.Member `json:"member,omitempty"`
Domain *Domain `json:"domain,omitempty"`
}

View File

@ -0,0 +1,15 @@
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"
)
type EmailAuth struct {
Id json.Number `json:"id,Number,omitempty"`
EmailAuthKey string `json:"emailAuthKey,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
AuthConfirmDate timestamp.Timestamp `json:"authConfirmDate,omitempty"`
Member *member.Member `json:"member,omitempty"`
}

View File

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

View File

@ -0,0 +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"
probe "git.loafle.net/overflow/overflow_commons_go/modules/probe/model"
target "git.loafle.net/overflow/overflow_commons_go/modules/target/model"
)
type Infra struct {
Id json.Number `json:"id,Number,omitempty"`
MetaInfraType *meta.MetaInfraType `json:"type,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
Probe *probe.Probe `json:"probe,omitempty"`
Target *target.Target `json:"target,omitempty"`
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,17 @@
package model
import (
"git.loafle.net/overflow/overflow_service/proxy/meta"
"encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
)
type InfraServiceApplication struct {
Infra
InfraHost *InfraHost `json:"host,omitempty"`
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"`
}

View File

@ -0,0 +1,18 @@
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"
)
type Member struct {
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"`
Status *meta.MetaMemberStatus `json:"status,omitempty"`
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,15 @@
package model
import (
"encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
)
type MetaSensorDisplayItem struct {
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"`
ItemType *MetaSensorItemType `json:"itemType,omitempty"`
}

View File

@ -0,0 +1,14 @@
package model
import (
"encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
)
type MetaSensorItem struct {
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"`
}

View File

@ -0,0 +1,18 @@
package model
import (
"encoding/json"
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
)
type MetaSensorItemKey struct {
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"`
Unit *MetaSensorItemUnit `json:"unit,omitempty"`
}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,20 @@
package model
import (
"git.loafle.net/overflow/overflow_commons_go/modules/timestamp/model"
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"
)
type NoAuthProbe struct {
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"`
Domain *domain.DomainMember `json:"domain,omitempty"`
Probe *probe.Probe `json:"probe,omitempty"`
}

View File

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

View File

@ -0,0 +1,24 @@
package model
import (
meta "git.loafle.net/overflow/overflow_commons_go/modules/meta/model"
"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"
"encoding/json"
)
type Probe struct {
Id json.Number `json:"id,Number,omitempty"`
Status *meta.MetaProbeStatus `json:"status,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
Domain *domain.Domain `json:"domain,omitempty"`
ProbeKey string `json:"probeKey,omitempty"`
EncryptionKey string `json:"encryptionKey,omitempty"`
TargetCount int `json:"targetCount,omitempty"`
SensorCount int `json:"sensorCount,omitempty"`
DisplayName string `json:"displayName,omitempty"`
Cidr string `json:"cidr,omitempty"`
AuthorizeDate timestamp.Timestamp `json:"authorizeDate,omitempty"`
AuthorizeMember *member.Member `json:"authorizeMember,omitempty"`
}

View File

@ -0,0 +1,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"
)
type ProbeTask struct {
Id json.Number `json:"id,Number,omitempty"`
MetaProbeTaskType *meta.MetaProbeTaskType `json:"metaProbeTaskType,omitempty"`
Probe *Probe `json:"probe,omitempty"`
Data string `json:"data,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
SendDate timestamp.Timestamp `json:"sendDate,omitempty"`
StartDate timestamp.Timestamp `json:"startDate,omitempty"`
EndDate timestamp.Timestamp `json:"endDate,omitempty"`
Succeed bool `json:"succeed,omitempty"`
}

View File

@ -0,0 +1,18 @@
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"
)
type Sensor struct {
Id json.Number `json:"id,Number,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
Description string `json:"description,omitempty"`
MetaSensorStatus *meta.MetaSensorStatus `json:"status,omitempty"`
Target *target.Target `json:"target,omitempty"`
Crawler *meta.MetaCrawler `json:"crawler,omitempty"`
CrawlerInputItems string `json:"crawlerInputItems,omitempty"`
}

View File

@ -0,0 +1,14 @@
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"
)
type SensorItem struct {
Id json.Number `json:"id,Number,omitempty"`
Sensor *Sensor `json:"sensor,omitempty"`
MetaSensorItem *meta.MetaSensorItem `json:"item,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
}

View File

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

View File

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