Полный продакшен-рефактор fix25: split peer/admin, удаление legacy, шифрование secret, auth_id, новые API/роуты и зачистка subscription

This commit is contained in:
2026-05-09 00:27:45 +05:00
parent e60594e09e
commit d73bab99ec
34 changed files with 930 additions and 1673 deletions
-31
View File
@@ -1,31 +0,0 @@
package vo
type AccountVo struct {
BaseVo
Username string `json:"username"`
Quota int64 `json:"quota"`
Download int64 `json:"download"`
Upload int64 `json:"upload"`
ExpireTime int64 `json:"expireTime"`
KickUtilTime int64 `json:"kickUtilTime"` // Offline remaining time
DeviceNo int64 `json:"deviceNo"` // Limit the number of devices
Role string `json:"role"`
Deleted int64 `json:"deleted"`
Online bool `json:"online"` // online status
Device int64 `json:"device"` // Number of online devices
LoginAt int64 `json:"loginAt"`
ConAt int64 `json:"conAt"`
Remark string `json:"remark"`
}
type AccountPageVo struct {
AccountVos []AccountVo `json:"records"`
Total int64 `json:"total"`
}
type AccountInfoVo struct {
Id int64 `json:"id"`
Username string `json:"username"`
Roles []string `json:"roles"`
}
+9
View File
@@ -0,0 +1,9 @@
package vo
type AdminInfoVo struct {
Id int64 `json:"id"`
Username string `json:"username"`
Roles []string `json:"roles"`
ForcePasswordChange bool `json:"forcePasswordChange"`
}
+30
View File
@@ -0,0 +1,30 @@
package vo
type PeerVo struct {
BaseVo
Name string `json:"name"`
Remark string `json:"remark"`
AuthId string `json:"authId"`
QuotaBytes int64 `json:"quotaBytes"`
DownloadBytes int64 `json:"downloadBytes"`
UploadBytes int64 `json:"uploadBytes"`
ExpiresAt int64 `json:"expiresAt"`
MaxDevices int64 `json:"maxDevices"`
Disabled int64 `json:"disabled"`
BannedUntil int64 `json:"bannedUntil"`
LastConnectionAt int64 `json:"lastConnectionAt"`
Online bool `json:"online"`
OnlineDevices int64 `json:"onlineDevices"`
}
type PeerPageVo struct {
Records []PeerVo `json:"records"`
Total int64 `json:"total"`
}
type PeerClientConfigVo struct {
Url string `json:"url"`
QrCode []byte `json:"qrCode"`
}