优化代码

This commit is contained in:
GoEdgeLab
2022-03-22 21:45:07 +08:00
parent 2b0e2b6888
commit 1e4143bcbb
148 changed files with 340 additions and 315 deletions

View File

@@ -7,7 +7,7 @@ type NSDomain struct {
Id uint32 `field:"id"` // ID
ClusterId uint32 `field:"clusterId"` // 集群ID
UserId uint32 `field:"userId"` // 用户ID
IsOn uint8 `field:"isOn"` // 是否启用
IsOn bool `field:"isOn"` // 是否启用
Name string `field:"name"` // 域名
CreatedAt uint64 `field:"createdAt"` // 创建时间
Version uint64 `field:"version"` // 版本

View File

@@ -3,7 +3,7 @@ package nameservers
// NSKey 密钥管理
type NSKey struct {
Id uint64 `field:"id"` // ID
IsOn uint8 `field:"isOn"` // 状态
IsOn bool `field:"isOn"` // 状态
Name string `field:"name"` // 名称
DomainId uint64 `field:"domainId"` // 域名ID
ZoneId uint64 `field:"zoneId"` // 子域ID

View File

@@ -6,7 +6,7 @@ import "github.com/iwind/TeaGo/dbs"
type NSRecord struct {
Id uint64 `field:"id"` // ID
DomainId uint32 `field:"domainId"` // 域名ID
IsOn uint8 `field:"isOn"` // 是否启用
IsOn bool `field:"isOn"` // 是否启用
Description string `field:"description"` // 备注
Name string `field:"name"` // 记录名
Type string `field:"type"` // 类型

View File

@@ -107,7 +107,7 @@ func (this *NSRouteDAO) FindEnabledRouteWithCode(tx *dbs.Tx, code string) (*NSRo
return &NSRoute{
Id: 0,
IsOn: 1,
IsOn: true,
Name: route.Name,
Code: route.Code,
State: NSRouteStateEnabled,

View File

@@ -5,7 +5,7 @@ import "github.com/iwind/TeaGo/dbs"
// NSRoute DNS线路
type NSRoute struct {
Id uint32 `field:"id"` // ID
IsOn uint8 `field:"isOn"` // 是否启用
IsOn bool `field:"isOn"` // 是否启用
ClusterId uint32 `field:"clusterId"` // 集群ID
DomainId uint32 `field:"domainId"` // 域名ID
UserId uint32 `field:"userId"` // 用户ID

View File

@@ -6,7 +6,7 @@ import "github.com/iwind/TeaGo/dbs"
type NSZone struct {
Id uint64 `field:"id"` // ID
DomainId uint64 `field:"domainId"` // 域名ID
IsOn uint8 `field:"isOn"` // 是否启用
IsOn bool `field:"isOn"` // 是否启用
Order uint32 `field:"order"` // 排序
Version uint64 `field:"version"` // 版本
Tsig dbs.JSON `field:"tsig"` // TSIG配置