Documentation ¶
Index ¶
- func AppUpdater(ctx context.Context, update chan interface{})
- func BatteryUpdater(ctx context.Context, status chan interface{})
- func DiskUsageUpdater(ctx context.Context, status chan interface{})
- func GetHardwareDetails(ctx context.Context) (string, string)
- func GetHostname(ctx context.Context) string
- func LoadAvgUpdater(ctx context.Context, status chan interface{})
- func LocationUpdater(ctx context.Context, locationInfoCh chan interface{})
- func MemoryUpdater(ctx context.Context, status chan interface{})
- func NetworkConnectionsUpdater(ctx context.Context, status chan interface{})
- func NetworkStatsUpdater(ctx context.Context, status chan interface{})
- func NewBusRequest(ctx context.Context, busType dbusType) *busRequest
- func PowerUpater(ctx context.Context, status chan interface{})
- func ProblemsUpdater(ctx context.Context, status chan interface{})
- func ScreenLockUpdater(ctx context.Context, update chan interface{})
- func SetupContext(ctx context.Context) context.Context
- func TimeUpdater(ctx context.Context, status chan interface{})
- type LinuxDevice
- func (l *LinuxDevice) AppData() interface{}
- func (l *LinuxDevice) AppID() string
- func (l *LinuxDevice) AppName() string
- func (l *LinuxDevice) AppVersion() string
- func (l *LinuxDevice) DeviceID() string
- func (l *LinuxDevice) DeviceName() string
- func (l *LinuxDevice) Manufacturer() string
- func (l *LinuxDevice) MarshalJSON() ([]byte, error)
- func (l *LinuxDevice) Model() string
- func (l *LinuxDevice) OsName() string
- func (l *LinuxDevice) OsVersion() string
- func (l *LinuxDevice) SupportsEncryption() bool
- type LinuxDeviceAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppUpdater ¶
func BatteryUpdater ¶
func DiskUsageUpdater ¶
func GetHardwareDetails ¶
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 ¶
GetHostname will try to fetch the hostname of the device from DBus. Failing that, it will default to using "localhost"
func LoadAvgUpdater ¶
func LocationUpdater ¶
func MemoryUpdater ¶
func NetworkStatsUpdater ¶
func NewBusRequest ¶ added in v1.0.0
func PowerUpater ¶
func ProblemsUpdater ¶
func ScreenLockUpdater ¶ added in v1.1.0
func TimeUpdater ¶ added in v0.3.0
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.
Source Files ¶
- api.go
- appSensor.go
- appSensorProps.go
- batterySensor.go
- batterySensorProps.go
- dbus.go
- dbusTypesStringer.go
- device.go
- diskSensor.go
- loadavgSensor.go
- locationSensor.go
- memorySensor.go
- memorySensorProps.go
- networkConnectionSensor.go
- networkConnectionSensorProps.go
- networkStatsSensor.go
- networkStatsSensorProps.go
- polling.go
- powerSensor.go
- powerSensorProps.go
- problemsSensor.go
- screenlockSensor.go
- timeSensor.go
- timeSensorProps.go
Click to show internal directories.
Click to hide internal directories.