diff --git a/db/kafka/topic.go b/db/kafka/topic.go index 5e3a3af..89185a8 100644 --- a/db/kafka/topic.go +++ b/db/kafka/topic.go @@ -6,3 +6,43 @@ type Topic interface { Name() string OnMessage(context.Context) error } + +type TopicQuestionAnswer struct { + MessageSn int64 `json:"messageSn"` + USN int64 `json:"usn"` + QuestionSn int64 `json:"questionSn"` + QuestionAnswer string `json:"questionAnswer"` + Answer string `json:"answer"` +} + +func (t *TopicQuestionAnswer) Name() string { + return "qgdzs.question.answer" +} + +func (t *TopicQuestionAnswer) OnMessage(_ context.Context) error { + return nil +} + +type TopicAddPoint struct { + MessageSn int64 `json:"messageSn"` + Source AddPointSource `json:"source"` + USN int64 `json:"usn"` + Point int64 `json:"point"` +} + +type AddPointSource int32 + +const ( + AddPointSourceUnKnown AddPointSource = 0 + AddPointSourceRandom AddPointSource = 1 + AddPointSourceCategory AddPointSource = 2 + AddPointSourceQuickly AddPointSource = 3 +) + +func (t *TopicAddPoint) Name() string { + return "qgdzs.user.point" +} + +func (t *TopicAddPoint) OnMessage(_ context.Context) error { + return nil +} diff --git a/discover/server.go b/discover/server.go index d8b1bde..27ef2a9 100644 --- a/discover/server.go +++ b/discover/server.go @@ -5,7 +5,7 @@ import ( "git.hlsq.asia/mmorpg/service-common/db/etcd" "git.hlsq.asia/mmorpg/service-common/discover/common" "git.hlsq.asia/mmorpg/service-common/log" - "git.hlsq.asia/mmorpg/service-common/net/grpc/grpc_conn" + "git.hlsq.asia/mmorpg/service-common/net/grpc/grpcconn" clientv3 "go.etcd.io/etcd/client/v3" "google.golang.org/grpc" "sync" @@ -14,7 +14,7 @@ import ( // 大量读少量写的情况下,读写锁比同步Map更高效 var ( serverMU = sync.RWMutex{} - conn = make(map[string]*grpc_conn.GrpcConnectionMgr) + conn = make(map[string]*grpcconn.GrpcConnectionMgr) serverLeaseM = make(map[int64]clientv3.LeaseID) ) @@ -79,7 +79,7 @@ func onServerStart(data any) { if v, ok := conn[provider.Target]; ok { v.Store(provider.SID, provider.Addr) } else { - mgr := grpc_conn.NewGrpcConnectionMgr() + mgr := grpcconn.NewGrpcConnectionMgr() mgr.Store(provider.SID, provider.Addr) conn[provider.Target] = mgr } diff --git a/net/grpc/grpc_client/client_gateway.go b/net/grpc/grpc_client/client_gateway.go deleted file mode 100644 index 9916cbe..0000000 --- a/net/grpc/grpc_client/client_gateway.go +++ /dev/null @@ -1,24 +0,0 @@ -package grpc_client - -import ( - "git.hlsq.asia/mmorpg/service-common/discover" - "git.hlsq.asia/mmorpg/service-common/discover/common" - "git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb" -) - -func GatewayNewClient(sid ...int64) (grpc_pb.GatewayClient, error) { - c, err := discover.FindServer(common.KeyDiscoverGateway, sid...) - if err != nil { - return nil, err - } - return grpc_pb.NewGatewayClient(c), nil -} - -func GatewayNewBroadcastClient() map[int64]grpc_pb.GatewayClient { - clientM := make(map[int64]grpc_pb.GatewayClient) - connM := discover.FindServerAll(common.KeyDiscoverGateway) - for sid, conn := range connM { - clientM[sid] = grpc_pb.NewGatewayClient(conn) - } - return clientM -} diff --git a/net/grpc/grpcclient/client_gateway.go b/net/grpc/grpcclient/client_gateway.go new file mode 100644 index 0000000..05b128d --- /dev/null +++ b/net/grpc/grpcclient/client_gateway.go @@ -0,0 +1,24 @@ +package grpcclient + +import ( + "git.hlsq.asia/mmorpg/service-common/discover" + "git.hlsq.asia/mmorpg/service-common/discover/common" + "git.hlsq.asia/mmorpg/service-common/proto/rs/rspb" +) + +func GatewayNewClient(sid ...int64) (rspb.GatewayClient, error) { + c, err := discover.FindServer(common.KeyDiscoverGateway, sid...) + if err != nil { + return nil, err + } + return rspb.NewGatewayClient(c), nil +} + +func GatewayNewBroadcastClient() map[int64]rspb.GatewayClient { + clientM := make(map[int64]rspb.GatewayClient) + connM := discover.FindServerAll(common.KeyDiscoverGateway) + for sid, conn := range connM { + clientM[sid] = rspb.NewGatewayClient(conn) + } + return clientM +} diff --git a/net/grpc/grpc_client/client_qgdzs.go b/net/grpc/grpcclient/client_qgdzs.go similarity index 59% rename from net/grpc/grpc_client/client_qgdzs.go rename to net/grpc/grpcclient/client_qgdzs.go index 99835a8..96f75fc 100644 --- a/net/grpc/grpc_client/client_qgdzs.go +++ b/net/grpc/grpcclient/client_qgdzs.go @@ -1,24 +1,24 @@ -package grpc_client +package grpcclient import ( "git.hlsq.asia/mmorpg/service-common/discover" "git.hlsq.asia/mmorpg/service-common/discover/common" "git.hlsq.asia/mmorpg/service-common/net/grpc/resolver" - "git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb" + "git.hlsq.asia/mmorpg/service-common/proto/rs/rspb" ) -func QgdzsNewClient(sid ...int64) (grpc_pb.QgdzsClient, error) { +func QgdzsNewClient(sid ...int64) (rspb.QgdzsClient, error) { c, err := discover.FindServer(common.KeyDiscoverQgdzs, sid...) if err != nil { return nil, err } - return grpc_pb.NewQgdzsClient(c), nil + return rspb.NewQgdzsClient(c), nil } -func QgdzsNewClientLB() (grpc_pb.QgdzsClient, error) { +func QgdzsNewClientLB() (rspb.QgdzsClient, error) { c, err := resolver.GetGrpcClientConn("etcd:///" + common.KeyDiscoverServiceNameQgdzs) if err != nil { return nil, err } - return grpc_pb.NewQgdzsClient(c), nil + return rspb.NewQgdzsClient(c), nil } diff --git a/net/grpc/grpc_client/client_scene.go b/net/grpc/grpcclient/client_scene.go similarity index 54% rename from net/grpc/grpc_client/client_scene.go rename to net/grpc/grpcclient/client_scene.go index 8636165..2e102ed 100644 --- a/net/grpc/grpc_client/client_scene.go +++ b/net/grpc/grpcclient/client_scene.go @@ -1,33 +1,33 @@ -package grpc_client +package grpcclient import ( "git.hlsq.asia/mmorpg/service-common/discover" "git.hlsq.asia/mmorpg/service-common/discover/common" "git.hlsq.asia/mmorpg/service-common/net/grpc/resolver" - "git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb" + "git.hlsq.asia/mmorpg/service-common/proto/rs/rspb" ) -func SceneNewClient(sid ...int64) (grpc_pb.SceneClient, error) { +func SceneNewClient(sid ...int64) (rspb.SceneClient, error) { c, err := discover.FindServer(common.KeyDiscoverScene, sid...) if err != nil { return nil, err } - return grpc_pb.NewSceneClient(c), nil + return rspb.NewSceneClient(c), nil } -func SceneNewClientLB() (grpc_pb.SceneClient, error) { +func SceneNewClientLB() (rspb.SceneClient, error) { c, err := resolver.GetGrpcClientConn("etcd:///" + common.KeyDiscoverServiceNameScene) if err != nil { return nil, err } - return grpc_pb.NewSceneClient(c), nil + return rspb.NewSceneClient(c), nil } -func SceneNewBroadcastClient() map[int64]grpc_pb.SceneClient { - clientM := make(map[int64]grpc_pb.SceneClient) +func SceneNewBroadcastClient() map[int64]rspb.SceneClient { + clientM := make(map[int64]rspb.SceneClient) connM := discover.FindServerAll(common.KeyDiscoverScene) for sid, conn := range connM { - clientM[sid] = grpc_pb.NewSceneClient(conn) + clientM[sid] = rspb.NewSceneClient(conn) } return clientM } diff --git a/net/grpc/grpc_client/client_user.go b/net/grpc/grpcclient/client_user.go similarity index 60% rename from net/grpc/grpc_client/client_user.go rename to net/grpc/grpcclient/client_user.go index 6a890a8..8984146 100644 --- a/net/grpc/grpc_client/client_user.go +++ b/net/grpc/grpcclient/client_user.go @@ -1,24 +1,24 @@ -package grpc_client +package grpcclient import ( "git.hlsq.asia/mmorpg/service-common/discover" "git.hlsq.asia/mmorpg/service-common/discover/common" "git.hlsq.asia/mmorpg/service-common/net/grpc/resolver" - "git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb" + "git.hlsq.asia/mmorpg/service-common/proto/rs/rspb" ) -func UserNewClient(sid ...int64) (grpc_pb.UserClient, error) { +func UserNewClient(sid ...int64) (rspb.UserClient, error) { c, err := discover.FindServer(common.KeyDiscoverUser, sid...) if err != nil { return nil, err } - return grpc_pb.NewUserClient(c), nil + return rspb.NewUserClient(c), nil } -func UserNewClientLB() (grpc_pb.UserClient, error) { +func UserNewClientLB() (rspb.UserClient, error) { c, err := resolver.GetGrpcClientConn("etcd:///" + common.KeyDiscoverServiceNameUser) if err != nil { return nil, err } - return grpc_pb.NewUserClient(c), nil + return rspb.NewUserClient(c), nil } diff --git a/net/grpc/grpc_client/stream_gateway.go b/net/grpc/grpcclient/stream_gateway.go similarity index 98% rename from net/grpc/grpc_client/stream_gateway.go rename to net/grpc/grpcclient/stream_gateway.go index dfc8c17..329acce 100644 --- a/net/grpc/grpc_client/stream_gateway.go +++ b/net/grpc/grpcclient/stream_gateway.go @@ -1,4 +1,4 @@ -package grpc_client +package grpcclient import ( "context" diff --git a/net/grpc/grpc_client/stream_scene.go b/net/grpc/grpcclient/stream_scene.go similarity index 98% rename from net/grpc/grpc_client/stream_scene.go rename to net/grpc/grpcclient/stream_scene.go index 1a119d6..4a50489 100644 --- a/net/grpc/grpc_client/stream_scene.go +++ b/net/grpc/grpcclient/stream_scene.go @@ -1,4 +1,4 @@ -package grpc_client +package grpcclient import ( "context" diff --git a/net/grpc/grpc_conn/conn.go b/net/grpc/grpcconn/conn.go similarity index 98% rename from net/grpc/grpc_conn/conn.go rename to net/grpc/grpcconn/conn.go index 48a66bf..660f4bd 100644 --- a/net/grpc/grpc_conn/conn.go +++ b/net/grpc/grpcconn/conn.go @@ -1,4 +1,4 @@ -package grpc_conn +package grpcconn import ( "git.hlsq.asia/mmorpg/service-common/log" diff --git a/net/grpc/grpc_conn/conn_mgr.go b/net/grpc/grpcconn/conn_mgr.go similarity index 98% rename from net/grpc/grpc_conn/conn_mgr.go rename to net/grpc/grpcconn/conn_mgr.go index 0f81670..e38f582 100644 --- a/net/grpc/grpc_conn/conn_mgr.go +++ b/net/grpc/grpcconn/conn_mgr.go @@ -1,4 +1,4 @@ -package grpc_conn +package grpcconn import ( "fmt" diff --git a/net/http/http_resp/code.go b/net/http/httpresp/code.go similarity index 88% rename from net/http/http_resp/code.go rename to net/http/httpresp/code.go index a050094..256c686 100644 --- a/net/http/http_resp/code.go +++ b/net/http/httpresp/code.go @@ -1,7 +1,7 @@ -package http_resp +package httpresp import ( - "git.hlsq.asia/mmorpg/service-common/proto/rs/rs_common" + "git.hlsq.asia/mmorpg/service-common/proto/rs/rscommon" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) @@ -41,7 +41,7 @@ func (c *Code) Error() string { func (c *Code) Wrap() error { st := status.New(codes.Unknown, c.Error()) - st, _ = st.WithDetails(&rs_common.ErrorInfo{ + st, _ = st.WithDetails(&rscommon.ErrorInfo{ Code: int32(c.Code()), Msg: c.Error(), }) diff --git a/net/http/http_resp/response.go b/net/http/httpresp/response.go similarity index 98% rename from net/http/http_resp/response.go rename to net/http/httpresp/response.go index 9dad6f6..1492b7f 100644 --- a/net/http/http_resp/response.go +++ b/net/http/httpresp/response.go @@ -1,4 +1,4 @@ -package http_resp +package httpresp import ( "github.com/gin-gonic/gin" diff --git a/proto/rs/rs_common/rs_common.pb.go b/proto/rs/rscommon/rs_common.pb.go similarity index 95% rename from proto/rs/rs_common/rs_common.pb.go rename to proto/rs/rscommon/rs_common.pb.go index 1071439..aee7a05 100644 --- a/proto/rs/rs_common/rs_common.pb.go +++ b/proto/rs/rscommon/rs_common.pb.go @@ -4,7 +4,7 @@ // protoc v4.25.1 // source: rs_common.proto -package rs_common +package rscommon import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -82,11 +82,11 @@ var file_rs_common_proto_rawDesc = []byte{ 0x6f, 0x22, 0x31, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x4d, 0x73, 0x67, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, + 0x03, 0x4d, 0x73, 0x67, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x6d, 0x6d, 0x6f, 0x72, 0x70, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x72, 0x73, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/rs/grpc_pb/mocks/service_user_grpc.pb.go b/proto/rs/rspb/mocks/service_user_grpc.pb.go similarity index 87% rename from proto/rs/grpc_pb/mocks/service_user_grpc.pb.go rename to proto/rs/rspb/mocks/service_user_grpc.pb.go index 4b14935..11f4b8d 100644 --- a/proto/rs/grpc_pb/mocks/service_user_grpc.pb.go +++ b/proto/rs/rspb/mocks/service_user_grpc.pb.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: ./proto/rs/grpc_pb/service_user_grpc.pb.go +// Source: ./proto/rs/rspb/service_user_grpc.pb.go // Package mocks is a generated GoMock package. package mocks @@ -8,7 +8,7 @@ import ( context "context" reflect "reflect" - grpc_pb "git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb" + rspb "git.hlsq.asia/mmorpg/service-common/proto/rs/rspb" gomock "github.com/golang/mock/gomock" grpc "google.golang.org/grpc" ) @@ -37,14 +37,14 @@ func (m *MockUserClient) EXPECT() *MockUserClientMockRecorder { } // GetUserInfo mocks base method. -func (m *MockUserClient) GetUserInfo(ctx context.Context, in *grpc_pb.GetUserInfoReq, opts ...grpc.CallOption) (*grpc_pb.GetUserInfoResp, error) { +func (m *MockUserClient) GetUserInfo(ctx context.Context, in *rspb.GetUserInfoReq, opts ...grpc.CallOption) (*rspb.GetUserInfoResp, error) { m.ctrl.T.Helper() varargs := []interface{}{ctx, in} for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetUserInfo", varargs...) - ret0, _ := ret[0].(*grpc_pb.GetUserInfoResp) + ret0, _ := ret[0].(*rspb.GetUserInfoResp) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -57,14 +57,14 @@ func (mr *MockUserClientMockRecorder) GetUserInfo(ctx, in interface{}, opts ...i } // PhoneLogin mocks base method. -func (m *MockUserClient) PhoneLogin(ctx context.Context, in *grpc_pb.PhoneLoginReq, opts ...grpc.CallOption) (*grpc_pb.PhoneLoginResp, error) { +func (m *MockUserClient) PhoneLogin(ctx context.Context, in *rspb.PhoneLoginReq, opts ...grpc.CallOption) (*rspb.PhoneLoginResp, error) { m.ctrl.T.Helper() varargs := []interface{}{ctx, in} for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "PhoneLogin", varargs...) - ret0, _ := ret[0].(*grpc_pb.PhoneLoginResp) + ret0, _ := ret[0].(*rspb.PhoneLoginResp) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -77,14 +77,14 @@ func (mr *MockUserClientMockRecorder) PhoneLogin(ctx, in interface{}, opts ...in } // WxMiniLogin mocks base method. -func (m *MockUserClient) WxMiniLogin(ctx context.Context, in *grpc_pb.WxMiniLoginReq, opts ...grpc.CallOption) (*grpc_pb.WxMiniLoginResp, error) { +func (m *MockUserClient) WxMiniLogin(ctx context.Context, in *rspb.WxMiniLoginReq, opts ...grpc.CallOption) (*rspb.WxMiniLoginResp, error) { m.ctrl.T.Helper() varargs := []interface{}{ctx, in} for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "WxMiniLogin", varargs...) - ret0, _ := ret[0].(*grpc_pb.WxMiniLoginResp) + ret0, _ := ret[0].(*rspb.WxMiniLoginResp) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -120,10 +120,10 @@ func (m *MockUserServer) EXPECT() *MockUserServerMockRecorder { } // GetUserInfo mocks base method. -func (m *MockUserServer) GetUserInfo(arg0 context.Context, arg1 *grpc_pb.GetUserInfoReq) (*grpc_pb.GetUserInfoResp, error) { +func (m *MockUserServer) GetUserInfo(arg0 context.Context, arg1 *rspb.GetUserInfoReq) (*rspb.GetUserInfoResp, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetUserInfo", arg0, arg1) - ret0, _ := ret[0].(*grpc_pb.GetUserInfoResp) + ret0, _ := ret[0].(*rspb.GetUserInfoResp) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -135,10 +135,10 @@ func (mr *MockUserServerMockRecorder) GetUserInfo(arg0, arg1 interface{}) *gomoc } // PhoneLogin mocks base method. -func (m *MockUserServer) PhoneLogin(arg0 context.Context, arg1 *grpc_pb.PhoneLoginReq) (*grpc_pb.PhoneLoginResp, error) { +func (m *MockUserServer) PhoneLogin(arg0 context.Context, arg1 *rspb.PhoneLoginReq) (*rspb.PhoneLoginResp, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "PhoneLogin", arg0, arg1) - ret0, _ := ret[0].(*grpc_pb.PhoneLoginResp) + ret0, _ := ret[0].(*rspb.PhoneLoginResp) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -150,10 +150,10 @@ func (mr *MockUserServerMockRecorder) PhoneLogin(arg0, arg1 interface{}) *gomock } // WxMiniLogin mocks base method. -func (m *MockUserServer) WxMiniLogin(arg0 context.Context, arg1 *grpc_pb.WxMiniLoginReq) (*grpc_pb.WxMiniLoginResp, error) { +func (m *MockUserServer) WxMiniLogin(arg0 context.Context, arg1 *rspb.WxMiniLoginReq) (*rspb.WxMiniLoginResp, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "WxMiniLogin", arg0, arg1) - ret0, _ := ret[0].(*grpc_pb.WxMiniLoginResp) + ret0, _ := ret[0].(*rspb.WxMiniLoginResp) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/proto/rs/grpc_pb/service_gateway.pb.go b/proto/rs/rspb/service_gateway.pb.go similarity index 97% rename from proto/rs/grpc_pb/service_gateway.pb.go rename to proto/rs/rspb/service_gateway.pb.go index 2ff1e0c..4adb732 100644 --- a/proto/rs/grpc_pb/service_gateway.pb.go +++ b/proto/rs/rspb/service_gateway.pb.go @@ -4,10 +4,10 @@ // protoc v4.25.1 // source: service_gateway.proto -package grpc_pb +package rspb import ( - _ "git.hlsq.asia/mmorpg/service-common/proto/rs/rs_common" + _ "git.hlsq.asia/mmorpg/service-common/proto/rs/rscommon" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -228,11 +228,11 @@ var file_service_gateway_proto_rawDesc = []byte{ 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x28, 0x01, 0x12, 0x29, 0x0a, 0x08, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0c, 0x2e, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, + 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x6d, 0x6d, 0x6f, 0x72, 0x70, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x72, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/proto/rs/grpc_pb/service_gateway_grpc.pb.go b/proto/rs/rspb/service_gateway_grpc.pb.go similarity index 99% rename from proto/rs/grpc_pb/service_gateway_grpc.pb.go rename to proto/rs/rspb/service_gateway_grpc.pb.go index 1b82b52..ebf2f66 100644 --- a/proto/rs/grpc_pb/service_gateway_grpc.pb.go +++ b/proto/rs/rspb/service_gateway_grpc.pb.go @@ -4,7 +4,7 @@ // - protoc v4.25.1 // source: service_gateway.proto -package grpc_pb +package rspb import ( context "context" diff --git a/proto/rs/grpc_pb/service_qgdzs.pb.go b/proto/rs/rspb/service_qgdzs.pb.go similarity index 99% rename from proto/rs/grpc_pb/service_qgdzs.pb.go rename to proto/rs/rspb/service_qgdzs.pb.go index b25e637..e3a7546 100644 --- a/proto/rs/grpc_pb/service_qgdzs.pb.go +++ b/proto/rs/rspb/service_qgdzs.pb.go @@ -4,10 +4,10 @@ // protoc v4.25.1 // source: service_qgdzs.proto -package grpc_pb +package rspb import ( - _ "git.hlsq.asia/mmorpg/service-common/proto/rs/rs_common" + _ "git.hlsq.asia/mmorpg/service-common/proto/rs/rscommon" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -1817,11 +1817,11 @@ var file_service_qgdzs_proto_rawDesc = []byte{ 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x71, 0x67, 0x64, 0x7a, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x6d, 0x6d, 0x6f, 0x72, 0x70, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x72, 0x73, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/rs/grpc_pb/service_qgdzs.pb.gw.go b/proto/rs/rspb/service_qgdzs.pb.gw.go similarity index 99% rename from proto/rs/grpc_pb/service_qgdzs.pb.gw.go rename to proto/rs/rspb/service_qgdzs.pb.gw.go index cefa986..abb592f 100644 --- a/proto/rs/grpc_pb/service_qgdzs.pb.gw.go +++ b/proto/rs/rspb/service_qgdzs.pb.gw.go @@ -2,11 +2,11 @@ // source: service_qgdzs.proto /* -Package grpc_pb is a reverse proxy. +Package rspb is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package grpc_pb +package rspb import ( "context" diff --git a/proto/rs/grpc_pb/service_qgdzs_grpc.pb.go b/proto/rs/rspb/service_qgdzs_grpc.pb.go similarity index 99% rename from proto/rs/grpc_pb/service_qgdzs_grpc.pb.go rename to proto/rs/rspb/service_qgdzs_grpc.pb.go index 2efe861..d65f0ff 100644 --- a/proto/rs/grpc_pb/service_qgdzs_grpc.pb.go +++ b/proto/rs/rspb/service_qgdzs_grpc.pb.go @@ -4,7 +4,7 @@ // - protoc v4.25.1 // source: service_qgdzs.proto -package grpc_pb +package rspb import ( context "context" diff --git a/proto/rs/grpc_pb/service_scene.pb.go b/proto/rs/rspb/service_scene.pb.go similarity index 98% rename from proto/rs/grpc_pb/service_scene.pb.go rename to proto/rs/rspb/service_scene.pb.go index cfdc7cf..505bc12 100644 --- a/proto/rs/grpc_pb/service_scene.pb.go +++ b/proto/rs/rspb/service_scene.pb.go @@ -4,10 +4,10 @@ // protoc v4.25.1 // source: service_scene.proto -package grpc_pb +package rspb import ( - _ "git.hlsq.asia/mmorpg/service-common/proto/rs/rs_common" + _ "git.hlsq.asia/mmorpg/service-common/proto/rs/rscommon" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -414,10 +414,10 @@ var file_service_scene_proto_rawDesc = []byte{ 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x25, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x0b, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x28, 0x01, - 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, + 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x6d, 0x6d, 0x6f, 0x72, 0x70, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x73, - 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x72, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/rs/grpc_pb/service_scene_grpc.pb.go b/proto/rs/rspb/service_scene_grpc.pb.go similarity index 99% rename from proto/rs/grpc_pb/service_scene_grpc.pb.go rename to proto/rs/rspb/service_scene_grpc.pb.go index b2063a3..6cff46d 100644 --- a/proto/rs/grpc_pb/service_scene_grpc.pb.go +++ b/proto/rs/rspb/service_scene_grpc.pb.go @@ -4,7 +4,7 @@ // - protoc v4.25.1 // source: service_scene.proto -package grpc_pb +package rspb import ( context "context" diff --git a/proto/rs/grpc_pb/service_user.pb.go b/proto/rs/rspb/service_user.pb.go similarity index 98% rename from proto/rs/grpc_pb/service_user.pb.go rename to proto/rs/rspb/service_user.pb.go index 6d3ee23..dbcc5e1 100644 --- a/proto/rs/grpc_pb/service_user.pb.go +++ b/proto/rs/rspb/service_user.pb.go @@ -4,10 +4,10 @@ // protoc v4.25.1 // source: service_user.proto -package grpc_pb +package rspb import ( - _ "git.hlsq.asia/mmorpg/service-common/proto/rs/rs_common" + _ "git.hlsq.asia/mmorpg/service-common/proto/rs/rscommon" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -376,11 +376,11 @@ var file_service_user_proto_rawDesc = []byte{ 0x0f, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, - 0x75, 0x73, 0x65, 0x72, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x36, - 0x5a, 0x34, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x33, + 0x5a, 0x31, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x6d, 0x6d, 0x6f, 0x72, 0x70, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x67, - 0x72, 0x70, 0x63, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x72, + 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/rs/grpc_pb/service_user.pb.gw.go b/proto/rs/rspb/service_user.pb.gw.go similarity index 99% rename from proto/rs/grpc_pb/service_user.pb.gw.go rename to proto/rs/rspb/service_user.pb.gw.go index 9750494..94e8ae8 100644 --- a/proto/rs/grpc_pb/service_user.pb.gw.go +++ b/proto/rs/rspb/service_user.pb.gw.go @@ -2,11 +2,11 @@ // source: service_user.proto /* -Package grpc_pb is a reverse proxy. +Package rspb is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package grpc_pb +package rspb import ( "context" diff --git a/proto/rs/grpc_pb/service_user_grpc.pb.go b/proto/rs/rspb/service_user_grpc.pb.go similarity index 99% rename from proto/rs/grpc_pb/service_user_grpc.pb.go rename to proto/rs/rspb/service_user_grpc.pb.go index 6f50570..558be90 100644 --- a/proto/rs/grpc_pb/service_user_grpc.pb.go +++ b/proto/rs/rspb/service_user_grpc.pb.go @@ -4,7 +4,7 @@ // - protoc v4.25.1 // source: service_user.proto -package grpc_pb +package rspb import ( context "context" diff --git a/proto/ss/ss_common/ss_common.pb.go b/proto/ss/sscommon/ss_common.pb.go similarity index 90% rename from proto/ss/ss_common/ss_common.pb.go rename to proto/ss/sscommon/ss_common.pb.go index 28b12a8..45e91d4 100644 --- a/proto/ss/ss_common/ss_common.pb.go +++ b/proto/ss/sscommon/ss_common.pb.go @@ -4,7 +4,7 @@ // protoc v4.25.1 // source: ss_common.proto -package ss_common +package sscommon import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -23,11 +23,11 @@ var File_ss_common_proto protoreflect.FileDescriptor var file_ss_common_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, + 0x6f, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x6d, 0x6d, 0x6f, 0x72, 0x70, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, - 0x73, 0x2f, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x73, 0x2f, 0x73, 0x73, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var file_ss_common_proto_goTypes = []interface{}{} diff --git a/proto/ss/ss_pb/action.pb.go b/proto/ss/sspb/action.pb.go similarity index 98% rename from proto/ss/ss_pb/action.pb.go rename to proto/ss/sspb/action.pb.go index c80ae92..a9aaa18 100644 --- a/proto/ss/ss_pb/action.pb.go +++ b/proto/ss/sspb/action.pb.go @@ -4,10 +4,10 @@ // protoc v4.25.1 // source: action.proto -package ss_pb +package sspb import ( - _ "git.hlsq.asia/mmorpg/service-common/proto/ss/ss_common" + _ "git.hlsq.asia/mmorpg/service-common/proto/ss/sscommon" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -398,11 +398,11 @@ var file_action_proto_rawDesc = []byte{ 0x4e, 0x5f, 0x49, 0x44, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x5f, 0x4d, 0x4f, 0x56, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x5f, - 0x41, 0x54, 0x54, 0x41, 0x43, 0x4b, 0x10, 0x02, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x2e, + 0x41, 0x54, 0x54, 0x41, 0x43, 0x4b, 0x10, 0x02, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x6d, 0x6d, 0x6f, 0x72, 0x70, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x73, 0x2f, 0x73, 0x73, 0x5f, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x73, 0x2f, 0x73, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/ss/ss_pb/define.pb.go b/proto/ss/sspb/define.pb.go similarity index 96% rename from proto/ss/ss_pb/define.pb.go rename to proto/ss/sspb/define.pb.go index 36fb014..76071f2 100644 --- a/proto/ss/ss_pb/define.pb.go +++ b/proto/ss/sspb/define.pb.go @@ -4,10 +4,10 @@ // protoc v4.25.1 // source: define.proto -package ss_pb +package sspb import ( - _ "git.hlsq.asia/mmorpg/service-common/proto/ss/ss_common" + _ "git.hlsq.asia/mmorpg/service-common/proto/ss/sscommon" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -158,11 +158,11 @@ var file_define_proto_rawDesc = []byte{ 0x4e, 0x43, 0x45, 0x10, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x66, 0x12, 0x17, 0x0a, 0x13, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, - 0x49, 0x4f, 0x4e, 0x10, 0x67, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, + 0x49, 0x4f, 0x4e, 0x10, 0x67, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x6d, 0x6d, 0x6f, 0x72, 0x70, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x73, 0x73, 0x2f, 0x73, 0x73, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x2f, 0x73, 0x73, 0x2f, 0x73, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/proto/ss/ss_pb/service.pb.go b/proto/ss/sspb/service.pb.go similarity index 97% rename from proto/ss/ss_pb/service.pb.go rename to proto/ss/sspb/service.pb.go index 49d5397..f073ced 100644 --- a/proto/ss/ss_pb/service.pb.go +++ b/proto/ss/sspb/service.pb.go @@ -4,10 +4,10 @@ // protoc v4.25.1 // source: service.proto -package ss_pb +package sspb import ( - _ "git.hlsq.asia/mmorpg/service-common/proto/ss/ss_common" + _ "git.hlsq.asia/mmorpg/service-common/proto/ss/sscommon" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -249,11 +249,10 @@ var file_service_proto_rawDesc = []byte{ 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x51, 0x55, 0x45, 0x55, 0x45, 0x5f, 0x55, 0x50, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x04, 0x12, 0x1d, 0x0a, 0x19, 0x4b, 0x49, 0x43, 0x4b, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, - 0x44, 0x10, 0x05, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, + 0x44, 0x10, 0x05, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x6d, 0x6d, 0x6f, 0x72, 0x70, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x73, 0x73, 0x2f, 0x73, 0x73, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x2f, 0x73, 0x73, 0x2f, 0x73, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/utils/test.go b/utils/test.go index 88ee9f2..95d75fa 100644 --- a/utils/test.go +++ b/utils/test.go @@ -3,7 +3,7 @@ package utils import ( "bytes" "encoding/json" - "git.hlsq.asia/mmorpg/service-common/net/http/http_resp" + "git.hlsq.asia/mmorpg/service-common/net/http/httpresp" "github.com/gin-gonic/gin" "github.com/stretchr/testify/suite" "net/http/httptest" @@ -26,7 +26,7 @@ func CreateTestContext(method, path string, body interface{}) (*httptest.Respons } // AssertResponse 断言返回值 -func AssertResponse(ts *suite.Suite, w *httptest.ResponseRecorder, httpCode int, code *http_resp.Code) { +func AssertResponse(ts *suite.Suite, w *httptest.ResponseRecorder, httpCode int, code *httpresp.Code) { ts.Assert().Equal(httpCode, w.Code) var response map[string]interface{} ts.Assert().NoError(json.Unmarshal(w.Body.Bytes(), &response))