实现节点筛选函数,调整节点数据表结构
This commit is contained in:
@@ -11,6 +11,8 @@ import (
|
||||
)
|
||||
import "gorm.io/driver/postgres"
|
||||
|
||||
var DB *gorm.DB
|
||||
|
||||
func Init() {
|
||||
|
||||
// 连接数据库
|
||||
@@ -39,4 +41,6 @@ func Init() {
|
||||
|
||||
// 初始化查询工具
|
||||
queries.SetDefault(db)
|
||||
|
||||
DB = db
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ type client struct {
|
||||
|
||||
var Client client
|
||||
|
||||
func Init() error {
|
||||
func Init() {
|
||||
// todo 从环境变量中获取参数
|
||||
Client = client{
|
||||
gatewayUrl: "http://110.40.82.248:9990",
|
||||
@@ -26,8 +26,6 @@ func Init() error {
|
||||
password: "123456",
|
||||
cloudUrl: "http://103.139.212.110",
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type PortConfig struct {
|
||||
|
||||
Reference in New Issue
Block a user