upower

package
v0.0.0-...-9c92d33 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

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

func (*Device) GetPercentage

func (d *Device) GetPercentage() (int, error)

func (*Device) GetState

func (d *Device) GetState() (State, error)

func (*Device) GetStateText

func (d *Device) GetStateText() (string, error)

func (*Device) GetTimeToEmpty

func (d *Device) GetTimeToEmpty() (time.Duration, error)

func (*Device) GetTimeToFull

func (d *Device) GetTimeToFull() (time.Duration, error)

type Paths

type Paths []dbus.ObjectPath

func (*Paths) Batteries

func (d *Paths) Batteries() *Paths

type State

type State uint32
const (
	UNKNOWN           State = iota
	CHARGING          State = iota
	DISCHARGING       State = iota
	EMPTY             State = iota
	FULLY_CHARGED     State = iota
	PENDING_CHARGE    State = iota
	PENDING_DISCHARGE State = iota
)

type Upower

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

func New

func New() (*Upower, error)

func (*Upower) Details

func (u *Upower) Details(path dbus.ObjectPath) *Device

func (*Upower) Enumerate

func (u *Upower) Enumerate() (*Paths, error)

Jump to

Keyboard shortcuts

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