feat 拆出qgdzs

This commit is contained in:
2026-01-12 16:53:40 +08:00
parent 7f16b94f9c
commit 732336c282
3 changed files with 22 additions and 9 deletions

2
go.mod
View File

@@ -4,7 +4,7 @@ go 1.23.1
require ( require (
bou.ke/monkey v1.0.2 bou.ke/monkey v1.0.2
git.hlsq.asia/mmorpg/service-common v0.0.0-20260112040622-d433cd03a956 git.hlsq.asia/mmorpg/service-common v0.0.0-20260112082258-b1e7d33940d7
github.com/alicebob/miniredis/v2 v2.35.0 github.com/alicebob/miniredis/v2 v2.35.0
github.com/gin-contrib/cors v1.7.6 github.com/gin-contrib/cors v1.7.6
github.com/gin-gonic/gin v1.11.0 github.com/gin-gonic/gin v1.11.0

10
go.sum
View File

@@ -2,14 +2,8 @@ bou.ke/monkey v1.0.2 h1:kWcnsrCNUatbxncxR/ThdYqbytgOIArtYWqcQLQzKLI=
bou.ke/monkey v1.0.2/go.mod h1:OqickVX3tNx6t33n1xvtTtu85YN5s6cKwVug+oHMaIA= bou.ke/monkey v1.0.2/go.mod h1:OqickVX3tNx6t33n1xvtTtu85YN5s6cKwVug+oHMaIA=
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
git.hlsq.asia/mmorpg/service-common v0.0.0-20260110153008-0be254c6a298 h1:zKQC0gqQfP9sUVYs7OsoHSrzdk379u6aenko6rMx1go= git.hlsq.asia/mmorpg/service-common v0.0.0-20260112082258-b1e7d33940d7 h1:C3quCA54dyFgmlCVgJXx+0rNqa+JZgGggdotbvHAsnA=
git.hlsq.asia/mmorpg/service-common v0.0.0-20260110153008-0be254c6a298/go.mod h1:xv6m1I2jUA6mudKVznygpnzMoshBQarthHD1QnkW4qc= git.hlsq.asia/mmorpg/service-common v0.0.0-20260112082258-b1e7d33940d7/go.mod h1:xv6m1I2jUA6mudKVznygpnzMoshBQarthHD1QnkW4qc=
git.hlsq.asia/mmorpg/service-common v0.0.0-20260112034651-8c09b125a49d h1:R74eiDo6Vl04fE1Vx0X7pTkZB2o+SB5PgB3cu5/kcDo=
git.hlsq.asia/mmorpg/service-common v0.0.0-20260112034651-8c09b125a49d/go.mod h1:xv6m1I2jUA6mudKVznygpnzMoshBQarthHD1QnkW4qc=
git.hlsq.asia/mmorpg/service-common v0.0.0-20260112035311-ec291d4332e5 h1:SauhRmcRxeQj/luQRyIt9iHORp/U9cpm2I5o65rUeGg=
git.hlsq.asia/mmorpg/service-common v0.0.0-20260112035311-ec291d4332e5/go.mod h1:xv6m1I2jUA6mudKVznygpnzMoshBQarthHD1QnkW4qc=
git.hlsq.asia/mmorpg/service-common v0.0.0-20260112040622-d433cd03a956 h1:UfdH/8hH1MOnWzsMEvI8e31O7u5IJO5NaJjgK+BR1iY=
git.hlsq.asia/mmorpg/service-common v0.0.0-20260112040622-d433cd03a956/go.mod h1:xv6m1I2jUA6mudKVznygpnzMoshBQarthHD1QnkW4qc=
github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0=
github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/alicebob/miniredis/v2 v2.35.0 h1:QwLphYqCEAo1eu1TqPRN2jgVMPBweeQcR21jeqDCONI= github.com/alicebob/miniredis/v2 v2.35.0 h1:QwLphYqCEAo1eu1TqPRN2jgVMPBweeQcR21jeqDCONI=

View File

@@ -64,6 +64,8 @@ func InitRouter() *gin.Engine {
// 用户中心 // 用户中心
initUserPath(auth) initUserPath(auth)
// 奇怪的知识-服务端
initQgdzsPath(auth)
return r return r
} }
@@ -90,3 +92,20 @@ func initUserPath(r *gin.RouterGroup) {
g.Any("/*path", gin.WrapH(gwMux)) g.Any("/*path", gin.WrapH(gwMux))
} }
func initQgdzsPath(r *gin.RouterGroup) {
g := r.Group("/qgdzs")
client, err := service.QgdzsNewClientLB()
if err != nil {
log.Errorf("get qgdzs conn failed: %v", err)
return
}
gwMux := InitServeMux()
if err = grpc_pb.RegisterQgdzsHandlerClient(context.Background(), gwMux, client); err != nil {
log.Errorf("RegisterQgdzsHandlerClient err: %v", err)
return
}
g.Any("/*path", gin.WrapH(gwMux))
}