From 24ca9c8d4b5c3a3427f3e5f7f04fc3120bfd5f4b Mon Sep 17 00:00:00 2001 From: crusader Date: Thu, 26 Apr 2018 16:53:29 +0900 Subject: [PATCH] ing --- config/noauthprobe/auth.go | 8 +++++--- model/infra/InfraHost.go | 6 ++---- model/sensorconfig/Connection.go | 14 +++++++++----- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/config/noauthprobe/auth.go b/config/noauthprobe/auth.go index e6b36ff..0c8c2ff 100644 --- a/config/noauthprobe/auth.go +++ b/config/noauthprobe/auth.go @@ -1,6 +1,8 @@ package noauthprobe -import "time" +import ( + "git.loafle.net/overflow/commons-go/core/util" +) type AuthStateType int @@ -12,8 +14,8 @@ const ( type Auth struct { TempKey *string `json:"tempKey,omitempty" yaml:"tempKey" toml:"tempKey"` - AcceptedDate *time.Time `json:"acceptedDate,omitempty" yaml:"acceptedDate" toml:"acceptedDate"` - DeniedDate *time.Time `json:"deniedDate,omitempty" yaml:"deniedDate" toml:"deniedDate"` + AcceptedDate *util.Timestamp `json:"acceptedDate,omitempty" yaml:"acceptedDate" toml:"acceptedDate"` + DeniedDate *util.Timestamp `json:"deniedDate,omitempty" yaml:"deniedDate" toml:"deniedDate"` } func (a *Auth) State() AuthStateType { diff --git a/model/infra/InfraHost.go b/model/infra/InfraHost.go index 485a954..c564b0e 100644 --- a/model/infra/InfraHost.go +++ b/model/infra/InfraHost.go @@ -1,15 +1,13 @@ package infra import ( - "encoding/json" - "git.loafle.net/overflow/commons-go/core/util" ) type InfraHost struct { Infra InfraOS *InfraOS `json:"os,omitempty"` - IP json.Number `json:"ip,omitempty"` - Mac json.Number `json:"mac,omitempty"` + IP string `json:"ip,omitempty"` + Mac string `json:"mac,omitempty"` CreateDate util.Timestamp `json:"createDate,omitempty"` } diff --git a/model/sensorconfig/Connection.go b/model/sensorconfig/Connection.go index 67f2fe9..b7c018d 100644 --- a/model/sensorconfig/Connection.go +++ b/model/sensorconfig/Connection.go @@ -1,10 +1,14 @@ package sensorconfig -import "encoding/json" +import ( + "encoding/json" + + "git.loafle.net/overflow/commons-go/core/constants" +) type Connection struct { - IP string `json:"ip,omitempty"` - Port json.Number `json:"port,Number,omitempty"` - PortType string `json:"portType,omitempty"` - SSL bool `json:"ssl,omitempty"` + IP string `json:"ip,omitempty"` + Port json.Number `json:"port,Number,omitempty"` + PortType constants.PortType `json:"portType,omitempty"` + SSL bool `json:"ssl,omitempty"` }