sysinfo

package
v0.0.0-...-d7fb6e2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllPkgManagers = []string{
	"dpkg",
	"apk",
	"kiss",
	"cpt-list",
	"snap",
}
View Source
var HTTPClient = http.Client{
	Timeout: time.Second * 3,
}

Functions

func Battery

func Battery() (*battery.Battery, error)

func CountPkgs

func CountPkgs(manager string) (int, error)

func Disk

func Disk() ([]*disk.UsageStat, error)

func Distro

func Distro() string

func GPU

func GPU() (string, error)

func Hostname

func Hostname() string

func LocalIP

func LocalIP() (net.IP, error)

func Locale

func Locale() (language.Tag, error)

func Memory

func Memory() (*mem.VirtualMemoryStat, error)

func NumProcs

func NumProcs() (int, error)

func Pkgs

func Pkgs(show []string) map[string]int

func PublicIP

func PublicIP() (net.IP, error)

func Resolution

func Resolution() []image.Rectangle

func Swap

func Swap() (*mem.SwapMemoryStat, error)

func Terminal

func Terminal() (string, error)

func Usage

func Usage() (float64, error)

func Username

func Username() string

func Wallpaper

func Wallpaper() (string, error)

func Weather

func Weather() (string, error)

Types

type BiosInfo

type BiosInfo struct {
	Manufacturer string `json:"manufacturer"`
	Version      string `json:"version"`
	ReleaseDate  string `json:"release_date"`
}

func Bios

func Bios() (BiosInfo, error)

type CPUInfo

type CPUInfo struct {
	Model   string  `json:"model"`
	Cores   int32   `json:"cores"`
	Threads int32   `json:"threads"`
	Mhz     float64 `json:"mhz"`
}

func CPU

func CPU() (CPUInfo, error)

type ModelInfo

type ModelInfo struct {
	Manufacturer string `json:"manufacturer"`
	Model        string `json:"model"`
}

func Model

func Model() (ModelInfo, error)

type MotherboardInfo

type MotherboardInfo struct {
	Manufacturer string `json:"manufacturer"`
	Product      string `json:"product"`
}

func Motherboard

func Motherboard() (MotherboardInfo, error)

type ShellInfo

type ShellInfo struct {
	Name    string
	Exe     string
	Version string
}

func Shell

func Shell() ShellInfo

Jump to

Keyboard shortcuts

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