battery

package
v0.0.42 Latest Latest
Warning

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

Go to latest
Published: May 30, 2016 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = modules.Module{
	Name:           "battery",
	CreateInstance: CreateInstance,
}

Functions

func CreateInstance

func CreateInstance(name string, config map[string]interface{}) (instance modules.ModuleInstance)

Types

type BatteryInfo

type BatteryInfo struct {
	Name               string  `json:"Name"`
	Status             string  `json:"Status"`
	Present            string  `json:"Present"`
	Technology         string  `json:"Technology"`
	Cycle_count        int     `json:"Cycle_Count"`
	Voltage_min_design int     `json:"Voltage_Min_Design"`
	Voltage_now        int     `json:"Voltage_Now"`
	Power_now          int     `json:"Power_Now"`
	Energy_full_design int     `json:"Energy_full_design"`
	Energy_full        int     `json:"Energy_full"`
	Energy_now         int     `json:"Energy_now"`
	Capacity           int     `json:"Capacity"`
	Capacity_level     string  `json:"Capacity_level"`
	Model_name         string  `json:"Module_name"`
	Manufacturer       string  `json:"Manufacturer"`
	Serial_number      string  `json:"Serial_number"`
	Percentage         float64 `json:"Percentage"`
}

func NewBatteryInfo

func NewBatteryInfo(fileName string) *BatteryInfo

type BatteryInstance

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

func (BatteryInstance) Name

func (i BatteryInstance) Name() string

func (BatteryInstance) RefreshInterval

func (i BatteryInstance) RefreshInterval() int

func (BatteryInstance) Render

func (i BatteryInstance) Render() (item modules.Item)

func (BatteryInstance) String

func (i BatteryInstance) String() (s string)

type BatteryItem

type BatteryItem struct {
	Name   string `json:"name"`
	Text   string `json:"full_text"`
	Markup string `json:"markup"`
}

func (BatteryItem) Marshal

func (e BatteryItem) Marshal() (bytes []byte)

Jump to

Keyboard shortcuts

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