mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 11:37:01 -07:00
Rename BMCProbeResult to ScannedResult and remove from collect.go
This commit is contained in:
parent
54dde2dda6
commit
4694353220
2 changed files with 5 additions and 11 deletions
|
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/jmoiron/sqlx"
|
||||
)
|
||||
|
||||
func InsertProbeResults(path string, states *[]magellan.BMCProbeResult) error {
|
||||
func InsertProbeResults(path string, states *[]magellan.ScannedResult) error {
|
||||
if states == nil {
|
||||
return fmt.Errorf("states == nil")
|
||||
}
|
||||
|
|
@ -46,13 +46,13 @@ func InsertProbeResults(path string, states *[]magellan.BMCProbeResult) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func GetProbeResults(path string) ([]magellan.BMCProbeResult, error) {
|
||||
func GetProbeResults(path string) ([]magellan.ScannedResult, error) {
|
||||
db, err := sqlx.Open("sqlite3", path)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not open database: %v", err)
|
||||
}
|
||||
|
||||
results := []magellan.BMCProbeResult{}
|
||||
results := []magellan.ScannedResult{}
|
||||
err = db.Select(&results, "SELECT * FROM magellan_scanned_ports ORDER BY host ASC, port ASC;")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not retrieve probes: %v", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue