mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-24 22:16:36 +08:00
实现最基本的域名服务节点管理
This commit is contained in:
@@ -63,6 +63,15 @@ func (this *NSClusterDAO) FindEnabledNSCluster(tx *dbs.Tx, id int64) (*NSCluster
|
||||
return result.(*NSCluster), err
|
||||
}
|
||||
|
||||
// FindEnabledNSClusterName 查找启用中的条目名称
|
||||
func (this *NSClusterDAO) FindEnabledNSClusterName(tx *dbs.Tx, id int64) (string, error) {
|
||||
return this.Query(tx).
|
||||
Pk(id).
|
||||
State(NSClusterStateEnabled).
|
||||
Result("name").
|
||||
FindStringCol("")
|
||||
}
|
||||
|
||||
// CreateCluster 创建集群
|
||||
func (this *NSClusterDAO) CreateCluster(tx *dbs.Tx, name string) (int64, error) {
|
||||
op := NewNSClusterOperator()
|
||||
|
||||
Reference in New Issue
Block a user