system

package
v0.0.0-...-7495956 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2019 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EscalatePrivileges

func EscalatePrivileges() (bool, error)

func GetProcessId

func GetProcessId() (int, error)

func GetSystemDirectories

func GetSystemDirectories() ([]map[string]string, error)

Types

type BatteryInfo

type BatteryInfo []*battery.Battery

func GetBatteries

func GetBatteries() BatteryInfo

func (*BatteryInfo) GetBatteryPercent

func (b *BatteryInfo) GetBatteryPercent() float64

* Returns current battery level percent (float64)

func (*BatteryInfo) GetChargingRate

func (b *BatteryInfo) GetChargingRate(raw ...bool) interface{}

* Returns charging rate * * Formatted as string in Watts by default (indicating charge/discharge status) * If optional "raw" parameter is supplied a true value, raw rate in mW is returned

type CpuCore

type CpuCore struct {
	Index        int32
	VendorID     string
	ModelName    string
	MaxFrequency float64
}

type CpuInfo

type CpuInfo struct {
	Architecture   string
	AvailableCores []CpuCore
	EnabledCores   []CpuCore
}

func (*CpuInfo) GetCPUInfo

func (c *CpuInfo) GetCPUInfo()

type HostInfo

type HostInfo struct {
	Cpu CpuInfo
	Os  OsInfo
}

func GetInfo

func GetInfo() HostInfo

type OsInfo

type OsInfo struct {
	Hostname string
	Platform string
	Version  string
	Kernel   string
}

Jump to

Keyboard shortcuts

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