Files
cmii-uav-watchdog-project/cmii-uav-watchdog-common/models/between_project_model.go

29 lines
1.2 KiB
Go

package models
import "time"
// AuthorizationFile 授权文件模型
type AuthorizationFile struct {
EncryptedHosts []string `json:"encrypted_hosts"` // 加密后的主机信息列表
TOTPCode string `json:"totp_code"` // TOTP验证码
CurrentTime time.Time `json:"current_time"` // 当前系统时间
FirstAuthTime time.Time `json:"first_auth_time"` // 初次授权时间
TimeOffset int64 `json:"time_offset"` // 授权时间偏移
}
// AuthorizationCode 授权码模型
type AuthorizationCode struct {
TOTPCode string `json:"totp_code"` // TOTP验证码
CurrentTime time.Time `json:"current_time"` // 当前系统时间
EncryptedHosts []string `json:"encrypted_hosts"` // 授权主机的加密字符串列表
}
// AuthorizationStorage 授权存储信息
type AuthorizationStorage struct {
EncryptedCode string `json:"encrypted_code"` // 加密后的授权码
FirstAuthTime time.Time `json:"first_auth_time"` // 初次授权时间
TimeOffset int64 `json:"time_offset"` // 授权时间偏移
AuthorizedHosts []string `json:"authorized_hosts"` // 已授权主机列表
SecondTOTPSecret string `json:"second_totp_secret"` // 第二级的totp密钥
}