Documentation ¶
Overview ¶
Package storage implements a wrapper using the yaml file as "backend"
Index ¶
- type Helper
- func (storageHelper *Helper) AddAlarm(alarm types.Alarm) ([]types.Alarm, error)
- func (storageHelper *Helper) DeleteAlarm(alarmIdx int) ([]types.Alarm, error)
- func (storageHelper *Helper) GetAlarm(idx int, withWritePermission bool) (types.Alarm, error)
- func (storageHelper *Helper) GetAlarms(withWritePermission bool) ([]types.Alarm, error)
- func (storageHelper *Helper) GetRadio(withWritePermission bool) (types.Radio, error)
- func (storageHelper *Helper) GetSettings() (Settings, error)
- func (storageHelper *Helper) SaveAlarm(idx int, alarm types.Alarm) (types.Alarm, error)
- func (storageHelper *Helper) SaveRadio(radio types.Radio) (types.Radio, error)
- func (storageHelper *Helper) SaveStoredData(data RpiRadioAlarmData)
- func (storageHelper *Helper) SwitchRadio(running bool) (types.Radio, error)
- type RpiRadioAlarmData
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Helper ¶
Helper struct to sync access to the storage
func (*Helper) DeleteAlarm ¶
DeleteAlarm delets the alarm on the given index
func (*Helper) GetSettings ¶
GetSettings returns the setings stored in the file
func (*Helper) SaveStoredData ¶
func (storageHelper *Helper) SaveStoredData(data RpiRadioAlarmData)
SaveStoredData save the data to storage and releases the lock
Click to show internal directories.
Click to hide internal directories.