diff --git a/go.mod b/go.mod index a04a4cd..52c42d8 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.23.1 require ( bou.ke/monkey v1.0.2 - git.hlsq.asia/mmorpg/service-common v0.0.0-20260110153008-0be254c6a298 + git.hlsq.asia/mmorpg/service-common v0.0.0-20260112035311-ec291d4332e5 github.com/alicebob/miniredis/v2 v2.35.0 github.com/gin-contrib/cors v1.7.6 github.com/gin-gonic/gin v1.11.0 diff --git a/go.sum b/go.sum index bced892..af84a0a 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,10 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= 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-20260110153008-0be254c6a298/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= github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/alicebob/miniredis/v2 v2.35.0 h1:QwLphYqCEAo1eu1TqPRN2jgVMPBweeQcR21jeqDCONI= diff --git a/internal/grpc_server/server/server.go b/internal/grpc_server/server/server.go index 8925ad2..30fb925 100644 --- a/internal/grpc_server/server/server.go +++ b/internal/grpc_server/server/server.go @@ -3,8 +3,8 @@ package server import ( "context" "git.hlsq.asia/mmorpg/service-common/log" + "git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb" "git.hlsq.asia/mmorpg/service-common/proto/sc/sc_pb" - "git.hlsq.asia/mmorpg/service-common/proto/ss/grpc_pb" "git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/client" "google.golang.org/protobuf/proto" "sync" diff --git a/internal/grpc_server/server/server_init.go b/internal/grpc_server/server/server_init.go index 1372d8c..8cfde4d 100644 --- a/internal/grpc_server/server/server_init.go +++ b/internal/grpc_server/server/server_init.go @@ -3,7 +3,7 @@ package server import ( "git.hlsq.asia/mmorpg/service-common/discover/common" "git.hlsq.asia/mmorpg/service-common/net/grpc/service" - "git.hlsq.asia/mmorpg/service-common/proto/ss/grpc_pb" + "git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb" "git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/client" "google.golang.org/grpc" ) diff --git a/internal/handler/http_handler/login.go b/internal/handler/http_handler/login.go index b68815f..2dfc847 100644 --- a/internal/handler/http_handler/login.go +++ b/internal/handler/http_handler/login.go @@ -7,7 +7,7 @@ import ( "git.hlsq.asia/mmorpg/service-common/log" "git.hlsq.asia/mmorpg/service-common/net/grpc/service" "git.hlsq.asia/mmorpg/service-common/net/http/http_resp" - "git.hlsq.asia/mmorpg/service-common/proto/ss/grpc_pb" + "git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb" "git.hlsq.asia/mmorpg/service-common/utils" "git.hlsq.asia/mmorpg/service-gateway/config" "git.hlsq.asia/mmorpg/service-gateway/internal/global" diff --git a/internal/handler/ws_handler/client/client_handler.go b/internal/handler/ws_handler/client/client_handler.go index f156153..b47dbd7 100644 --- a/internal/handler/ws_handler/client/client_handler.go +++ b/internal/handler/ws_handler/client/client_handler.go @@ -5,8 +5,8 @@ import ( "fmt" "git.hlsq.asia/mmorpg/service-common/db/redis" "git.hlsq.asia/mmorpg/service-common/net/grpc/service" + "git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb" "git.hlsq.asia/mmorpg/service-common/proto/sc/sc_pb" - "git.hlsq.asia/mmorpg/service-common/proto/ss/grpc_pb" "git.hlsq.asia/mmorpg/service-gateway/internal/global" "git.hlsq.asia/mmorpg/service-gateway/internal/grpc_server/stream_client" "google.golang.org/protobuf/proto" diff --git a/internal/handler/ws_handler/login/login.go b/internal/handler/ws_handler/login/login.go index 0e7e75d..63cefeb 100644 --- a/internal/handler/ws_handler/login/login.go +++ b/internal/handler/ws_handler/login/login.go @@ -6,8 +6,8 @@ import ( "git.hlsq.asia/mmorpg/service-common/db/redis" "git.hlsq.asia/mmorpg/service-common/log" "git.hlsq.asia/mmorpg/service-common/net/grpc/service" + "git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb" "git.hlsq.asia/mmorpg/service-common/proto/sc/sc_pb" - "git.hlsq.asia/mmorpg/service-common/proto/ss/grpc_pb" "git.hlsq.asia/mmorpg/service-gateway/internal/global" "git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/client" "sync" diff --git a/internal/net/http_gateway/router.go b/internal/net/http_gateway/router.go index 13547ff..d73c1e8 100644 --- a/internal/net/http_gateway/router.go +++ b/internal/net/http_gateway/router.go @@ -5,7 +5,7 @@ import ( "git.hlsq.asia/mmorpg/service-common/log" "git.hlsq.asia/mmorpg/service-common/net/grpc/service" "git.hlsq.asia/mmorpg/service-common/net/http/http_resp" - "git.hlsq.asia/mmorpg/service-common/proto/ss/grpc_pb" + "git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb" "git.hlsq.asia/mmorpg/service-gateway/internal/handler/http_handler" "git.hlsq.asia/mmorpg/service-gateway/internal/net/http_gateway/wrapper" "github.com/gin-contrib/cors" diff --git a/internal/net/http_gateway/wrapper/error_handler.go b/internal/net/http_gateway/wrapper/error_handler.go index 42f30f8..686a3b6 100644 --- a/internal/net/http_gateway/wrapper/error_handler.go +++ b/internal/net/http_gateway/wrapper/error_handler.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" "git.hlsq.asia/mmorpg/service-common/net/http/http_resp" - "git.hlsq.asia/mmorpg/service-common/proto/ss/ss_common" + "git.hlsq.asia/mmorpg/service-common/proto/rs/rs_common" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -23,7 +23,7 @@ func ErrorHandler(_ context.Context, _ *runtime.ServeMux, _ runtime.Marshaler, w code, msg := 0, "" for _, detail := range st.Details() { - if errorInfo, ok := detail.(*ss_common.ErrorInfo); ok { + if errorInfo, ok := detail.(*rs_common.ErrorInfo); ok { code = int(errorInfo.Code) msg = errorInfo.Msg break