Documentation
¶
Index ¶
- Constants
- Variables
- func GetATAbleStringByUserID(userID int64) string
- func GetAllRankList(rank int) (string, error)
- func GetBriefByUserID(userID int64) (string, error)
- func GetBriefByWebsocket(url string) (string, error)
- func GetRankByUserID(userID int64) (string, error)
- func GetRankList(rankType string, rank int) (string, error)
- func GetSepRankList(rankType string, rankPage int) (string, error)
- func Init(b *tele.Bot)
- func InvalidUserMapInit()
- func RecordAllStatus()
- func RecordRawStatus(user *model.User)
- func Serve()
- func StartCronService()
- func SuspendUser(user *model.User)
- func UpdateUserInfo()
- func ValidUserMapInit()
- type Host
- type Servers
- type State
- type UserMgr
- type WebsocketMsg
Constants ¶
View Source
const ( ErrRankOverflow = "无当前排名数据" ErrNoMoreRank = "后续无排名数据" ErrUnknownRankType = "未知排名类型" )
Variables ¶
Functions ¶
func GetATAbleStringByUserID ¶ added in v0.0.3
func GetAllRankList ¶ added in v0.0.5
func GetBriefByUserID ¶
func GetBriefByWebsocket ¶
func GetRankByUserID ¶
func GetSepRankList ¶ added in v0.0.5
func InvalidUserMapInit ¶ added in v0.0.3
func InvalidUserMapInit()
func RecordAllStatus ¶
func RecordAllStatus()
func RecordRawStatus ¶
func StartCronService ¶
func StartCronService()
func SuspendUser ¶ added in v0.0.3
func UpdateUserInfo ¶ added in v0.0.3
func UpdateUserInfo()
func ValidUserMapInit ¶
func ValidUserMapInit()
Types ¶
type Host ¶
type Host struct {
Platform string `json:"Platform"`
PlatformVersion string `json:"PlatformVersion"`
CPU []string `json:"CPU"`
MemTotal int64 `json:"MemTotal"`
DiskTotal int64 `json:"DiskTotal"`
SwapTotal int `json:"SwapTotal"`
Arch string `json:"Arch"`
Virtualization string `json:"Virtualization"`
BootTime int `json:"BootTime"`
CountryCode string `json:"CountryCode"`
Version string `json:"Version"`
}
type Servers ¶
type Servers struct {
ID int `json:"ID"`
CreatedAt time.Time `json:"CreatedAt"`
UpdatedAt time.Time `json:"UpdatedAt"`
DeletedAt interface{} `json:"DeletedAt"`
Name string `json:"Name"`
Tag string `json:"Tag"`
DisplayIndex int `json:"DisplayIndex"`
Host Host `json:"Host"`
State State `json:"State"`
LastActive time.Time `json:"LastActive"`
}
type State ¶
type State struct {
CPU float64 `json:"CPU"`
MemUsed int64 `json:"MemUsed"`
SwapUsed int `json:"SwapUsed"`
DiskUsed int64 `json:"DiskUsed"`
NetInTransfer int64 `json:"NetInTransfer"`
NetOutTransfer int64 `json:"NetOutTransfer"`
NetInSpeed int `json:"NetInSpeed"`
NetOutSpeed int `json:"NetOutSpeed"`
Uptime int `json:"Uptime"`
Load1 float64 `json:"Load1"`
Load5 float64 `json:"Load5"`
Load15 float64 `json:"Load15"`
TCPConnCount int `json:"TcpConnCount"`
UDPConnCount int `json:"UdpConnCount"`
ProcessCount int `json:"ProcessCount"`
}
type UserMgr ¶
type WebsocketMsg ¶
func GetWebsocketMsg ¶
func GetWebsocketMsg(url string) (*WebsocketMsg, error)
Click to show internal directories.
Click to hide internal directories.