types

package
v1.7.3-0...-caeaf44 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatteryData

type BatteryData struct {
	IsCharging    *bool    `json:"is_charging"`
	Percentage    *float64 `json:"percentage"`
	TimeRemaining *float64 `json:"time_remaining"` // Seconds remaining
}

BatteryData represents battery information

type CPUData

type CPUData struct {
	Count        *int          `json:"count"`
	Name         *string       `json:"name"`
	Vendor       *string       `json:"vendor"`
	Family       *string       `json:"family"`
	Frequency    *CPUFrequency `json:"frequency"`
	LoadAverage  *float64      `json:"load_average"`
	PerCPU       []PerCPU      `json:"per_cpu"`
	Power        *float64      `json:"power"`
	Stats        *CPUStats     `json:"stats"`
	Temperature  *float64      `json:"temperature"`
	Times        *CPUTimes     `json:"times"`
	TimesPercent *CPUTimes     `json:"times_percent"`
	Usage        *float64      `json:"usage"`
	Voltage      *float64      `json:"voltage"`
}

CPUData represents overall CPU information

type CPUFrequency

type CPUFrequency struct {
	Current *float64 `json:"current"`
	Min     *float64 `json:"min"`
	Max     *float64 `json:"max"`
}

CPUFrequency represents CPU frequency information

type CPUStats

type CPUStats struct {
	CtxSwitches    *int64 `json:"ctx_switches"`    // Context switches count
	Interrupts     *int64 `json:"interrupts"`      // Hardware interrupts count
	SoftInterrupts *int64 `json:"soft_interrupts"` // Software interrupts count
	Syscalls       *int64 `json:"syscalls"`        // System calls count
}

CPUStats represents CPU statistics

type CPUTimes

type CPUTimes struct {
	User      *float64 `json:"user"`
	System    *float64 `json:"system"`
	Idle      *float64 `json:"idle"`
	Interrupt *float64 `json:"interrupt"`
	DPC       *float64 `json:"dpc"`
}

CPUTimes represents CPU timing information

type DeviceInfo

type DeviceInfo struct {
	Manufacturer *string `json:"manufacturer" mapstructure:"manufacturer"`
	Model        *string `json:"model" mapstructure:"model"`
	Version      *string `json:"version" mapstructure:"version"`
	BoardVendor  *string `json:"board_vendor" mapstructure:"board_vendor"`
	BoardName    *string `json:"board_name" mapstructure:"board_name"`
	BIOSVendor   *string `json:"bios_vendor" mapstructure:"bios_vendor"`
	BIOSVersion  *string `json:"bios_version" mapstructure:"bios_version"`
	ChassisType  *string `json:"chassis_type" mapstructure:"chassis_type"`
}

DeviceInfo represents hardware and firmware identity from DMI/SMBIOS. Populated best-effort on Linux from /sys/class/dmi/id. Fields that require elevated privileges (such as serial numbers) are intentionally omitted.

type Disk

type Disk struct {
	Name        string          `json:"name"`
	Partitions  []DiskPartition `json:"partitions"`
	IOCounters  *DiskIOCounters `json:"io_counters"`
	Temperature *float64        `json:"temperature"`
}

Disk represents information about a single disk device

type DiskIOCounters

type DiskIOCounters struct {
	ReadCount  uint64 `json:"read_count"`
	WriteCount uint64 `json:"write_count"`
	ReadBytes  uint64 `json:"read_bytes"`
	WriteBytes uint64 `json:"write_bytes"`
	ReadTime   uint64 `json:"read_time"`
	WriteTime  uint64 `json:"write_time"`
}

DiskIOCounters represents disk I/O statistics

type DiskMountCategory

type DiskMountCategory string

DiskMountCategory represents the category of a mount point

const (
	DiskMountCategoryPrimary  DiskMountCategory = "primary"
	DiskMountCategoryBind     DiskMountCategory = "bind"
	DiskMountCategorySquashFS DiskMountCategory = "squashfs"
)

type DiskMountInfo

type DiskMountInfo struct {
	Device         string            `json:"device"`
	MountPoint     string            `json:"mount_point"`
	FilesystemType string            `json:"filesystem_type"`
	Category       DiskMountCategory `json:"category"`
	Usage          *DiskUsage        `json:"usage"`
}

DiskMountInfo represents a single mount point with its category

type DiskMountsResponse

type DiskMountsResponse struct {
	Primary   []DiskMountInfo     `json:"primary"`
	Secondary DiskMountsSecondary `json:"secondary"`
}

DiskMountsResponse is the response for GET_DISK_MOUNTS

type DiskMountsSecondary

type DiskMountsSecondary struct {
	Bind     []DiskMountInfo `json:"bind"`
	SquashFS []DiskMountInfo `json:"squashfs"`
}

DiskMountsSecondary groups secondary mounts by category

type DiskPartition

type DiskPartition struct {
	Device         string            `json:"device"`
	MountPoint     string            `json:"mount_point"`
	FilesystemType string            `json:"filesystem_type"`
	Options        string            `json:"options"`
	MaxFileSize    int64             `json:"max_file_size"`
	MaxPathLength  int64             `json:"max_path_length"`
	Category       DiskMountCategory `json:"category"`
	Usage          *DiskUsage        `json:"usage"`
}

DiskPartition represents information about a disk partition

type DiskUsage

type DiskUsage struct {
	Total   uint64  `json:"total"`
	Used    uint64  `json:"used"`
	Free    uint64  `json:"free"`
	Percent float64 `json:"percent"`
}

DiskUsage represents disk space usage information

type DisksData

type DisksData struct {
	Devices    []Disk          `json:"devices"`
	IOCounters *DiskIOCounters `json:"io_counters"`
}

DisksData represents information about all disk devices

type Display

type Display struct {
	ID                   string   `json:"id"`
	Name                 string   `json:"name"`
	ResolutionHorizontal int      `json:"resolution_horizontal"`
	ResolutionVertical   int      `json:"resolution_vertical"`
	X                    int      `json:"x"`
	Y                    int      `json:"y"`
	Width                *int     `json:"width"`
	Height               *int     `json:"height"`
	IsPrimary            *bool    `json:"is_primary"`
	PixelClock           *float64 `json:"pixel_clock"`
	RefreshRate          *float64 `json:"refresh_rate"`
}

Display represents information about a display device

type DisplaysData

type DisplaysData = []Display

DisplaysData represents information about all display devices

type Fan

type Fan struct {
	SensorKey string   `json:"key"`       // Stable identifier, e.g. "dell_smm_fan1"
	Name      string   `json:"name"`      // Human readable name, prefers the hwmon label
	Label     string   `json:"label"`     // Raw hwmon label when provided by the driver
	SpeedRPM  *float64 `json:"speed_rpm"` // Current fan speed in revolutions per minute
	SpeedMin  *float64 `json:"speed_min"` // Minimum fan speed in RPM when reported
	SpeedMax  *float64 `json:"speed_max"` // Maximum fan speed in RPM when reported
}

Fan represents a single fan sensor reading

type GPU

type GPU struct {
	ID          string   `json:"id"`
	Name        string   `json:"name"`
	CoreClock   *float64 `json:"core_clock"`
	CoreLoad    *float64 `json:"core_load"`
	FanSpeed    *float64 `json:"fan_speed"`
	MemoryClock *float64 `json:"memory_clock"`
	MemoryLoad  *float64 `json:"memory_load"`
	MemoryFree  *float64 `json:"memory_free"`
	MemoryUsed  *float64 `json:"memory_used"`
	MemoryTotal *float64 `json:"memory_total"`
	PowerUsage  *float64 `json:"power_usage"`
	Temperature *float64 `json:"temperature"`
}

GPU represents information about a GPU device

type GPUsData

type GPUsData = []GPU

GPUsData represents information about all GPU devices

type MediaData

type MediaData struct {
	AlbumArtist          *string  `json:"album_artist"`
	AlbumTitle           *string  `json:"album_title"`
	Artist               *string  `json:"artist"`
	Duration             *float64 `json:"duration"`
	IsFastForwardEnabled *bool    `json:"is_fast_forward_enabled"`
	IsNextEnabled        *bool    `json:"is_next_enabled"`
	IsPauseEnabled       *bool    `json:"is_pause_enabled"`
	IsPlayEnabled        *bool    `json:"is_play_enabled"`
	IsPreviousEnabled    *bool    `json:"is_previous_enabled"`
	IsRewindEnabled      *bool    `json:"is_rewind_enabled"`
	IsStopEnabled        *bool    `json:"is_stop_enabled"`
	PlaybackRate         *float64 `json:"playback_rate"`
	Position             *float64 `json:"position"`
	Repeat               *string  `json:"repeat"`
	Shuffle              *bool    `json:"shuffle"`
	Status               *string  `json:"status"`
	Subtitle             *string  `json:"subtitle"`
	Thumbnail            *string  `json:"thumbnail"`
	Title                *string  `json:"title"`
	TrackNumber          *int     `json:"track_number"`
	Type                 *string  `json:"type"`
	UpdatedAt            *float64 `json:"updated_at"`
	Volume               *float64 `json:"volume"`
}

MediaData represents media information

type MemoryData

type MemoryData struct {
	Swap    *MemorySwap    `json:"swap"`
	Virtual *MemoryVirtual `json:"virtual"`
}

MemoryData represents overall memory information

type MemorySwap

type MemorySwap struct {
	Total   *uint64  `json:"total"`
	Used    *uint64  `json:"used"`
	Free    *uint64  `json:"free"`
	Percent *float64 `json:"percent"`
	Sin     *uint64  `json:"sin"`
	Sout    *uint64  `json:"sout"`
}

MemorySwap represents swap memory information

type MemoryVirtual

type MemoryVirtual struct {
	Total     *uint64  `json:"total"`
	Available *uint64  `json:"available"`
	Percent   *float64 `json:"percent"`
	Used      *uint64  `json:"used"`
	Free      *uint64  `json:"free"`
	Active    *uint64  `json:"active"`
	Inactive  *uint64  `json:"inactive"`
	Buffers   *uint64  `json:"buffers"`
	Cached    *uint64  `json:"cached"`
	Wired     *uint64  `json:"wired"`
	Shared    *uint64  `json:"shared"`
}

MemoryVirtual represents virtual memory information

type Module

type Module struct {
	Name    ModuleName `json:"module" mapstructure:"module"`
	Updater Updater
	Data    any    `json:"data" mapstructure:"data"`
	Updated string `json:"updated" mapstructure:"updated"`
}

Module represents a data module

type ModuleName

type ModuleName string

ModuleName represents the type of data module

const (
	ModuleBattery   ModuleName = "battery"
	ModuleCPU       ModuleName = "cpu"
	ModuleDisks     ModuleName = "disks"
	ModuleDisplays  ModuleName = "displays"
	ModuleGPUs      ModuleName = "gpus"
	ModuleMedia     ModuleName = "media"
	ModuleMemory    ModuleName = "memory"
	ModuleNetworks  ModuleName = "networks"
	ModuleProcesses ModuleName = "processes"
	ModuleSensors   ModuleName = "sensors"
	ModuleSystem    ModuleName = "system"
)

type Network

type Network struct {
	Name      *string          `json:"name"`
	Addresses []NetworkAddress `json:"addresses"`
	Stats     *NetworkStats    `json:"stats"`
}

Network represents information about a network interface

type NetworkAddress

type NetworkAddress struct {
	Address   *string `json:"address"`
	Family    *string `json:"family"`
	Netmask   *string `json:"netmask"`
	Broadcast *string `json:"broadcast"`
	PTP       *string `json:"ptp"`
}

NetworkAddress represents information about a network address

type NetworkConnection

type NetworkConnection struct {
	FD     *int    `json:"fd"`
	Family *int    `json:"family"`
	Type   *int    `json:"type"`
	LAddr  *string `json:"laddr"`
	RAddr  *string `json:"raddr"`
	Status *string `json:"status"`
	PID    *int    `json:"pid"`
}

NetworkConnection represents a network connection

type NetworkIO

type NetworkIO struct {
	BytesSent   *int64 `json:"bytes_sent"`
	BytesRecv   *int64 `json:"bytes_recv"`
	PacketsSent *int64 `json:"packets_sent"`
	PacketsRecv *int64 `json:"packets_recv"`
	ErrIn       *int64 `json:"errin"`
	ErrOut      *int64 `json:"errout"`
	DropIn      *int64 `json:"dropin"`
	DropOut     *int64 `json:"dropout"`
}

NetworkIO represents network I/O statistics

type NetworkStats

type NetworkStats struct {
	IsUp   *bool    `json:"isup"`
	Duplex *string  `json:"duplex"`
	Speed  *int     `json:"speed"`
	MTU    *int     `json:"mtu"`
	Flags  []string `json:"flags"`
}

NetworkStats represents network interface statistics

type NetworksData

type NetworksData struct {
	Connections []NetworkConnection `json:"connections"`
	IO          *NetworkIO          `json:"io"`
	Networks    []Network           `json:"networks"`
}

NetworksData represents information about all network interfaces and connections

type PerCPU

type PerCPU struct {
	ID           int           `json:"id"`
	Frequency    *CPUFrequency `json:"frequency"`
	Power        *float64      `json:"power"`
	Times        *CPUTimes     `json:"times"`
	TimesPercent *CPUTimes     `json:"times_percent"`
	Usage        *float64      `json:"usage"`
	Voltage      *float64      `json:"voltage"`
}

PerCPU represents per-CPU information

type Process

type Process struct {
	ID               float64  `json:"id"`
	Name             *string  `json:"name"`
	CPUUsage         *float64 `json:"cpu_usage"`
	Created          *float64 `json:"created"`
	MemoryUsage      *float64 `json:"memory_usage"`
	Path             *string  `json:"path"`
	Status           *string  `json:"status"`
	Username         *string  `json:"username"`
	WorkingDirectory *string  `json:"working_directory"`
}

Process represents information about a system process

type ProcessesData

type ProcessesData = []Process

ProcessesData represents information about all system processes

type RunMode

type RunMode string
const (
	RunModeStandalone RunMode = "standalone"
)

type SensorsData

type SensorsData struct {
	Fans           []Fan           `json:"fans"`
	Temperatures   []Temperature   `json:"temperatures"`
	WindowsSensors *SensorsWindows `json:"windows_sensors"`
}

SensorsData represents all sensor information

type SensorsNVIDIA

type SensorsNVIDIA struct {
	Chipset  *SensorsNVIDIAChipset  `json:"chipset"`
	Displays []SensorsNVIDIADisplay `json:"displays"`
	Driver   *SensorsNVIDIADriver   `json:"driver"`
	GPUs     []SensorsNVIDIAGPU     `json:"gpus"`
}

SensorsNVIDIA represents all NVIDIA sensor information

type SensorsNVIDIAChipset

type SensorsNVIDIAChipset struct {
	ID         int    `json:"id"`
	Name       string `json:"name"`
	Flags      string `json:"flags"`
	VendorID   int    `json:"vendor_id"`
	VendorName string `json:"vendor_name"`
}

SensorsNVIDIAChipset represents NVIDIA chipset information

type SensorsNVIDIADisplay

type SensorsNVIDIADisplay struct {
	ID                   int    `json:"id"`
	Name                 string `json:"name"`
	Active               bool   `json:"active"`
	Available            bool   `json:"available"`
	Connected            bool   `json:"connected"`
	Dynamic              bool   `json:"dynamic"`
	AspectHorizontal     int    `json:"aspect_horizontal"`
	AspectVertical       int    `json:"aspect_vertical"`
	BrightnessCurrent    int    `json:"brightness_current"`
	BrightnessDefault    int    `json:"brightness_default"`
	BrightnessMax        int    `json:"brightness_max"`
	BrightnessMin        int    `json:"brightness_min"`
	ColorDepth           string `json:"color_depth"`
	ConnectionType       string `json:"connection_type"`
	PixelClock           int    `json:"pixel_clock"`
	RefreshRate          int    `json:"refresh_rate"`
	ResolutionHorizontal int    `json:"resolution_horizontal"`
	ResolutionVertical   int    `json:"resolution_vertical"`
}

SensorsNVIDIADisplay represents NVIDIA display information

type SensorsNVIDIADriver

type SensorsNVIDIADriver struct {
	BranchVersion    string `json:"branch_version"`
	InterfaceVersion string `json:"interface_version"`
	Version          int    `json:"version"`
}

SensorsNVIDIADriver represents NVIDIA driver information

type SensorsNVIDIAGPU

type SensorsNVIDIAGPU struct {
	ID                   int     `json:"id"`
	Name                 string  `json:"name"`
	BiosOEMRevision      *int    `json:"bios_oem_revision"`
	BiosRevision         *int    `json:"bios_revision"`
	BiosVersion          *string `json:"bios_version"`
	CurrentFanSpeedLevel *int    `json:"current_fan_speed_level"`
	CurrentFanSpeedRPM   *int    `json:"current_fan_speed_rpm"`
	DriverModel          *int    `json:"driver_model"`
	MemoryAvailable      *int    `json:"memory_available"`
	MemoryCapacity       *int    `json:"memory_capacity"`
	MemoryMaker          *string `json:"memory_maker"`
	Serial               *string `json:"serial"`
	SystemType           *string `json:"system_type"`
	Type                 *string `json:"type"`
}

SensorsNVIDIAGPU represents NVIDIA GPU information

type SensorsWindows

type SensorsWindows struct {
	Hardware []SensorsWindowsHardware `json:"hardware"`
	NVIDIA   *SensorsNVIDIA           `json:"nvidia"`
}

SensorsWindows represents Windows sensor information

type SensorsWindowsHardware

type SensorsWindowsHardware struct {
	ID          string                   `json:"id"`
	Name        string                   `json:"name"`
	Type        string                   `json:"type"`
	Subhardware []SensorsWindowsHardware `json:"subhardware"`
	Sensors     []SensorsWindowsSensor   `json:"sensors"`
}

SensorsWindowsHardware represents Windows hardware sensor information

type SensorsWindowsSensor

type SensorsWindowsSensor struct {
	ID    string `json:"id"`
	Name  string `json:"name"`
	Type  string `json:"type"`
	Value any    `json:"value"`
}

SensorsWindowsSensor represents a Windows sensor

type SystemData

type SystemData struct {
	BootTime              uint64       `json:"boot_time" mapstructure:"boot_time"`
	FQDN                  string       `json:"fqdn" mapstructure:"fqdn"`
	Hostname              string       `json:"hostname" mapstructure:"hostname"`
	KernelVersion         string       `json:"kernel_version" mapstructure:"kernel_version"`
	IPAddress4            string       `json:"ip_address_4" mapstructure:"ip_address_4"`
	MACAddress            string       `json:"mac_address" mapstructure:"mac_address"`
	PlatformVersion       string       `json:"platform_version" mapstructure:"platform_version"`
	Platform              string       `json:"platform" mapstructure:"platform"`
	PowerUsage            *float64     `json:"power_usage" mapstructure:"power_usage"`
	Uptime                uint64       `json:"uptime" mapstructure:"uptime"`
	Users                 []SystemUser `json:"users" mapstructure:"users"`
	UUID                  string       `json:"uuid" mapstructure:"uuid"`
	Version               string       `json:"version" mapstructure:"version"`
	CameraUsage           []string     `json:"camera_usage" mapstructure:"camera_usage"`
	MicrophoneUsage       []string     `json:"microphone_usage" mapstructure:"microphone_usage"`
	IPAddress6            string       `json:"ip_address_6" mapstructure:"ip_address_6"`
	PendingReboot         *bool        `json:"pending_reboot" mapstructure:"pending_reboot"`
	RunMode               RunMode      `json:"run_mode" mapstructure:"run_mode"`
	VersionLatestURL      *string      `json:"version_latest_url" mapstructure:"version_latest_url"`
	VersionLatest         *string      `json:"version_latest" mapstructure:"version_latest"`
	VersionNewerAvailable *bool        `json:"version_newer_available" mapstructure:"version_newer_available"`
	DeviceInfo            *DeviceInfo  `json:"device_info" mapstructure:"device_info"`
}

SystemData represents system information

type SystemUser

type SystemUser struct {
	Name     string  `json:"name" mapstructure:"name"`
	Active   bool    `json:"active" mapstructure:"active"`
	Terminal string  `json:"terminal" mapstructure:"terminal"`
	Host     string  `json:"host" mapstructure:"host"`
	Started  int     `json:"started" mapstructure:"started"`
	PID      float64 `json:"pid" mapstructure:"pid"`
}

SystemUser represents information about a system user

type Temperature

type Temperature struct {
	SensorKey   string  `json:"key"`
	Temperature float64 `json:"temperature"`
	High        float64 `json:"high"`
	Critical    float64 `json:"critical"`
}

type Updater

type Updater interface {
	Name() ModuleName
	Update(context.Context) (any, error)
}

Jump to

Keyboard shortcuts

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