Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDatabase ¶
func CheckDatabase(databasePath string)
CheckDatabase checks the SQLite database file at the given path.
Parameters: - databasePath: a string variable that holds the path to the SQLite database file.
Returns: None.
func GetCpuPercent ¶
func GetCpuPercent() float64
Types ¶
type DeviceInfo ¶
type DeviceInfo struct {
DevName string `json:"devname"`
DownloadTotal int `json:"download,string"`
DownSpeed int `json:"downspeed,string"`
Mac string `json:"mac"`
MaxDownloadSpeed int `json:"maxdownloadspeed,string"`
MaxUploadSpeed int `json:"maxuploadspeed,string"`
Online int `json:"online,string"`
UploadTotal int `json:"upload,string"`
UpSpeed int `json:"upspeed,string"`
}
type DevicesHistory ¶
type DevicesHistory struct {
gorm.Model
Mac string
UpSpeed int
DownSpeed int
UpTotal int
DownTotal int
}
func GetDeviceHistory ¶
func GetDeviceHistory(databasePath string, deviceMac string, fixupfloat bool) []DevicesHistory
type RouterHistory ¶
type RouterHistory struct {
gorm.Model
Ip string
RouterNum int
Cpu int
Cpu_tp int
Mem int
UpSpeed int
DownSpeed int
UpTotal int
DownTotal int
DeviceNum int
}
For database
func GetRouterHistory ¶
func GetRouterHistory(databasePath string, routernum int, fixupfloat bool) []RouterHistory
Click to show internal directories.
Click to hide internal directories.