Initial commit (code only without large binaries)

This commit is contained in:
robin
2026-02-15 18:58:44 +08:00
commit 35df75498f
9442 changed files with 1495866 additions and 0 deletions

25
EdgePlus/pkg/utils/key.go Normal file
View File

@@ -0,0 +1,25 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package utils
import timeutil "github.com/iwind/TeaGo/utils/time"
type Key struct {
Id string `json:"id"` // 用户ID
DayFrom string `json:"dayFrom"` // 开始日期
DayTo string `json:"dayTo"` // 结束日期
MacAddresses []string `json:"macAddresses"` // MAC地址老的授权方式
RequestCode string `json:"requestCode"` // 授权请求码
Hostname string `json:"hostname"` // 主机名
Company string `json:"company"` // 公司名
Nodes int `json:"nodes"` // 节点数
UpdatedAt int64 `json:"updatedAt"` // 更新时间
Components []ComponentCode `json:"components"` // 组件
Edition Edition `json:"edition"` // 授权版本
Email string `json:"email"` // 联系人邮箱
Method Method `json:"method"` // 验证方法
}
func (this *Key) IsValid() bool {
return this.DayTo >= timeutil.Format("Y-m-d")
}