linux

package
v1.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppUpdater

func AppUpdater(ctx context.Context, update chan interface{})

func BatteryUpdater

func BatteryUpdater(ctx context.Context, status chan interface{})

func DiskUsageUpdater

func DiskUsageUpdater(ctx context.Context, status chan interface{})

func GetHardwareDetails

func GetHardwareDetails(ctx context.Context) (string, string)

GetHardwareDetails will try to get a hardware vendor and model from DBus. Failing that, it will try to read them from the /sys filesystem. If that fails, it returns empty strings for these values

func GetHostname

func GetHostname(ctx context.Context) string

GetHostname will try to fetch the hostname of the device from DBus. Failing that, it will default to using "localhost"

func LoadAvgUpdater

func LoadAvgUpdater(ctx context.Context, status chan interface{})

func LocationUpdater

func LocationUpdater(ctx context.Context, locationInfoCh chan interface{})

func MemoryUpdater

func MemoryUpdater(ctx context.Context, status chan interface{})

func NetworkConnectionsUpdater

func NetworkConnectionsUpdater(ctx context.Context, status chan interface{})

func NetworkStatsUpdater

func NetworkStatsUpdater(ctx context.Context, status chan interface{})

func NewBusRequest added in v1.0.0

func NewBusRequest(ctx context.Context, busType dbusType) *busRequest

func PowerUpater

func PowerUpater(ctx context.Context, status chan interface{})

func ProblemsUpdater

func ProblemsUpdater(ctx context.Context, status chan interface{})

func ScreenLockUpdater added in v1.1.0

func ScreenLockUpdater(ctx context.Context, update chan interface{})

func SetupContext added in v1.0.0

func SetupContext(ctx context.Context) context.Context

func TimeUpdater added in v0.3.0

func TimeUpdater(ctx context.Context, status chan interface{})

Types

type LinuxDevice added in v1.4.3

type LinuxDevice struct {
	// contains filtered or unexported fields
}

func NewDevice added in v1.0.0

func NewDevice(ctx context.Context, name string, version string) *LinuxDevice

func (*LinuxDevice) AppData added in v1.4.3

func (l *LinuxDevice) AppData() interface{}

func (*LinuxDevice) AppID added in v1.4.3

func (l *LinuxDevice) AppID() string

func (*LinuxDevice) AppName added in v1.4.3

func (l *LinuxDevice) AppName() string

func (*LinuxDevice) AppVersion added in v1.4.3

func (l *LinuxDevice) AppVersion() string

func (*LinuxDevice) DeviceID added in v1.4.3

func (l *LinuxDevice) DeviceID() string

func (*LinuxDevice) DeviceName added in v1.4.3

func (l *LinuxDevice) DeviceName() string

func (*LinuxDevice) Manufacturer added in v1.4.3

func (l *LinuxDevice) Manufacturer() string

func (*LinuxDevice) MarshalJSON added in v1.4.3

func (l *LinuxDevice) MarshalJSON() ([]byte, error)

func (*LinuxDevice) Model added in v1.4.3

func (l *LinuxDevice) Model() string

func (*LinuxDevice) OsName added in v1.4.3

func (l *LinuxDevice) OsName() string

func (*LinuxDevice) OsVersion added in v1.4.3

func (l *LinuxDevice) OsVersion() string

func (*LinuxDevice) SupportsEncryption added in v1.4.3

func (l *LinuxDevice) SupportsEncryption() bool

type LinuxDeviceAPI added in v1.0.0

type LinuxDeviceAPI struct {
	// contains filtered or unexported fields
}

func NewDeviceAPI

func NewDeviceAPI(ctx context.Context) *LinuxDeviceAPI

NewDeviceAPI sets up a DeviceAPI struct with appropriate DBus API endpoints.

func (*LinuxDeviceAPI) EndPoint added in v1.0.0

func (d *LinuxDeviceAPI) EndPoint(e string) interface{}

EndPoint will return the given endpoint as an interface. Use device.GetAPIEndpoint to safely assert the type of the API.

func (*LinuxDeviceAPI) SensorWorkers added in v1.0.0

func (d *LinuxDeviceAPI) SensorWorkers() []func(context.Context, chan interface{})

SensorWorkers returns a list of functions to start to enable sensor tracking.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL