14 lines
385 B
Go
14 lines
385 B
Go
package db
|
|
|
|
// AlarmStore defines the interface for alarm CRUD operations.
|
|
// Implemented by *Store (local SQLite) and api.Client (remote HTTP).
|
|
type AlarmStore interface {
|
|
ListAlarms() ([]Alarm, error)
|
|
GetAlarm(id int) (Alarm, error)
|
|
CreateAlarm(a Alarm) (int, error)
|
|
UpdateAlarm(a Alarm) error
|
|
DeleteAlarm(id int) error
|
|
ToggleAlarm(id int) error
|
|
MarkTriggered(id int) error
|
|
}
|