models

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BIOSInfo

type BIOSInfo struct {
	Vendor      string `json:"vendor"`
	Version     string `json:"version"`
	Date        string `json:"date"`
	Motherboard string `json:"motherboard"`
}

type CPUBasic

type CPUBasic struct {
	Count int    `json:"count"`
	Model string `json:"model"`
}

type CPUCursorData

type CPUCursorData struct {
	Total     []float64   `json:"total"`
	Cores     [][]float64 `json:"cores"`
	Timestamp int64       `json:"timestamp"`
}

type CPUInfo

type CPUInfo struct {
	Count       int         `json:"count"`
	Model       string      `json:"model"`
	Frequency   float64     `json:"frequency"`
	Temperature float64     `json:"temperature"`
	Usage       float64     `json:"usage"`
	CoreUsage   []float64   `json:"coreUsage"`
	Total       []float64   `json:"total"`
	Cores       [][]float64 `json:"cores"`
	Cursor      string      `json:"cursor,omitempty"`
}

type ChartColors added in v0.0.7

type ChartColors struct {
	NetworkDownload string `json:"network_download"`
	NetworkUpload   string `json:"network_upload"`
	NetworkLine     string `json:"network_line"`
	CPUCoreLow      string `json:"cpu_core_low"`
	CPUCoreMedium   string `json:"cpu_core_medium"`
	CPUCoreHigh     string `json:"cpu_core_high"`
	DiskRead        string `json:"disk_read"`
	DiskWrite       string `json:"disk_write"`
}

type ColorPalette added in v0.0.7

type ColorPalette struct {
	UI           UIColors          `json:"ui"`
	Charts       ChartColors       `json:"charts"`
	ProgressBars ProgressBarColors `json:"progress_bars"`
	Temperature  TemperatureColors `json:"temperature"`
	Status       StatusColors      `json:"status"`
}

func DefaultColorPalette added in v0.0.7

func DefaultColorPalette() *ColorPalette

DefaultColorPalette returns the default color palette matching current dgop colors

type DiskInfo

type DiskInfo struct {
	Name  string `json:"name"`
	Read  uint64 `json:"read"`
	Write uint64 `json:"write"`
}

type DiskMountInfo

type DiskMountInfo struct {
	Device  string `json:"device"`
	Mount   string `json:"mount"`
	FSType  string `json:"fstype"`
	Size    string `json:"size"`
	Used    string `json:"used"`
	Avail   string `json:"avail"`
	Percent string `json:"percent"`
}

type DiskRateInfo added in v0.0.5

type DiskRateInfo struct {
	Device     string  `json:"device"`
	ReadRate   float64 `json:"readrate"`
	WriteRate  float64 `json:"writerate"`
	ReadTotal  uint64  `json:"readtotal"`
	WriteTotal uint64  `json:"writetotal"`
	ReadCount  uint64  `json:"readcount"`
	WriteCount uint64  `json:"writecount"`
}

type DiskRateResponse added in v0.0.5

type DiskRateResponse struct {
	Disks  []*DiskRateInfo `json:"disks"`
	Cursor string          `json:"cursor"`
}

type GPU

type GPU struct {
	Driver      string  `json:"driver"`
	Vendor      string  `json:"vendor"`
	DisplayName string  `json:"displayName"`
	FullName    string  `json:"fullName"`
	PciId       string  `json:"pciId"`
	RawLine     string  `json:"rawLine"`
	Temperature float64 `json:"temperature"`
	Hwmon       string  `json:"hwmon"`
}

type GPUInfo

type GPUInfo struct {
	GPUs []GPU `json:"gpus"`
}

type GPUTempInfo

type GPUTempInfo struct {
	Driver      string  `json:"driver"`
	Hwmon       string  `json:"hwmon"`
	Temperature float64 `json:"temperature"`
}

type GPUTempsInfo

type GPUTempsInfo struct {
	GPUTemps []GPUTempInfo `json:"gputemps"`
}

type MemoryInfo

type MemoryInfo struct {
	Total     uint64 `json:"total"`
	Free      uint64 `json:"free"`
	Available uint64 `json:"available"`
	Buffers   uint64 `json:"buffers"`
	Cached    uint64 `json:"cached"`
	Shared    uint64 `json:"shared"`
	SwapTotal uint64 `json:"swaptotal"`
	SwapFree  uint64 `json:"swapfree"`
}

type MetaInfo

type MetaInfo struct {
	CPU        *CPUInfo             `json:"cpu,omitempty"`
	Memory     *MemoryInfo          `json:"memory,omitempty"`
	Network    []*NetworkInfo       `json:"network,omitempty"`
	NetRate    *NetworkRateResponse `json:"netrate,omitempty"`
	Disk       []*DiskInfo          `json:"disk,omitempty"`
	DiskRate   *DiskRateResponse    `json:"diskrate,omitempty"`
	DiskMounts []*DiskMountInfo     `json:"diskmounts,omitempty"`
	Processes  []*ProcessInfo       `json:"processes,omitempty"`
	System     *SystemInfo          `json:"system,omitempty"`
	Hardware   *SystemHardware      `json:"hardware,omitempty"`
	GPU        *GPUInfo             `json:"gpu,omitempty"`
}

type ModulesInfo

type ModulesInfo struct {
	Available []string `json:"available"`
}

type NetworkInfo

type NetworkInfo struct {
	Name string `json:"name"`
	Rx   uint64 `json:"rx"`
	Tx   uint64 `json:"tx"`
}

type NetworkRateInfo added in v0.0.5

type NetworkRateInfo struct {
	Interface string  `json:"interface"`
	RxRate    float64 `json:"rxrate"`
	TxRate    float64 `json:"txrate"`
	RxTotal   uint64  `json:"rxtotal"`
	TxTotal   uint64  `json:"txtotal"`
}

type NetworkRateResponse added in v0.0.5

type NetworkRateResponse struct {
	Interfaces []*NetworkRateInfo `json:"interfaces"`
	Cursor     string             `json:"cursor"`
}

type ProcessCursorData

type ProcessCursorData struct {
	PID       int32   `json:"pid"`
	Ticks     float64 `json:"ticks"`
	Timestamp int64   `json:"timestamp"`
}

type ProcessInfo

type ProcessInfo struct {
	PID           int32   `json:"pid"`
	PPID          int32   `json:"ppid"`
	CPU           float64 `json:"cpu"`
	PTicks        float64 `json:"pticks"`
	MemoryPercent float32 `json:"memoryPercent"`
	MemoryKB      uint64  `json:"memoryKB"`
	PSSKB         uint64  `json:"pssKB"`
	PSSPercent    float32 `json:"pssPercent"`
	Username      string  `json:"username"`
	Command       string  `json:"command"`
	FullCommand   string  `json:"fullCommand"`
}

type ProcessListResponse

type ProcessListResponse struct {
	Processes []*ProcessInfo `json:"processes"`
	Cursor    string         `json:"cursor,omitempty"`
}

type ProgressBarColors added in v0.0.7

type ProgressBarColors struct {
	MemoryLow          string `json:"memory_low"`
	MemoryMedium       string `json:"memory_medium"`
	MemoryHigh         string `json:"memory_high"`
	DiskLow            string `json:"disk_low"`
	DiskMedium         string `json:"disk_medium"`
	DiskHigh           string `json:"disk_high"`
	CPULow             string `json:"cpu_low"`
	CPUMedium          string `json:"cpu_medium"`
	CPUHigh            string `json:"cpu_high"`
	ProgressBackground string `json:"progress_background"`
}

type StatusColors added in v0.0.7

type StatusColors struct {
	Success string `json:"success"`
	Warning string `json:"warning"`
	Error   string `json:"error"`
	Info    string `json:"info"`
}

type SystemHardware

type SystemHardware struct {
	Kernel   string   `json:"kernel"`
	Distro   string   `json:"distro"`
	Hostname string   `json:"hostname"`
	Arch     string   `json:"arch"`
	CPU      CPUBasic `json:"cpu"`
	BIOS     BIOSInfo `json:"bios"`
}

type SystemInfo

type SystemInfo struct {
	LoadAvg   string `json:"loadavg"`
	Processes int    `json:"processes"`
	Threads   int    `json:"threads"`
	BootTime  string `json:"boottime"`
}

type SystemMetrics

type SystemMetrics struct {
	Memory     *MemoryInfo      `json:"memory"`
	CPU        *CPUInfo         `json:"cpu"`
	Network    []*NetworkInfo   `json:"network"`
	Disk       []*DiskInfo      `json:"disk"`
	Processes  []*ProcessInfo   `json:"processes"`
	System     *SystemInfo      `json:"system"`
	DiskMounts []*DiskMountInfo `json:"diskmounts"`
}

type TemperatureColors added in v0.0.7

type TemperatureColors struct {
	Cold   string `json:"cold"`
	Warm   string `json:"warm"`
	Hot    string `json:"hot"`
	Danger string `json:"danger"`
}

type TemperatureSensor added in v0.0.5

type TemperatureSensor struct {
	Name        string  `json:"name"`
	Temperature float64 `json:"temperature"`
	High        float64 `json:"high"`
	Critical    float64 `json:"critical"`
}

type UIColors added in v0.0.7

type UIColors struct {
	BorderPrimary       string `json:"border_primary"`
	BorderSecondary     string `json:"border_secondary"`
	HeaderBackground    string `json:"header_background"`
	HeaderText          string `json:"header_text"`
	FooterBackground    string `json:"footer_background"`
	FooterText          string `json:"footer_text"`
	TextPrimary         string `json:"text_primary"`
	TextSecondary       string `json:"text_secondary"`
	TextAccent          string `json:"text_accent"`
	SelectionBackground string `json:"selection_background"`
	SelectionText       string `json:"selection_text"`
}

Jump to

Keyboard shortcuts

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