Documentation ¶
Index ¶
- Variables
- func ActiveDomainsWithDomain(active bool, domain string) error
- func ActiveDomainsWithListID(active bool, ListID string) error
- func GetConflictingDomains(domains []string, listID string) map[string]hooks.DomainsRowMetaInfo
- func GetDomains() ([]hooks.DomainsRow, error)
- func GetLastScan(id int) (hooks.ScanRow, error)
- func GetScans(table string, scanID int, scanStatus uint8) ([]hooks.DomainsReachable, error)
- func InsertNewScan(scan hooks.ScanRow) (hooks.ScanRow, error)
- func InsertScanData(tables []string, scanData []hooks.ScanData) error
- func OpenDatabase(conf SQLConfiguration) error
- func PrepareScanData(table string, scanID int, scanType int) error
- func RemoveDomainsWithDomain(domain string) error
- func RemoveDomainsWithDomainAndList(domain string, list string) error
- func RemoveDomainsWithListID(ListID string) error
- func RemoveIgnored(scan hooks.ScanRow) error
- func ResetDomains() error
- func SaveCertificateChains(rows []*hooks.CertificateChainRow, table string) error
- func SaveCertificates(rows []*hooks.CertificateRow, table string) error
- func SaveResults(table string, whereCond *structs.Struct, results *structs.Struct) error
- func SaveUnreachable(scanID int, DomainID int, DNSError bool) error
- func ScanDomainsWithDomain(domain string) error
- func ScanDomainsWithListID(list string) error
- func ScanDomainsWithProjectID(projectId string) error
- func UpdateDomainsFull(rows []hooks.DomainsRowMetaInfo) error
- func UpdateScan(scan hooks.ScanRow) error
- type SQLConfiguration
Constants ¶
This section is empty.
Variables ¶
var Logger *logrus.Entry
Functions ¶
func ActiveDomainsWithDomain ¶
ActiveDomainsWithDomain changes the isActive field to the specified value for the given domain
func ActiveDomainsWithListID ¶
ActiveDomainsWithListID sets the active field of all domains in that list to the specified value
func GetConflictingDomains ¶
func GetConflictingDomains(domains []string, listID string) map[string]hooks.DomainsRowMetaInfo
GetConflictingDomains returns the domains with conflicting listID in form of a map
func GetDomains ¶
func GetDomains() ([]hooks.DomainsRow, error)
GetDomains returns the active domains, that are in the nextScan
func GetLastScan ¶
GetLastScan returns the specified by Id. If id==0, then it returns the last unfinished scan
func GetScans ¶
GetScans returns all Domains and their Reachability and how they should be tested. They are selected by the specified "scanID" and the "ScanStatus"
func InsertNewScan ¶
InsertNewScan creates a new Entry in the ScanTable and returns the ScanID
func InsertScanData ¶
InsertScanData adds scanData to the scan-Databases
func OpenDatabase ¶
func OpenDatabase(conf SQLConfiguration) error
OpenDatabase opens the database used for accessing domains and saving results
func PrepareScanData ¶
PrepareScanData modifies the pending scans according to the "scanType". Entries are duplicated with diffrent "TestWithSSL"-Values, if both Protocols are supported and wanted. If the wanted Protocol is not supported, they are marked with SCAN_STATUS IGNORED.
func RemoveDomainsWithDomain ¶
RemoveDomainsWithDomain removes all specified domains from a list
func RemoveDomainsWithDomainAndList ¶
RemoveDomainsWithDomainAndList deletes the specified domains from the specified list
func RemoveDomainsWithListID ¶
RemoveDomainsWithListID deletes the specified list
func RemoveIgnored ¶
Remove results with ScanStgatus ignored (2)
func SaveCertificateChains ¶
func SaveCertificateChains(rows []*hooks.CertificateChainRow, table string) error
SaveCertificateChains stores all given certificate chains in the Table, while avoiding duplicate entries
func SaveCertificates ¶
func SaveCertificates(rows []*hooks.CertificateRow, table string) error
SaveCertificates stores all given Certificates in the Table, while avoiding duplicate entries
func SaveResults ¶
SaveResults updates table columns defined by "results" for the row defined by "whereCond". The "whereCond"-Parameters are concatenated by ANDs
func SaveUnreachable ¶
SaveUnreachable stores unreachable Domains in the corresponding table
func ScanDomainsWithDomain ¶
ScanDomainsWithDomain adds the specified domain to the next Scan
func ScanDomainsWithListID ¶
ScanDomainsWithListID adds all domains with the specified ListID to the nextScan
func ScanDomainsWithProjectID ¶
ScanDomainsWithProjectID adds all domains with the specified ProjectId to the nextScan
func UpdateDomainsFull ¶
func UpdateDomainsFull(rows []hooks.DomainsRowMetaInfo) error
UpdateDomainsFull updates the Domains-Table with the given domains.
Types ¶
type SQLConfiguration ¶
type SQLConfiguration struct { SQLServer string SQLUserID string SQLPassword string SQLDatabase string SQLEncryption string }
SQLConfiguration collects the Data needed for Connecting to an SQL-Database
func ReadSQLConfig ¶
func ReadSQLConfig(file string) (SQLConfiguration, error)
ReadSQLConfig extracts the information out of the "sql_config.json" file