model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2023 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 BasicInfo

type BasicInfo struct {
	Timestamp     string `json:"timestamp"`
	DateTime      string `json:"date_time"`
	BootTime      string `json:"boot_time"`
	DeviceModel   string `json:"device_model"`
	UpTime        string `json:"up_time"`
	UpTimeDays    string `json:"up_time_days"`
	UpTimeHours   string `json:"up_time_hours"`
	UpTimeMinutes string `json:"up_time_minutes"`
}

type CommonInfo

type CommonInfo struct {
	Name        string `json:"name"`
	Version     string `json:"version"`
	IntervalSec int64  `json:"interval_sec"`
}

type CpuInfo

type CpuInfo struct {
	Temperature      float64 `json:"temperature"`
	TempUnit         string  `json:"temp_unit"`
	Load1minPercent  string  `json:"load_1min_percent"`
	Load5minPercent  string  `json:"load_5min_percent"`
	Load15minPercent string  `json:"load_15min_percent"`
	Hardware         string  `json:"hardware"`
	Revision         string  `json:"revision"`
	Serial           string  `json:"serial"`
	CpuCores         int     `json:"cpu_cores"`
	ModelName        string  `json:"model_name"`
	Arch             string  `json:"arch"`
	ArchModel        string  `json:"arch_model"`
}

type DrivesInfo

type DrivesInfo struct {
	Total       string `json:"total"`
	Used        string `json:"used"`
	Free        string `json:"free"`
	UsedPercent string `json:"used_percent"`
}

type MemoryInfo

type MemoryInfo struct {
	TotalMB     string `json:"total_mb"`
	UsedMB      string `json:"used_mb"`
	UsedPercent string `json:"used_percent"`
}

type Monitor

type Monitor struct {
	Common  CommonInfo     `json:"common"`
	Basic   *BasicInfo     `json:"basic,omitempty"`
	OS      *OSInfo        `json:"os,omitempty"`
	CPU     *CpuInfo       `json:"cpu,omitempty"`
	MEM     *MemoryInfo    `json:"mem,omitempty"`
	Swap    *SwapInfo      `json:"swap,omitempty"`
	Drives  *DrivesInfo    `json:"drives,omitempty"`
	Network *[]NetworkInfo `json:"network,omitempty"`
}

type NetworkInfo

type NetworkInfo struct {
	Name string `json:"name"`
	IP   string `json:"ip"`
	MAC  string `json:"mac"`
}

type OSInfo

type OSInfo struct {
	Hostname string `json:"hostname"`
	FQDN     string `json:"fqdn"`
	Kernel   string `json:"kernel"`
	Distro   string `json:"distro"`
	Codename string `json:"codename"`
}

type SwapInfo

type SwapInfo struct {
	TotalMB     string `json:"total_mb"`
	UsedMB      string `json:"used_mb"`
	UsedPercent string `json:"used_percent"`
}

Jump to

Keyboard shortcuts

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