types

package
v0.0.0-...-81d58bd Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatteryStats

type BatteryStats struct {
	Capacity       int           `json:"capacity"`
	CapacityDesign int           `json:"capacityDesign"`
	Percentage     int           `json:"percentage"`
	Status         BatteryStatus `json:"status"`
	Voltage        int           `json:"voltage"`
}

BatteryStats represents battery statistics

type BatteryStatus

type BatteryStatus string

BatteryStatus represents the status of a battery

const (
	// BatteryStatusUnknown indicates an unknown battery status
	BatteryStatusUnknown BatteryStatus = "unknown"

	// BatteryStatusCharging indicates the battery is currently charging
	BatteryStatusCharging BatteryStatus = "charging"

	// BatteryStatusNotCharging indicates the battery is not charging
	BatteryStatusNotCharging BatteryStatus = "not charging"

	// BatteryStatusDischarging indicates the battery is currently discharging
	BatteryStatusDischarging BatteryStatus = "discharging"

	// BatteryStatusFull indicates the battery is fully charged
	BatteryStatusFull BatteryStatus = "full"
)

type BiosInfo

type BiosInfo struct {
	Vendor  string `json:"vendor"`
	Version string `json:"version"`
	Release string `json:"release"`
}

BiosInfo contains various information about the machine bios

type BoardInfo

type BoardInfo struct {
	ProductName  string `json:"product"`
	Manufacturer string `json:"manufacturer"`
	Version      string `json:"version"`
}

BoardInfo contains various information about the machine board

type ChassisInfo

type ChassisInfo struct {
	ID           int         `json:"id"`
	Type         ChassisType `json:"type"`
	Manufacturer string      `json:"manufacturer"`
	Version      string      `json:"version"`
}

ChassisInfo contains various information about the machine chassis

type ChassisType

type ChassisType string

ChassisType represents the standardized chassis type.

const (
	OtherChassis          ChassisType = "Other"
	UnknownChassis        ChassisType = "Unknown"
	DesktopChassis        ChassisType = "Desktop"
	LowProfileDesktop     ChassisType = "Low Profile Desktop"
	PizzaBoxChassis       ChassisType = "Pizza Box"
	MiniTowerChassis      ChassisType = "Mini Tower"
	TowerChassis          ChassisType = "Tower"
	PortableChassis       ChassisType = "Portable"
	LaptopChassis         ChassisType = "Laptop"
	NotebookChassis       ChassisType = "Notebook"
	HandHeldChassis       ChassisType = "Hand Held"
	DockingStation        ChassisType = "Docking Station"
	AllInOneChassis       ChassisType = "All in One"
	SubNotebookChassis    ChassisType = "Sub Notebook"
	SpaceSavingChassis    ChassisType = "Space-saving"
	LunchBoxChassis       ChassisType = "Lunch Box"
	MainServerChassis     ChassisType = "Main Server Chassis"
	ExpansionChassis      ChassisType = "Expansion Chassis"
	SubChassis            ChassisType = "SubChassis"
	BusExpansionChassis   ChassisType = "Bus Expansion Chassis"
	PeripheralChassis     ChassisType = "Peripheral Chassis"
	RAIDChassis           ChassisType = "RAID Chassis"
	RackMountChassis      ChassisType = "Rack Mount Chassis"
	SealedCasePC          ChassisType = "Sealed-case PC"
	MultiSystemChassis    ChassisType = "Multi-system chassis"
	CompactPCIChassis     ChassisType = "Compact PCI"
	AdvancedTCAChassis    ChassisType = "Advanced TCA"
	BladeChassis          ChassisType = "Blade"
	BladeEnclosureChassis ChassisType = "Blade Enclosure"
	TabletChassis         ChassisType = "Tablet"
	ConvertibleChassis    ChassisType = "Convertible"
	DetachableChassis     ChassisType = "Detachable"
	IoTGatewayChassis     ChassisType = "IoT Gateway"
	EmbeddedPCChassis     ChassisType = "Embedded PC"
	MiniPCChassis         ChassisType = "Mini PC"
	StickPCChassis        ChassisType = "Stick PC"
)

type DeviceType

type DeviceType string

DeviceType represents a system device type

const (
	// InputDeviceType represents an input device
	InputDeviceType DeviceType = "input"

	// PCIDeviceType represents a PCI device
	PCIDeviceType DeviceType = "pci"
)

type InputDevice

type InputDevice struct {
	Name    string `json:"name"`
	Product string `json:"product"`
}

InputDevice represents an input device

type MachineInfo

type MachineInfo struct {
	ProductName  string      `json:"productName"`
	Manufacturer string      `json:"manufacturer"`
	Version      string      `json:"version"`
	Chassis      ChassisInfo `json:"chassis"`
	Bios         BiosInfo    `json:"bios"`
	Board        BoardInfo   `json:"board"`
}

MachineInfo contains various information about the current machine

type PCIDevice

type PCIDevice struct {
	// ID is the unique identifier for the PCI device
	ID string `json:"id"`

	// Class represents the class code of the PCI device
	Class string `json:"class"`

	// Name is the name or description of the PCI device
	Name string `json:"name"`

	// VendorName is the name of the PCI device vendor
	VendorName string `json:"vendor_name"`

	// Vendor is the PCI vendor identifier
	Vendor string `json:"vendor"`

	// Device is the PCI device identifier
	Device string `json:"device"`

	// SubsystemDevice is the identifier for the PCI device's subsystem
	SubsystemDevice string `json:"subsystem_device"`

	// SubsystemVendor is the identifier for the PCI device's subsystem vendor
	SubsystemVendor string `json:"subsystem_vendor"`

	// Modalias is a string that represents the PCI device in a modalias format
	Modalias string `json:"modalias"`
}

PCIDevice represents a PCI (Peripheral Component Interconnect) device

type PCIDeviceMap

type PCIDeviceMap []PCIDeviceMapVendor

PCIDeviceMap represents a map of PCIDeviceMapVendor structs

type PCIDeviceMapDevice

type PCIDeviceMapDevice struct {
	ID   string
	Name string
}

PCIDeviceMapDevice represents a PCI (Peripheral Component Interconnect) device

type PCIDeviceMapVendor

type PCIDeviceMapVendor struct {
	ID      string
	Name    string
	Devices []PCIDeviceMapDevice
}

PCIDeviceMapVendor represents a PCI (Peripheral Component Interconnect) vendor

type Peripheral

type Peripheral struct {
	ID   string     `json:"id"`
	Name string     `json:"name"`
	Type DeviceType `json:"type"`
}

Peripheral represents a system peripheral.

Jump to

Keyboard shortcuts

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