更新项目配置,修改 Go 版本至 1.24,添加依赖项,重构主程序以加载配置和初始化服务,删除不再使用的远程目标配置文件。

This commit is contained in:
zeaslity
2025-03-13 10:07:40 +08:00
parent 6d5eb4bba5
commit 0090801298
20 changed files with 1424 additions and 129 deletions

View File

@@ -0,0 +1,26 @@
package models
// HostInfo 主机信息模型
type HostInfo struct {
UUID string `json:"uuid"` // 主机UUID
CPU string `json:"cpu"` // CPU信息
Motherboard string `json:"motherboard"` // 主板信息
MAC string `json:"mac"` // MAC地址
Disk string `json:"disk"` // 硬盘信息
}
// HeartbeatRequest 心跳请求
type HeartbeatRequest struct {
HostInfo HostInfo `json:"host_info"` // 主机信息
Timestamp int64 `json:"timestamp"` // 时间戳
TOTPCode string `json:"totp_code"` // TOTP验证码
AppName string `json:"app_name"` // 应用名称
}
// HeartbeatResponse 心跳响应
type HeartbeatResponse struct {
Authorized bool `json:"authorized"` // 是否已授权
TOTPCode string `json:"totp_code"` // TOTP验证码
Timestamp int64 `json:"timestamp"` // 时间戳
SecondTOTPSecret string `json:"second_totp_secret"` // 第二级的totp密钥
}