实现节点筛选函数,调整节点数据表结构

This commit is contained in:
2025-03-26 16:34:54 +08:00
parent 1ac87f79c6
commit e337a9c08e
9 changed files with 572 additions and 316 deletions

View File

@@ -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
}

View File

@@ -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 {