feat ss改名rs
This commit is contained in:
2
go.mod
2
go.mod
@@ -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-20260110153008-0be254c6a298
|
git.hlsq.asia/mmorpg/service-common v0.0.0-20260112035311-ec291d4332e5
|
||||||
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
|
||||||
|
|||||||
4
go.sum
4
go.sum
@@ -4,6 +4,10 @@ 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-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-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 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=
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package server
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"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/sc/sc_pb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/ss/grpc_pb"
|
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/client"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/client"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
"sync"
|
"sync"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package server
|
|||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
"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"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/client"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
"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/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-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
"git.hlsq.asia/mmorpg/service-gateway/config"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
"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/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/global"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/grpc_server/stream_client"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/grpc_server/stream_client"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
"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/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/global"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/client"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/ws_handler/client"
|
||||||
"sync"
|
"sync"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
"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/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/handler/http_handler"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/net/http_gateway/wrapper"
|
"git.hlsq.asia/mmorpg/service-gateway/internal/net/http_gateway/wrapper"
|
||||||
"github.com/gin-contrib/cors"
|
"github.com/gin-contrib/cors"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/http/http_resp"
|
"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"
|
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
@@ -23,7 +23,7 @@ func ErrorHandler(_ context.Context, _ *runtime.ServeMux, _ runtime.Marshaler, w
|
|||||||
|
|
||||||
code, msg := 0, ""
|
code, msg := 0, ""
|
||||||
for _, detail := range st.Details() {
|
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)
|
code = int(errorInfo.Code)
|
||||||
msg = errorInfo.Msg
|
msg = errorInfo.Msg
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user