mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 13:47:15 +08:00
fix: build
This commit is contained in:
@@ -7,3 +7,14 @@ type App struct {
|
||||
Slug string `json:"slug"` // 插件标识
|
||||
Route func(r chi.Router) `json:"-"` // 路由
|
||||
}
|
||||
|
||||
// StoreApp 商店应用结构
|
||||
type StoreApp struct {
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Slug string `json:"slug"`
|
||||
Version string `json:"version"`
|
||||
Installed bool `json:"installed"`
|
||||
InstalledVersion string `json:"installed_version"`
|
||||
Show bool `json:"show"`
|
||||
}
|
||||
|
||||
34
pkg/types/monitor.go
Normal file
34
pkg/types/monitor.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package types
|
||||
|
||||
type Load struct {
|
||||
Load1 []float64 `json:"load1"`
|
||||
Load5 []float64 `json:"load5"`
|
||||
Load15 []float64 `json:"load15"`
|
||||
}
|
||||
type CPU struct {
|
||||
Percent []string `json:"percent"`
|
||||
}
|
||||
type Mem struct {
|
||||
Total string `json:"total"`
|
||||
Available []string `json:"available"`
|
||||
Used []string `json:"used"`
|
||||
}
|
||||
type SWAP struct {
|
||||
Total string `json:"total"`
|
||||
Used []string `json:"used"`
|
||||
Free []string `json:"free"`
|
||||
}
|
||||
type Network struct {
|
||||
Sent []string `json:"sent"`
|
||||
Recv []string `json:"recv"`
|
||||
Tx []string `json:"tx"`
|
||||
Rx []string `json:"rx"`
|
||||
}
|
||||
type MonitorData struct {
|
||||
Times []string `json:"times"`
|
||||
Load Load `json:"load"`
|
||||
CPU CPU `json:"cpu"`
|
||||
Mem Mem `json:"mem"`
|
||||
SWAP SWAP `json:"swap"`
|
||||
Net Network `json:"net"`
|
||||
}
|
||||
Reference in New Issue
Block a user