mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-17 15:56:39 +00:00
Remove unused event store methods
This commit is contained in:
@@ -16,8 +16,6 @@ type Type string
|
||||
type Store interface {
|
||||
// Save an event in the store
|
||||
Save(event Event) (*Event, error)
|
||||
// GetSince returns a list of events from the store for a given account since the specified time
|
||||
GetSince(accountID string, from time.Time) ([]Event, error)
|
||||
// Get returns "limit" number of events from the "offset" index ordered descending or ascending by a timestamp
|
||||
Get(accountID string, offset, limit int, descending bool) ([]Event, error)
|
||||
// Close the sink flushing events if necessary
|
||||
|
||||
@@ -90,23 +90,6 @@ func (store *SQLiteStore) Get(accountID string, offset, limit int, descending bo
|
||||
return processResult(result)
|
||||
}
|
||||
|
||||
// GetSince returns a list of events from the store for a given account since the specified time
|
||||
func (store *SQLiteStore) GetSince(accountID string, from time.Time) ([]Event, error) {
|
||||
stmt, err := store.db.Prepare("SELECT id, operation, timestamp, modifier, target, account, type" +
|
||||
" FROM events WHERE account = ? and timestamp >= ?;")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result, err := stmt.Query(accountID, from)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
defer result.Close() //nolint
|
||||
return processResult(result)
|
||||
}
|
||||
|
||||
// Save an event in the SQLite events table
|
||||
func (store *SQLiteStore) Save(event Event) (*Event, error) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user