优化代码/实现基础的实名认证功能

This commit is contained in:
GoEdgeLab
2022-07-24 09:56:27 +08:00
parent 7f64c98d88
commit d80b5a862f
89 changed files with 353 additions and 249 deletions

View File

@@ -93,7 +93,7 @@ func (this *NSDomainDAO) CreateDomain(tx *dbs.Tx, clusterId int64, userId int64,
return 0, err
}
op := NewNSDomainOperator()
var op = NewNSDomainOperator()
op.ClusterId = clusterId
op.UserId = userId
op.Name = name
@@ -131,7 +131,7 @@ func (this *NSDomainDAO) UpdateDomain(tx *dbs.Tx, domainId int64, clusterId int6
return err
}
op := NewNSDomainOperator()
var op = NewNSDomainOperator()
op.Id = domainId
op.ClusterId = clusterId
op.UserId = userId

View File

@@ -79,7 +79,7 @@ func (this *NSKeyDAO) FindNSKeyName(tx *dbs.Tx, id int64) (string, error) {
// CreateKey 创建Key
func (this *NSKeyDAO) CreateKey(tx *dbs.Tx, domainId int64, zoneId int64, name string, algo dnsconfigs.KeyAlgorithmType, secret string, secretType string) (int64, error) {
op := NewNSKeyOperator()
var op = NewNSKeyOperator()
op.DomainId = domainId
op.ZoneId = zoneId
op.Name = name
@@ -105,7 +105,7 @@ func (this *NSKeyDAO) UpdateKey(tx *dbs.Tx, keyId int64, name string, algo dnsco
if keyId <= 0 {
return errors.New("invalid keyId")
}
op := NewNSKeyOperator()
var op = NewNSKeyOperator()
op.Id = keyId
op.Name = name
op.Algo = algo

View File

@@ -95,7 +95,7 @@ func (this *NSRecordDAO) CreateRecord(tx *dbs.Tx, domainId int64, description st
return 0, err
}
op := NewNSRecordOperator()
var op = NewNSRecordOperator()
op.DomainId = domainId
op.Description = description
op.Name = name
@@ -139,7 +139,7 @@ func (this *NSRecordDAO) UpdateRecord(tx *dbs.Tx, recordId int64, description st
return err
}
op := NewNSRecordOperator()
var op = NewNSRecordOperator()
op.Id = recordId
op.Description = description
op.Name = name

View File

@@ -129,7 +129,7 @@ func (this *NSRouteDAO) CreateRoute(tx *dbs.Tx, clusterId int64, domainId int64,
return 0, err
}
op := NewNSRouteOperator()
var op = NewNSRouteOperator()
op.ClusterId = clusterId
op.DomainId = domainId
op.UserId = userId
@@ -166,7 +166,7 @@ func (this *NSRouteDAO) UpdateRoute(tx *dbs.Tx, routeId int64, name string, rang
return err
}
op := NewNSRouteOperator()
var op = NewNSRouteOperator()
op.Id = routeId
op.Name = name
if len(rangesJSON) > 0 {