Documentation ¶
Overview ¶
Package ludos encapsulates logic used in LudOS, the Operating System version of Ludo. Here Ludo is used as a Desktop Environment and can perform actions like rebooting the system or enabling a daemon.
Index ¶
- Constants
- func ConnectNetwork(network Network, passphrase string) error
- func DownloadRelease(path, url string)
- func GetProgress() float64
- func GetReleases() (*[]GHRelease, error)
- func InitializeServiceSettingsValues(fields []*structs.Field)
- func IsDone() bool
- func IsDownloading() bool
- func NetworkStatus(network Network) string
- func ServiceSettingIncrCallback(f *structs.Field, direction int)
- func SystemdServiceToggle(path string, serviceName string, enable bool) error
- type GHAsset
- type GHRelease
- type Network
Constants ¶
const UpdatesDir = "/storage/.update/"
UpdatesDir is where releases should be saved to
Variables ¶
This section is empty.
Functions ¶
func ConnectNetwork ¶
ConnectNetwork attempt to establish a connection to the given network
func DownloadRelease ¶
func DownloadRelease(path, url string)
DownloadRelease will download a LudOS release from github
func GetReleases ¶
GetReleases will get and decode the json from github api, and return the list of LudOS releases
func InitializeServiceSettingsValues ¶
InitializeServiceSettingsValues is called after settings.yml is loaded. It sets the values of SSHService, SambaService and BluetoothService that don't depend on settings.yml but on the presence of files in the system.
func IsDownloading ¶
func IsDownloading() bool
IsDownloading returns true if the updater is currently downloading a release
func NetworkStatus ¶
NetworkStatus returns the status of a network
func ServiceSettingIncrCallback ¶
ServiceSettingIncrCallback is executed when a service settings is toggled. It enables or disables the daemon corresponding to the current setting field.
Types ¶
type GHAsset ¶
GHAsset is an asset attached to a github release
func FilterAssets ¶
FilterAssets finds and return the asset matching the LIBREELEC_ARCH
type Network ¶
Network is a network as detected by connman
var CurrentNetwork Network
CurrentNetwork is the network we're connected to
func ScanNetworks ¶
ScanNetworks enables connman and returns the list of available SSIDs