44 lines
945 B
Go
44 lines
945 B
Go
package main
|
|
|
|
import (
|
|
"cid/controller/app"
|
|
"cid/controller/data"
|
|
"cid/controller/mapping"
|
|
controllerYidun "cid/controller/yidun"
|
|
serviceYidun "cid/service/yidun"
|
|
"fmt"
|
|
|
|
_ "gitea.com/red-future/common/consul"
|
|
"gitea.com/red-future/common/http"
|
|
"gitea.com/red-future/common/jaeger"
|
|
_ "github.com/gogf/gf/contrib/drivers/mysql/v2"
|
|
_ "github.com/gogf/gf/contrib/nosql/redis/v2"
|
|
"golang.org/x/net/context"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
defer jaeger.ShutDown(ctx)
|
|
|
|
// 初始化易盾客户端
|
|
if err := serviceYidun.InitYidunClients(ctx); err != nil {
|
|
panic(fmt.Sprintf("初始化易盾客户端失败: %v", err))
|
|
}
|
|
|
|
http.RouteRegister([]interface{}{
|
|
// 平台管理
|
|
data.Platform,
|
|
// 接口管理
|
|
data.ApiInterface,
|
|
// 数据获取
|
|
data.DataFetch,
|
|
// 数据映射
|
|
mapping.DataMapping,
|
|
// 应用管理
|
|
app.Application,
|
|
// 易盾内容安全
|
|
controllerYidun.YidunController,
|
|
})
|
|
select {}
|
|
}
|