From b56596910986570dc3e8ecb08064d52d81239424 Mon Sep 17 00:00:00 2001 From: snoop Date: Mon, 17 Apr 2017 11:26:26 +0900 Subject: [PATCH] fixed health crawler params map -> config.Config --- .../activedirectory_protocol_crawler_go/ad_protocol_crawler.go | 3 ++- .../cassandra_protocol_crawler.go | 3 ++- health_crawler/dns_protocol_crawler_go/dns_protocol_crawler.go | 3 ++- health_crawler/ftp_protocol_crawler_go/ftp_protocol_crawler.go | 3 ++- .../ftps_protocol_crawler_go/ftps_protocol_crawler.go | 3 ++- .../http_protocol_crawler_go/crawler_protocol_http.go | 3 ++- .../imap_protocol_crawler_go/imap_protocol_crawler.go | 3 ++- .../ldap_protocol_crawler_go/ldap_protocol_crawler.go | 3 ++- health_crawler/mongodb_protocol_crawler_go/mongodb_protocol.go | 3 ++- health_crawler/mssql_protocol_crawler_go/mssql_protocol.go | 3 ++- health_crawler/mysql_protocol_crawler_go/mysql_protocol.go | 3 ++- .../netbios_protocol_crawler_go/netbios_protocol_crawler.go | 3 ++- .../oracle_protocol_crawler_go/oracle_protocol_crawler.go | 3 ++- health_crawler/pgsql_protocol_crawler_go/pgsql_protocol.go | 3 ++- .../pop3_protocol_crawler_go/pop3_protocol_crawler.go | 3 ++- health_crawler/rmi_protocol_crawler_go/rmi_protocol_crawler.go | 3 ++- health_crawler/smb_protocol_crawler_go/smb_protocol_crawler.go | 3 ++- .../smtp_protocol_crawler_go/smtp_protocol_crawler.go | 3 ++- .../snmpv2c_protocol_crawler_go/snmpv2c_protocol_crawler.go | 3 ++- .../snmpv3_protocol_crawler_go/snmpv3_protocol_crawler.go | 3 ++- health_crawler/ssh_protocol_crawler_go/ssh_protocol_crawler.go | 3 ++- .../telnet_protocol_crawler_go/crawler_protocol_telnet.go | 3 ++- health_crawler/wmi_protocol_crawler_go/wmi_protocol_crawler.go | 3 ++- 23 files changed, 46 insertions(+), 23 deletions(-) diff --git a/health_crawler/activedirectory_protocol_crawler_go/ad_protocol_crawler.go b/health_crawler/activedirectory_protocol_crawler_go/ad_protocol_crawler.go index a21770c..3d2d335 100644 --- a/health_crawler/activedirectory_protocol_crawler_go/ad_protocol_crawler.go +++ b/health_crawler/activedirectory_protocol_crawler_go/ad_protocol_crawler.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/activedirectory" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type ActiveDirectoryHealthCrawler struct { crawler.SocketHeahthCrawler } -func (r *ActiveDirectoryHealthCrawler) Internal(params map[string]interface{}) ([]byte, error) { +func (r *ActiveDirectoryHealthCrawler) Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/cassandra_protocol_crawler_go/cassandra_protocol_crawler.go b/health_crawler/cassandra_protocol_crawler_go/cassandra_protocol_crawler.go index 198929c..9bd61fe 100644 --- a/health_crawler/cassandra_protocol_crawler_go/cassandra_protocol_crawler.go +++ b/health_crawler/cassandra_protocol_crawler_go/cassandra_protocol_crawler.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/cassandra" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type CassandraHealthCrawler struct { crawler.SocketHeahthCrawler } -func (r *CassandraHealthCrawler)Internal(params map[string]interface{}) ([]byte, error) { +func (r *CassandraHealthCrawler)Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/dns_protocol_crawler_go/dns_protocol_crawler.go b/health_crawler/dns_protocol_crawler_go/dns_protocol_crawler.go index b906880..78aba45 100644 --- a/health_crawler/dns_protocol_crawler_go/dns_protocol_crawler.go +++ b/health_crawler/dns_protocol_crawler_go/dns_protocol_crawler.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/dns" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type DNSHealthCrawler struct { crawler.SocketHeahthCrawler } -func (r *DNSHealthCrawler)Internal(params map[string]interface{}) ([]byte, error) { +func (r *DNSHealthCrawler)Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/ftp_protocol_crawler_go/ftp_protocol_crawler.go b/health_crawler/ftp_protocol_crawler_go/ftp_protocol_crawler.go index 2a06c9b..3a7527d 100644 --- a/health_crawler/ftp_protocol_crawler_go/ftp_protocol_crawler.go +++ b/health_crawler/ftp_protocol_crawler_go/ftp_protocol_crawler.go @@ -4,6 +4,7 @@ package ftp_protocol_crawler_go import ( "loafle.com/overflow/crawler_go" "encoding/json" + "loafle.com/overflow/crawler_go/config" ) type FTPHealthCrawler struct { @@ -11,7 +12,7 @@ type FTPHealthCrawler struct { } -func (r *FTPHealthCrawler)Internal(params map[string]interface{}) ([]byte, error) { +func (r *FTPHealthCrawler)Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/ftps_protocol_crawler_go/ftps_protocol_crawler.go b/health_crawler/ftps_protocol_crawler_go/ftps_protocol_crawler.go index a4c6bde..74d8dc4 100644 --- a/health_crawler/ftps_protocol_crawler_go/ftps_protocol_crawler.go +++ b/health_crawler/ftps_protocol_crawler_go/ftps_protocol_crawler.go @@ -4,6 +4,7 @@ import ( "loafle.com/overflow/crawler_go" "encoding/json" "loafle.com/overflow/commons_go/matcher/ftp" + "loafle.com/overflow/crawler_go/config" ) type FTPSHealthCrawler struct { @@ -11,7 +12,7 @@ type FTPSHealthCrawler struct { } -func (r *FTPSHealthCrawler) Internal(params map[string]interface{}) ([]byte, error) { +func (r *FTPSHealthCrawler) Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/http_protocol_crawler_go/crawler_protocol_http.go b/health_crawler/http_protocol_crawler_go/crawler_protocol_http.go index 2d94029..b9ff887 100644 --- a/health_crawler/http_protocol_crawler_go/crawler_protocol_http.go +++ b/health_crawler/http_protocol_crawler_go/crawler_protocol_http.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/http" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type HTTPHealthCrawler struct { crawler.SocketHeahthCrawler } -func (r *HTTPHealthCrawler)Internal(params map[string]interface{}) ([]byte, error) { +func (r *HTTPHealthCrawler)Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/imap_protocol_crawler_go/imap_protocol_crawler.go b/health_crawler/imap_protocol_crawler_go/imap_protocol_crawler.go index 137f284..7fec4a1 100644 --- a/health_crawler/imap_protocol_crawler_go/imap_protocol_crawler.go +++ b/health_crawler/imap_protocol_crawler_go/imap_protocol_crawler.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/imap" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type IMAPHealthCrawler struct { crawler.SocketHeahthCrawler } -func (r *IMAPHealthCrawler)Internal(params map[string]interface{}) ([]byte, error) { +func (r *IMAPHealthCrawler)Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/ldap_protocol_crawler_go/ldap_protocol_crawler.go b/health_crawler/ldap_protocol_crawler_go/ldap_protocol_crawler.go index 0d0731d..32c881e 100644 --- a/health_crawler/ldap_protocol_crawler_go/ldap_protocol_crawler.go +++ b/health_crawler/ldap_protocol_crawler_go/ldap_protocol_crawler.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/ldap" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type LDAPHealthCrawler struct { crawler.SocketHeahthCrawler } -func (r *LDAPHealthCrawler)Internal(params map[string]interface{}) ([]byte, error) { +func (r *LDAPHealthCrawler)Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/mongodb_protocol_crawler_go/mongodb_protocol.go b/health_crawler/mongodb_protocol_crawler_go/mongodb_protocol.go index a2a50e4..f9b234c 100644 --- a/health_crawler/mongodb_protocol_crawler_go/mongodb_protocol.go +++ b/health_crawler/mongodb_protocol_crawler_go/mongodb_protocol.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/mongodb" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type MongoDBHealthCrawler struct { crawler.SocketHeahthCrawler } -func (r *MongoDBHealthCrawler)Internal(params map[string]interface{}) ([]byte, error) { +func (r *MongoDBHealthCrawler)Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/mssql_protocol_crawler_go/mssql_protocol.go b/health_crawler/mssql_protocol_crawler_go/mssql_protocol.go index dd05b83..9464aee 100644 --- a/health_crawler/mssql_protocol_crawler_go/mssql_protocol.go +++ b/health_crawler/mssql_protocol_crawler_go/mssql_protocol.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/mssql" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type MSSqlHeahthCrawler struct { crawler.SocketHeahthCrawler } -func (r *MSSqlHeahthCrawler) Internal(params map[string]interface{}) ([]byte, error) { +func (r *MSSqlHeahthCrawler) Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/mysql_protocol_crawler_go/mysql_protocol.go b/health_crawler/mysql_protocol_crawler_go/mysql_protocol.go index 8a6e8c9..b2777b5 100644 --- a/health_crawler/mysql_protocol_crawler_go/mysql_protocol.go +++ b/health_crawler/mysql_protocol_crawler_go/mysql_protocol.go @@ -5,13 +5,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/mysql" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type MysqlHeahthCrawler struct { crawler.SocketHeahthCrawler } -func (r *MysqlHeahthCrawler)Internal(params map[string]interface{}) ([]byte, error) { +func (r *MysqlHeahthCrawler)Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/netbios_protocol_crawler_go/netbios_protocol_crawler.go b/health_crawler/netbios_protocol_crawler_go/netbios_protocol_crawler.go index f554e17..4cbd659 100644 --- a/health_crawler/netbios_protocol_crawler_go/netbios_protocol_crawler.go +++ b/health_crawler/netbios_protocol_crawler_go/netbios_protocol_crawler.go @@ -5,13 +5,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/netbios" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type NetbiosHeahthCrawler struct { crawler.SocketHeahthCrawler } -func (r *NetbiosHeahthCrawler) Internal(params map[string]interface{}) ([]byte, error) { +func (r *NetbiosHeahthCrawler) Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/oracle_protocol_crawler_go/oracle_protocol_crawler.go b/health_crawler/oracle_protocol_crawler_go/oracle_protocol_crawler.go index ee82c71..5382542 100644 --- a/health_crawler/oracle_protocol_crawler_go/oracle_protocol_crawler.go +++ b/health_crawler/oracle_protocol_crawler_go/oracle_protocol_crawler.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/oracle" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type OracleHeahthCrawler struct { crawler.SocketHeahthCrawler } -func (r *OracleHeahthCrawler) Internal(params map[string]interface{}) ([]byte, error) { +func (r *OracleHeahthCrawler) Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/pgsql_protocol_crawler_go/pgsql_protocol.go b/health_crawler/pgsql_protocol_crawler_go/pgsql_protocol.go index 4337942..da5d7b8 100644 --- a/health_crawler/pgsql_protocol_crawler_go/pgsql_protocol.go +++ b/health_crawler/pgsql_protocol_crawler_go/pgsql_protocol.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/pgsql" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type PGSqlHeahthCrawler struct { crawler.SocketHeahthCrawler } -func (r *PGSqlHeahthCrawler)Internal(params map[string]interface{}) ([]byte, error) { +func (r *PGSqlHeahthCrawler)Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/pop3_protocol_crawler_go/pop3_protocol_crawler.go b/health_crawler/pop3_protocol_crawler_go/pop3_protocol_crawler.go index 75dafba..96b1867 100644 --- a/health_crawler/pop3_protocol_crawler_go/pop3_protocol_crawler.go +++ b/health_crawler/pop3_protocol_crawler_go/pop3_protocol_crawler.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/pop" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type POP3HeahthCrawler struct { crawler.SocketHeahthCrawler } -func (r *POP3HeahthCrawler) Internal(params map[string]interface{}) ([]byte, error) { +func (r *POP3HeahthCrawler) Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/rmi_protocol_crawler_go/rmi_protocol_crawler.go b/health_crawler/rmi_protocol_crawler_go/rmi_protocol_crawler.go index 4045cb5..3df8a5f 100644 --- a/health_crawler/rmi_protocol_crawler_go/rmi_protocol_crawler.go +++ b/health_crawler/rmi_protocol_crawler_go/rmi_protocol_crawler.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/rmi" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type RMIHeahthCrawler struct { crawler.SocketHeahthCrawler } -func (r *RMIHeahthCrawler)Internal(params map[string]interface{}) ([]byte, error) { +func (r *RMIHeahthCrawler)Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/smb_protocol_crawler_go/smb_protocol_crawler.go b/health_crawler/smb_protocol_crawler_go/smb_protocol_crawler.go index 0debe6f..ccfd165 100644 --- a/health_crawler/smb_protocol_crawler_go/smb_protocol_crawler.go +++ b/health_crawler/smb_protocol_crawler_go/smb_protocol_crawler.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/smb" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type SMBHeahthCrawler struct { crawler.SocketHeahthCrawler } -func (r *SMBHeahthCrawler) Internal(params map[string]interface{}) ([]byte, error) { +func (r *SMBHeahthCrawler) Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/smtp_protocol_crawler_go/smtp_protocol_crawler.go b/health_crawler/smtp_protocol_crawler_go/smtp_protocol_crawler.go index 0811ce5..e47f968 100644 --- a/health_crawler/smtp_protocol_crawler_go/smtp_protocol_crawler.go +++ b/health_crawler/smtp_protocol_crawler_go/smtp_protocol_crawler.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/smtp" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type SMTPHeahthCrawler struct { crawler.SocketHeahthCrawler } -func (r *SMTPHeahthCrawler) Internal(params map[string]interface{}) ([]byte, error) { +func (r *SMTPHeahthCrawler) Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/snmpv2c_protocol_crawler_go/snmpv2c_protocol_crawler.go b/health_crawler/snmpv2c_protocol_crawler_go/snmpv2c_protocol_crawler.go index 006cd16..82e42e6 100644 --- a/health_crawler/snmpv2c_protocol_crawler_go/snmpv2c_protocol_crawler.go +++ b/health_crawler/snmpv2c_protocol_crawler_go/snmpv2c_protocol_crawler.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/snmp" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type SNMPV2CHeahthCrawler struct { crawler.SocketHeahthCrawler } -func (r *SNMPV2CHeahthCrawler)Internal(params map[string]interface{}) ([]byte, error) { +func (r *SNMPV2CHeahthCrawler)Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/snmpv3_protocol_crawler_go/snmpv3_protocol_crawler.go b/health_crawler/snmpv3_protocol_crawler_go/snmpv3_protocol_crawler.go index 8cc4bac..8c50063 100644 --- a/health_crawler/snmpv3_protocol_crawler_go/snmpv3_protocol_crawler.go +++ b/health_crawler/snmpv3_protocol_crawler_go/snmpv3_protocol_crawler.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/snmp" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type SNMPV3HeahthCrawler struct { crawler.SocketHeahthCrawler } -func (r *SNMPV3HeahthCrawler) Internal(params map[string]interface{}) ([]byte, error) { +func (r *SNMPV3HeahthCrawler) Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/ssh_protocol_crawler_go/ssh_protocol_crawler.go b/health_crawler/ssh_protocol_crawler_go/ssh_protocol_crawler.go index 48fadca..c690b38 100644 --- a/health_crawler/ssh_protocol_crawler_go/ssh_protocol_crawler.go +++ b/health_crawler/ssh_protocol_crawler_go/ssh_protocol_crawler.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/ssh" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type SSHHeahthCrawler struct { crawler.SocketHeahthCrawler } -func (r *SSHHeahthCrawler) Internal(params map[string]interface{}) ([]byte, error) { +func (r *SSHHeahthCrawler) Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/telnet_protocol_crawler_go/crawler_protocol_telnet.go b/health_crawler/telnet_protocol_crawler_go/crawler_protocol_telnet.go index 65c79dc..c70e5da 100644 --- a/health_crawler/telnet_protocol_crawler_go/crawler_protocol_telnet.go +++ b/health_crawler/telnet_protocol_crawler_go/crawler_protocol_telnet.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/telnet" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type TelnetHeahthCrawler struct { crawler.SocketHeahthCrawler } -func (r *TelnetHeahthCrawler)Internal(params map[string]interface{}) ([]byte, error) { +func (r *TelnetHeahthCrawler)Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil { diff --git a/health_crawler/wmi_protocol_crawler_go/wmi_protocol_crawler.go b/health_crawler/wmi_protocol_crawler_go/wmi_protocol_crawler.go index 606b818..1a2a378 100644 --- a/health_crawler/wmi_protocol_crawler_go/wmi_protocol_crawler.go +++ b/health_crawler/wmi_protocol_crawler_go/wmi_protocol_crawler.go @@ -4,13 +4,14 @@ import ( "encoding/json" "loafle.com/overflow/commons_go/matcher/wmi" "loafle.com/overflow/crawler_go" + "loafle.com/overflow/crawler_go/config" ) type WMIHeahthCrawler struct { crawler.SocketHeahthCrawler } -func (r *WMIHeahthCrawler)Internal(params map[string]interface{}) ([]byte, error) { +func (r *WMIHeahthCrawler)Internal(params config.Config) ([]byte, error) { b, err := r.CheckHeahth(params) if err != nil {