Documentation
¶
Index ¶
- Variables
- func AddDevice(device scanner.Device)
- func ClearDevices()
- func ClearDevicesAndDB()
- func Close()
- func GetDeviceByIP(ip string) (scanner.Device, int, bool)
- func GetDevices() []scanner.Device
- func Init()
- func InitDatabase()
- func LoadDevicesFromDB()
- func LoadRecentDevicesFromDB(since time.Duration)
- func LoadSetting(key string) string
- func SaveDevicesToDB()
- func SaveSetting(key, value string)
- func SetScanProgress(message string)
- func SetScanning(scanning bool)
- func UpdateDevice(index int, device scanner.Device)
- func UpdateDeviceConnection(index int, connected bool)
- func UpdateDeviceCredentials(index int, username, password string)
Constants ¶
This section is empty.
Variables ¶
var ( // DeviceList holds the list of discovered devices DeviceList binding.UntypedList // ScanProgress holds the current scan progress message ScanProgress binding.String // IsScanning indicates if a scan is currently running IsScanning binding.Bool // Database instance DB *database.DB )
Global data bindings
Functions ¶
func ClearDevices ¶
func ClearDevices()
ClearDevices removes all devices from the list (does not clear database)
func ClearDevicesAndDB ¶
func ClearDevicesAndDB()
ClearDevicesAndDB removes all devices from list and database
func GetDeviceByIP ¶
GetDeviceByIP finds a device by IP address
func InitDatabase ¶
func InitDatabase()
InitDatabase initializes the database after the main app has started
func LoadDevicesFromDB ¶
func LoadDevicesFromDB()
LoadDevicesFromDB loads devices from database and adds them to the device list
func LoadRecentDevicesFromDB ¶
LoadRecentDevicesFromDB loads only recently seen devices from database
func LoadSetting ¶
LoadSetting loads an application setting from database
func SaveSetting ¶
func SaveSetting(key, value string)
SaveSetting saves an application setting to database
func SetScanProgress ¶
func SetScanProgress(message string)
SetScanProgress updates the scan progress message
func UpdateDevice ¶
UpdateDevice updates a device both in memory and database
func UpdateDeviceConnection ¶
UpdateDeviceConnection updates device connection status both in memory and database
func UpdateDeviceCredentials ¶
UpdateDeviceCredentials updates device credentials both in memory and database
Types ¶
This section is empty.