Versions in this module Expand all Collapse all v0 v0.0.3 Feb 3, 2022 v0.0.2 Feb 3, 2022 v0.0.1 Feb 2, 2022 Changes in this version + var RollbackError = errors.New("rollback this tx") + func Connect(databaseURL string) (*sqlx.DB, func(), error) + func DB() *sqlx.DB + func Init(databaseURL string) error + func TestDBURL() string + func WithTransaction(f func(*sqlx.Tx) error) error + type ScanAggr struct + Host string + NumberOfSamples int + Up bool + type ScanAggrStore struct + func NewDefaultScanAggrStore() *ScanAggrStore + func NewScanAggrStore(dbh dbHandler) *ScanAggrStore + func (store *ScanAggrStore) AllScanAggregationsFor(interval time.Duration) ([]ScanAggr, error) + type ScanResult struct + CreatedAt time.Time + Host string + Plaftorm string + QueryData []byte + ResultID int + ScanIP string + Up bool + type ScanResultStore struct + func NewDefaultScanResultStore() *ScanResultStore + func NewScanResultStore(dbh dbHandler) *ScanResultStore + func (store *ScanResultStore) AllScanResults() ([]*ScanResult, error) + func (store *ScanResultStore) DeleteResultsOlderThan(age time.Duration) error + func (store *ScanResultStore) SaveScanResult(sr *ScanResult) error + func (store *ScanResultStore) SelectScanResults(query string) ([]*ScanResult, error)