diff --git a/crawler/health/SocketHeahthCrawler.go b/crawler/health/SocketHeahthCrawler.go index b3da046..1ee959c 100644 --- a/crawler/health/SocketHeahthCrawler.go +++ b/crawler/health/SocketHeahthCrawler.go @@ -9,7 +9,7 @@ import ( cnsm "git.loafle.net/commons/service_matcher-go" cuej "git.loafle.net/commons_go/util/encoding/json" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/crawler-go" ) @@ -22,7 +22,7 @@ func (s *SocketHeahthCrawler) SetMatcher(m cnsm.Matcher) { s.m = m } -func (s *SocketHeahthCrawler) getConnection(config *ocsm.SensorConfig) (net.Conn, error) { +func (s *SocketHeahthCrawler) getConnection(config *ocmsc.SensorConfig) (net.Conn, error) { connection := config.Target.Connection ip := connection.IP @@ -54,7 +54,7 @@ func (s *SocketHeahthCrawler) getConnection(config *ocsm.SensorConfig) (net.Conn return conn, nil } -func (s *SocketHeahthCrawler) CheckHeahth(config *ocsm.SensorConfig) (result map[string]string, err error) { +func (s *SocketHeahthCrawler) CheckHeahth(config *ocmsc.SensorConfig) (result map[string]string, err error) { result = make(map[string]string, 0) result["StartTime"] = time.Now().String() diff --git a/crawler/health/activedirectory/ActiveDirectoryHealthCrawler.go b/crawler/health/activedirectory/ActiveDirectoryHealthCrawler.go index ccd3389..dff1722 100644 --- a/crawler/health/activedirectory/ActiveDirectoryHealthCrawler.go +++ b/crawler/health/activedirectory/ActiveDirectoryHealthCrawler.go @@ -2,7 +2,7 @@ package activedirectory import ( csma "git.loafle.net/commons/service_matcher-go/activedirectory" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *ActiveDirectoryHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *ActiveDirectoryHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *ActiveDirectoryHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/activedirectory/ActiveDirectoryHealthCrawler_test.go b/crawler/health/activedirectory/ActiveDirectoryHealthCrawler_test.go index 646e9f2..bcc54cb 100644 --- a/crawler/health/activedirectory/ActiveDirectoryHealthCrawler_test.go +++ b/crawler/health/activedirectory/ActiveDirectoryHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.1", Port: json.Number(389), PortType: "tcp", diff --git a/crawler/health/cassandra/CassandraHealthCrawler.go b/crawler/health/cassandra/CassandraHealthCrawler.go index bfc2003..ce115e3 100644 --- a/crawler/health/cassandra/CassandraHealthCrawler.go +++ b/crawler/health/cassandra/CassandraHealthCrawler.go @@ -2,7 +2,7 @@ package cassandra import ( cnsmc "git.loafle.net/commons/service_matcher-go/cassandra" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *CassandraHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *CassandraHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *CassandraHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/cassandra/CassandraHealthCrawler_test.go b/crawler/health/cassandra/CassandraHealthCrawler_test.go index 8399e94..ded6f38 100644 --- a/crawler/health/cassandra/CassandraHealthCrawler_test.go +++ b/crawler/health/cassandra/CassandraHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.104", Port: json.Number(9042), PortType: "tcp", diff --git a/crawler/health/dns/DNSHealthCrawler.go b/crawler/health/dns/DNSHealthCrawler.go index 7e16794..945c7f0 100644 --- a/crawler/health/dns/DNSHealthCrawler.go +++ b/crawler/health/dns/DNSHealthCrawler.go @@ -2,7 +2,7 @@ package dns import ( cnsmd "git.loafle.net/commons/service_matcher-go/dns" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *DNSHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *DNSHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *DNSHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/dns/DNSHealthCrawler_test.go b/crawler/health/dns/DNSHealthCrawler_test.go index d016c34..56e8513 100644 --- a/crawler/health/dns/DNSHealthCrawler_test.go +++ b/crawler/health/dns/DNSHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.215", Port: json.Number(53), PortType: "udp", diff --git a/crawler/health/ftp/FTPHealthCrawler.go b/crawler/health/ftp/FTPHealthCrawler.go index 36f6b86..52baf22 100644 --- a/crawler/health/ftp/FTPHealthCrawler.go +++ b/crawler/health/ftp/FTPHealthCrawler.go @@ -2,7 +2,7 @@ package ftp import ( cnsmf "git.loafle.net/commons/service_matcher-go/ftp" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *FTPHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *FTPHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *FTPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/ftp/FTPHealthCrawler_test.go b/crawler/health/ftp/FTPHealthCrawler_test.go index ee360f7..8338b07 100644 --- a/crawler/health/ftp/FTPHealthCrawler_test.go +++ b/crawler/health/ftp/FTPHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.215", Port: json.Number(21), PortType: "tcp", diff --git a/crawler/health/http/HTTPHealthCrawler.go b/crawler/health/http/HTTPHealthCrawler.go index 0d9926d..a864c7a 100644 --- a/crawler/health/http/HTTPHealthCrawler.go +++ b/crawler/health/http/HTTPHealthCrawler.go @@ -2,7 +2,7 @@ package http import ( cnsmh "git.loafle.net/commons/service_matcher-go/http" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *HTTPHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *HTTPHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *HTTPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/http/HTTPHealthCrawler_test.go b/crawler/health/http/HTTPHealthCrawler_test.go index d6813fc..39b6b0f 100644 --- a/crawler/health/http/HTTPHealthCrawler_test.go +++ b/crawler/health/http/HTTPHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.105", Port: json.Number(80), PortType: "tcp", diff --git a/crawler/health/imap/IMAPHealthCrawler.go b/crawler/health/imap/IMAPHealthCrawler.go index fba7c2e..4ac075b 100644 --- a/crawler/health/imap/IMAPHealthCrawler.go +++ b/crawler/health/imap/IMAPHealthCrawler.go @@ -2,7 +2,7 @@ package imap import ( cnsmi "git.loafle.net/commons/service_matcher-go/imap" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *IMAPHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *IMAPHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *IMAPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/imap/IMAPHealthCrawler_test.go b/crawler/health/imap/IMAPHealthCrawler_test.go index 893aa03..78716bc 100644 --- a/crawler/health/imap/IMAPHealthCrawler_test.go +++ b/crawler/health/imap/IMAPHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.215", Port: json.Number(993), PortType: "tcp", diff --git a/crawler/health/ldap/LDAPHealthCrawler.go b/crawler/health/ldap/LDAPHealthCrawler.go index 8a9f73c..7144ff8 100644 --- a/crawler/health/ldap/LDAPHealthCrawler.go +++ b/crawler/health/ldap/LDAPHealthCrawler.go @@ -2,7 +2,7 @@ package ldap import ( cnsml "git.loafle.net/commons/service_matcher-go/ldap" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *LDAPHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *LDAPHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *LDAPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/ldap/LDAPHealthCrawler_test.go b/crawler/health/ldap/LDAPHealthCrawler_test.go index 86eb2cf..ce4b54d 100644 --- a/crawler/health/ldap/LDAPHealthCrawler_test.go +++ b/crawler/health/ldap/LDAPHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.215", Port: json.Number(389), PortType: "tcp", diff --git a/crawler/health/mongodb/MongoDBHealthCrawler.go b/crawler/health/mongodb/MongoDBHealthCrawler.go index 81113b3..8c6fdfd 100644 --- a/crawler/health/mongodb/MongoDBHealthCrawler.go +++ b/crawler/health/mongodb/MongoDBHealthCrawler.go @@ -2,7 +2,7 @@ package mongodb import ( cnsmm "git.loafle.net/commons/service_matcher-go/mongodb" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *MongoDBHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *MongoDBHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *MongoDBHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/mongodb/MongoDBHealthCrawler_test.go b/crawler/health/mongodb/MongoDBHealthCrawler_test.go index 4e62c63..0fe9843 100644 --- a/crawler/health/mongodb/MongoDBHealthCrawler_test.go +++ b/crawler/health/mongodb/MongoDBHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.104", Port: json.Number(27017), PortType: "tcp", diff --git a/crawler/health/mysql/MySQLHealthCrawler.go b/crawler/health/mysql/MySQLHealthCrawler.go index d843724..fa801cd 100644 --- a/crawler/health/mysql/MySQLHealthCrawler.go +++ b/crawler/health/mysql/MySQLHealthCrawler.go @@ -2,7 +2,7 @@ package mysql import ( cnsmm "git.loafle.net/commons/service_matcher-go/mysql" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *MySQLHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *MySQLHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *MySQLHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/mysql/MySQLHealthCrawler_test.go b/crawler/health/mysql/MySQLHealthCrawler_test.go index d264329..cfca4aa 100644 --- a/crawler/health/mysql/MySQLHealthCrawler_test.go +++ b/crawler/health/mysql/MySQLHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.103", Port: json.Number(3306), PortType: "tcp", diff --git a/crawler/health/netbios/NetBIOSHealthCrawler.go b/crawler/health/netbios/NetBIOSHealthCrawler.go index e0f03c8..50535be 100644 --- a/crawler/health/netbios/NetBIOSHealthCrawler.go +++ b/crawler/health/netbios/NetBIOSHealthCrawler.go @@ -2,7 +2,7 @@ package netbios import ( cnsmn "git.loafle.net/commons/service_matcher-go/netbios" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *NetBIOSHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *NetBIOSHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *NetBIOSHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/netbios/NetBIOSHealthCrawler_test.go b/crawler/health/netbios/NetBIOSHealthCrawler_test.go index be83141..22ce308 100644 --- a/crawler/health/netbios/NetBIOSHealthCrawler_test.go +++ b/crawler/health/netbios/NetBIOSHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.106", Port: json.Number(139), PortType: "tcp", diff --git a/crawler/health/oracle/OracleHealthCrawler.go b/crawler/health/oracle/OracleHealthCrawler.go index e815931..b5f2535 100644 --- a/crawler/health/oracle/OracleHealthCrawler.go +++ b/crawler/health/oracle/OracleHealthCrawler.go @@ -2,7 +2,7 @@ package oracle import ( cnsmo "git.loafle.net/commons/service_matcher-go/oracle" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *OracleHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *OracleHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *OracleHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/oracle/OracleHealthCrawler_test.go b/crawler/health/oracle/OracleHealthCrawler_test.go index 69c1fba..a5e6387 100644 --- a/crawler/health/oracle/OracleHealthCrawler_test.go +++ b/crawler/health/oracle/OracleHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.30", Port: json.Number(1521), PortType: "tcp", diff --git a/crawler/health/pop/POPHealthCrawler.go b/crawler/health/pop/POPHealthCrawler.go index 588421e..f6c51d2 100644 --- a/crawler/health/pop/POPHealthCrawler.go +++ b/crawler/health/pop/POPHealthCrawler.go @@ -2,7 +2,7 @@ package pop import ( cnsmp "git.loafle.net/commons/service_matcher-go/pop" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *POPHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *POPHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *POPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/pop/POPHealthCrawler_test.go b/crawler/health/pop/POPHealthCrawler_test.go index 7149db0..479b4a9 100644 --- a/crawler/health/pop/POPHealthCrawler_test.go +++ b/crawler/health/pop/POPHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.215", Port: json.Number(110), PortType: "tcp", diff --git a/crawler/health/postgresql/PostgreSQLHealthCrawler.go b/crawler/health/postgresql/PostgreSQLHealthCrawler.go index c722ce0..7d6e767 100644 --- a/crawler/health/postgresql/PostgreSQLHealthCrawler.go +++ b/crawler/health/postgresql/PostgreSQLHealthCrawler.go @@ -2,7 +2,7 @@ package postgresql import ( cnsmp "git.loafle.net/commons/service_matcher-go/postgresql" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *PostgreSQLHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *PostgreSQLHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *PostgreSQLHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/postgresql/PostgreSQLHealthCrawler_test.go b/crawler/health/postgresql/PostgreSQLHealthCrawler_test.go index 069caad..8446dab 100644 --- a/crawler/health/postgresql/PostgreSQLHealthCrawler_test.go +++ b/crawler/health/postgresql/PostgreSQLHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.107", Port: json.Number(5432), PortType: "tcp", diff --git a/crawler/health/redis/RedisHealthCrawler.go b/crawler/health/redis/RedisHealthCrawler.go index 36802a2..9731987 100644 --- a/crawler/health/redis/RedisHealthCrawler.go +++ b/crawler/health/redis/RedisHealthCrawler.go @@ -2,7 +2,7 @@ package redis import ( cnsmr "git.loafle.net/commons/service_matcher-go/redis" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *RedisHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *RedisHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *RedisHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/redis/RedisHealthCrawler_test.go b/crawler/health/redis/RedisHealthCrawler_test.go index 6680fde..4b5b00f 100644 --- a/crawler/health/redis/RedisHealthCrawler_test.go +++ b/crawler/health/redis/RedisHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.104", Port: json.Number(6379), PortType: "tcp", diff --git a/crawler/health/rmi/RMIHealthCrawler.go b/crawler/health/rmi/RMIHealthCrawler.go index d8b1b34..821f5a1 100644 --- a/crawler/health/rmi/RMIHealthCrawler.go +++ b/crawler/health/rmi/RMIHealthCrawler.go @@ -2,7 +2,7 @@ package rmi import ( cnsmr "git.loafle.net/commons/service_matcher-go/rmi" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *RMIHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *RMIHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *RMIHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/rmi/RMIHealthCrawler_test.go b/crawler/health/rmi/RMIHealthCrawler_test.go index 1f09f80..39af436 100644 --- a/crawler/health/rmi/RMIHealthCrawler_test.go +++ b/crawler/health/rmi/RMIHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.103", Port: json.Number(9840), PortType: "tcp", diff --git a/crawler/health/smb/SMBHealthCrawler.go b/crawler/health/smb/SMBHealthCrawler.go index 9ef4bb4..1c8e74f 100644 --- a/crawler/health/smb/SMBHealthCrawler.go +++ b/crawler/health/smb/SMBHealthCrawler.go @@ -2,7 +2,7 @@ package smb import ( cnsms "git.loafle.net/commons/service_matcher-go/smb" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *SMBHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *SMBHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *SMBHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/smb/SMBHealthCrawler_test.go b/crawler/health/smb/SMBHealthCrawler_test.go index 094d5cd..b2fae81 100644 --- a/crawler/health/smb/SMBHealthCrawler_test.go +++ b/crawler/health/smb/SMBHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.106", Port: json.Number(445), PortType: "tcp", diff --git a/crawler/health/smtp/SMTPHealthCrawler.go b/crawler/health/smtp/SMTPHealthCrawler.go index 26d6c54..e16c80a 100644 --- a/crawler/health/smtp/SMTPHealthCrawler.go +++ b/crawler/health/smtp/SMTPHealthCrawler.go @@ -2,7 +2,7 @@ package smtp import ( cnsms "git.loafle.net/commons/service_matcher-go/smtp" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *SMTPHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *SMTPHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *SMTPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/smtp/SMTPHealthCrawler_test.go b/crawler/health/smtp/SMTPHealthCrawler_test.go index 7f3dd78..696281b 100644 --- a/crawler/health/smtp/SMTPHealthCrawler_test.go +++ b/crawler/health/smtp/SMTPHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.215", Port: json.Number(25), PortType: "tcp", diff --git a/crawler/health/snmp/v2/SNMPHealthCrawler.go b/crawler/health/snmp/v2/SNMPHealthCrawler.go index 8865660..1b3a0ae 100644 --- a/crawler/health/snmp/v2/SNMPHealthCrawler.go +++ b/crawler/health/snmp/v2/SNMPHealthCrawler.go @@ -2,7 +2,7 @@ package v2 import ( cnsms "git.loafle.net/commons/service_matcher-go/snmp/v2" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *SNMPHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *SNMPHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *SNMPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/snmp/v2/SNMPHealthCrawler_test.go b/crawler/health/snmp/v2/SNMPHealthCrawler_test.go index 154611d..e998875 100644 --- a/crawler/health/snmp/v2/SNMPHealthCrawler_test.go +++ b/crawler/health/snmp/v2/SNMPHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.215", Port: json.Number(161), PortType: "udp", diff --git a/crawler/health/snmp/v3/SNMPHealthCrawler.go b/crawler/health/snmp/v3/SNMPHealthCrawler.go index 943fedf..a81a33f 100644 --- a/crawler/health/snmp/v3/SNMPHealthCrawler.go +++ b/crawler/health/snmp/v3/SNMPHealthCrawler.go @@ -2,7 +2,7 @@ package v3 import ( cnsms "git.loafle.net/commons/service_matcher-go/snmp/v3" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *SNMPHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *SNMPHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *SNMPHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/snmp/v3/SNMPHealthCrawler_test.go b/crawler/health/snmp/v3/SNMPHealthCrawler_test.go index 6b88d0d..ff42953 100644 --- a/crawler/health/snmp/v3/SNMPHealthCrawler_test.go +++ b/crawler/health/snmp/v3/SNMPHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.254", Port: json.Number(161), PortType: "udp", diff --git a/crawler/health/sqlserver/SQLServerHealthCrawler.go b/crawler/health/sqlserver/SQLServerHealthCrawler.go index 220fb3d..a93ba9a 100644 --- a/crawler/health/sqlserver/SQLServerHealthCrawler.go +++ b/crawler/health/sqlserver/SQLServerHealthCrawler.go @@ -2,7 +2,7 @@ package sqlserver import ( cnsms "git.loafle.net/commons/service_matcher-go/sqlserver" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *SQLServerHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *SQLServerHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *SQLServerHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/sqlserver/SQLServerHealthCrawler_test.go b/crawler/health/sqlserver/SQLServerHealthCrawler_test.go index 06ce208..1c67d46 100644 --- a/crawler/health/sqlserver/SQLServerHealthCrawler_test.go +++ b/crawler/health/sqlserver/SQLServerHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.106", Port: json.Number(1433), PortType: "tcp", diff --git a/crawler/health/ssh/SSHHealthCrawler.go b/crawler/health/ssh/SSHHealthCrawler.go index e0b9dd6..826d198 100644 --- a/crawler/health/ssh/SSHHealthCrawler.go +++ b/crawler/health/ssh/SSHHealthCrawler.go @@ -2,7 +2,7 @@ package ssh import ( cnsms "git.loafle.net/commons/service_matcher-go/ssh" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *SSHHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *SSHHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *SSHHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/ssh/SSHHealthCrawler_test.go b/crawler/health/ssh/SSHHealthCrawler_test.go index 0cfd476..63a5324 100644 --- a/crawler/health/ssh/SSHHealthCrawler_test.go +++ b/crawler/health/ssh/SSHHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.215", Port: json.Number(22), PortType: "tcp", diff --git a/crawler/health/telnet/TelnetHealthCrawler.go b/crawler/health/telnet/TelnetHealthCrawler.go index a22f0d2..eae9e92 100644 --- a/crawler/health/telnet/TelnetHealthCrawler.go +++ b/crawler/health/telnet/TelnetHealthCrawler.go @@ -2,7 +2,7 @@ package telnet import ( cnsmt "git.loafle.net/commons/service_matcher-go/telnet" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *TelnetHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *TelnetHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *TelnetHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/telnet/TelnetHealthCrawler_test.go b/crawler/health/telnet/TelnetHealthCrawler_test.go index 98eee16..efa45b2 100644 --- a/crawler/health/telnet/TelnetHealthCrawler_test.go +++ b/crawler/health/telnet/TelnetHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.215", Port: json.Number(23), PortType: "tcp", diff --git a/crawler/health/wmi/WMIHealthCrawler.go b/crawler/health/wmi/WMIHealthCrawler.go index 1842a98..a210452 100644 --- a/crawler/health/wmi/WMIHealthCrawler.go +++ b/crawler/health/wmi/WMIHealthCrawler.go @@ -2,7 +2,7 @@ package wmi import ( cnsmw "git.loafle.net/commons/service_matcher-go/wmi" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/health" crawler "git.loafle.net/overflow/crawler-go" ) @@ -23,7 +23,7 @@ func (c *WMIHealthCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *WMIHealthCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *WMIHealthCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { rss, err := c.CheckHeahth(config) if err != nil { return nil, err diff --git a/crawler/health/wmi/WMIHealthCrawler_test.go b/crawler/health/wmi/WMIHealthCrawler_test.go index 0d36c06..36ff133 100644 --- a/crawler/health/wmi/WMIHealthCrawler_test.go +++ b/crawler/health/wmi/WMIHealthCrawler_test.go @@ -4,14 +4,14 @@ import ( "encoding/json" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} - config.Target = &ocsm.Target{} - config.Target.Connection = &ocsm.Connection{ + config := &ocmsc.SensorConfig{} + config.Target = &ocmsc.Target{} + config.Target.Connection = &ocmsc.Connection{ IP: "192.168.1.1", Port: json.Number(135), PortType: "tcp", diff --git a/crawler/ssh/SSHCrawler.go b/crawler/ssh/SSHCrawler.go index 542fc3e..fa1c412 100644 --- a/crawler/ssh/SSHCrawler.go +++ b/crawler/ssh/SSHCrawler.go @@ -7,7 +7,7 @@ import ( uuid "github.com/satori/go.uuid" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/container_network/crawler/ssh/client" "git.loafle.net/overflow/container_network/crawler/ssh/parser" crawler "git.loafle.net/overflow/crawler-go" @@ -29,7 +29,7 @@ func (c *SSHCrawler) Auth(auth map[string]interface{}) error { return nil } -func (c *SSHCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { +func (c *SSHCrawler) Get(config *ocmsc.SensorConfig) (map[string]string, error) { sshClient, err := client.New(config.Target) if nil != err { return nil, err @@ -73,7 +73,7 @@ func (c *SSHCrawler) Get(config *ocsm.SensorConfig) (map[string]string, error) { } if nil != rm { - mm := ocsm.KeysToMap(item.Keys) + mm := ocmsc.KeysToMap(item.Keys) for key, value := range mm { results[value] = rm[key] } diff --git a/crawler/ssh/SSHCrawler_test.go b/crawler/ssh/SSHCrawler_test.go index 3cd0036..d4f06d6 100644 --- a/crawler/ssh/SSHCrawler_test.go +++ b/crawler/ssh/SSHCrawler_test.go @@ -6,12 +6,12 @@ import ( "log" "testing" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { - config := &ocsm.SensorConfig{} + config := &ocmsc.SensorConfig{} data, err := ioutil.ReadFile("./SSHCrawler_test.json") if err != nil { log.Fatal(err) diff --git a/crawler/ssh/client/client.go b/crawler/ssh/client/client.go index 3beb9f8..79780ce 100644 --- a/crawler/ssh/client/client.go +++ b/crawler/ssh/client/client.go @@ -8,7 +8,7 @@ import ( "git.loafle.net/commons_go/logging" cuej "git.loafle.net/commons_go/util/encoding/json" - ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model" + ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "golang.org/x/crypto/ssh" ) @@ -88,7 +88,7 @@ func parsePrivateKey(keyPath, pw string) (ssh.Signer, error) { return ssh.ParsePrivateKeyWithPassphrase(buff, []byte(pw)) } -func New(target *ocsm.Target) (*SSHClient, error) { +func New(target *ocmsc.Target) (*SSHClient, error) { connection := target.Connection auth := target.Auth diff --git a/main.go b/main.go index 370aaa7..7900f96 100644 --- a/main.go +++ b/main.go @@ -10,7 +10,7 @@ import ( "time" "git.loafle.net/commons/logging-go" - ocpcc "git.loafle.net/overflow/commons-go/probe/constants" + occp "git.loafle.net/overflow/commons-go/config/probe" "git.loafle.net/overflow/container_network/server" ) @@ -19,8 +19,8 @@ var ( ) func init() { - pidFilePath = flag.String(ocpcc.FlagPidFilePathName, "./dist/network.pid", "PID file path") - loggingConfigFilePath := flag.String(ocpcc.FlagLoggingConfigFilePathName, "", "logging config path") + pidFilePath = flag.String(occp.FlagPidFilePathName, "./dist/network.pid", "PID file path") + loggingConfigFilePath := flag.String(occp.FlagLoggingConfigFilePathName, "", "logging config path") flag.Parse() logging.InitializeLogger(*loggingConfigFilePath)