feat 包命名规范
This commit is contained in:
@@ -6,3 +6,43 @@ type Topic interface {
|
|||||||
Name() string
|
Name() string
|
||||||
OnMessage(context.Context) error
|
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
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"git.hlsq.asia/mmorpg/service-common/db/etcd"
|
"git.hlsq.asia/mmorpg/service-common/db/etcd"
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"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"
|
clientv3 "go.etcd.io/etcd/client/v3"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"sync"
|
"sync"
|
||||||
@@ -14,7 +14,7 @@ import (
|
|||||||
// 大量读少量写的情况下,读写锁比同步Map更高效
|
// 大量读少量写的情况下,读写锁比同步Map更高效
|
||||||
var (
|
var (
|
||||||
serverMU = sync.RWMutex{}
|
serverMU = sync.RWMutex{}
|
||||||
conn = make(map[string]*grpc_conn.GrpcConnectionMgr)
|
conn = make(map[string]*grpcconn.GrpcConnectionMgr)
|
||||||
serverLeaseM = make(map[int64]clientv3.LeaseID)
|
serverLeaseM = make(map[int64]clientv3.LeaseID)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ func onServerStart(data any) {
|
|||||||
if v, ok := conn[provider.Target]; ok {
|
if v, ok := conn[provider.Target]; ok {
|
||||||
v.Store(provider.SID, provider.Addr)
|
v.Store(provider.SID, provider.Addr)
|
||||||
} else {
|
} else {
|
||||||
mgr := grpc_conn.NewGrpcConnectionMgr()
|
mgr := grpcconn.NewGrpcConnectionMgr()
|
||||||
mgr.Store(provider.SID, provider.Addr)
|
mgr.Store(provider.SID, provider.Addr)
|
||||||
conn[provider.Target] = mgr
|
conn[provider.Target] = mgr
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
}
|
|
||||||
24
net/grpc/grpcclient/client_gateway.go
Normal file
24
net/grpc/grpcclient/client_gateway.go
Normal file
@@ -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
|
||||||
|
}
|
||||||
@@ -1,24 +1,24 @@
|
|||||||
package grpc_client
|
package grpcclient
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover"
|
"git.hlsq.asia/mmorpg/service-common/discover"
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/resolver"
|
"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...)
|
c, err := discover.FindServer(common.KeyDiscoverQgdzs, sid...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
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)
|
c, err := resolver.GetGrpcClientConn("etcd:///" + common.KeyDiscoverServiceNameQgdzs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return grpc_pb.NewQgdzsClient(c), nil
|
return rspb.NewQgdzsClient(c), nil
|
||||||
}
|
}
|
||||||
@@ -1,33 +1,33 @@
|
|||||||
package grpc_client
|
package grpcclient
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover"
|
"git.hlsq.asia/mmorpg/service-common/discover"
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/resolver"
|
"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...)
|
c, err := discover.FindServer(common.KeyDiscoverScene, sid...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
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)
|
c, err := resolver.GetGrpcClientConn("etcd:///" + common.KeyDiscoverServiceNameScene)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return grpc_pb.NewSceneClient(c), nil
|
return rspb.NewSceneClient(c), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func SceneNewBroadcastClient() map[int64]grpc_pb.SceneClient {
|
func SceneNewBroadcastClient() map[int64]rspb.SceneClient {
|
||||||
clientM := make(map[int64]grpc_pb.SceneClient)
|
clientM := make(map[int64]rspb.SceneClient)
|
||||||
connM := discover.FindServerAll(common.KeyDiscoverScene)
|
connM := discover.FindServerAll(common.KeyDiscoverScene)
|
||||||
for sid, conn := range connM {
|
for sid, conn := range connM {
|
||||||
clientM[sid] = grpc_pb.NewSceneClient(conn)
|
clientM[sid] = rspb.NewSceneClient(conn)
|
||||||
}
|
}
|
||||||
return clientM
|
return clientM
|
||||||
}
|
}
|
||||||
@@ -1,24 +1,24 @@
|
|||||||
package grpc_client
|
package grpcclient
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover"
|
"git.hlsq.asia/mmorpg/service-common/discover"
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/resolver"
|
"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...)
|
c, err := discover.FindServer(common.KeyDiscoverUser, sid...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
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)
|
c, err := resolver.GetGrpcClientConn("etcd:///" + common.KeyDiscoverServiceNameUser)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return grpc_pb.NewUserClient(c), nil
|
return rspb.NewUserClient(c), nil
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package grpc_client
|
package grpcclient
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package grpc_client
|
package grpcclient
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package grpc_conn
|
package grpcconn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package grpc_conn
|
package grpcconn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package http_resp
|
package httpresp
|
||||||
|
|
||||||
import (
|
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/codes"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
)
|
)
|
||||||
@@ -41,7 +41,7 @@ func (c *Code) Error() string {
|
|||||||
|
|
||||||
func (c *Code) Wrap() error {
|
func (c *Code) Wrap() error {
|
||||||
st := status.New(codes.Unknown, c.Error())
|
st := status.New(codes.Unknown, c.Error())
|
||||||
st, _ = st.WithDetails(&rs_common.ErrorInfo{
|
st, _ = st.WithDetails(&rscommon.ErrorInfo{
|
||||||
Code: int32(c.Code()),
|
Code: int32(c.Code()),
|
||||||
Msg: c.Error(),
|
Msg: c.Error(),
|
||||||
})
|
})
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package http_resp
|
package httpresp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
// protoc v4.25.1
|
// protoc v4.25.1
|
||||||
// source: rs_common.proto
|
// source: rs_common.proto
|
||||||
|
|
||||||
package rs_common
|
package rscommon
|
||||||
|
|
||||||
import (
|
import (
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x72, 0x73, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
// Code generated by MockGen. DO NOT EDIT.
|
// 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 is a generated GoMock package.
|
||||||
package mocks
|
package mocks
|
||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
context "context"
|
context "context"
|
||||||
reflect "reflect"
|
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"
|
gomock "github.com/golang/mock/gomock"
|
||||||
grpc "google.golang.org/grpc"
|
grpc "google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
@@ -37,14 +37,14 @@ func (m *MockUserClient) EXPECT() *MockUserClientMockRecorder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetUserInfo mocks base method.
|
// 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()
|
m.ctrl.T.Helper()
|
||||||
varargs := []interface{}{ctx, in}
|
varargs := []interface{}{ctx, in}
|
||||||
for _, a := range opts {
|
for _, a := range opts {
|
||||||
varargs = append(varargs, a)
|
varargs = append(varargs, a)
|
||||||
}
|
}
|
||||||
ret := m.ctrl.Call(m, "GetUserInfo", varargs...)
|
ret := m.ctrl.Call(m, "GetUserInfo", varargs...)
|
||||||
ret0, _ := ret[0].(*grpc_pb.GetUserInfoResp)
|
ret0, _ := ret[0].(*rspb.GetUserInfoResp)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
@@ -57,14 +57,14 @@ func (mr *MockUserClientMockRecorder) GetUserInfo(ctx, in interface{}, opts ...i
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PhoneLogin mocks base method.
|
// 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()
|
m.ctrl.T.Helper()
|
||||||
varargs := []interface{}{ctx, in}
|
varargs := []interface{}{ctx, in}
|
||||||
for _, a := range opts {
|
for _, a := range opts {
|
||||||
varargs = append(varargs, a)
|
varargs = append(varargs, a)
|
||||||
}
|
}
|
||||||
ret := m.ctrl.Call(m, "PhoneLogin", varargs...)
|
ret := m.ctrl.Call(m, "PhoneLogin", varargs...)
|
||||||
ret0, _ := ret[0].(*grpc_pb.PhoneLoginResp)
|
ret0, _ := ret[0].(*rspb.PhoneLoginResp)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
@@ -77,14 +77,14 @@ func (mr *MockUserClientMockRecorder) PhoneLogin(ctx, in interface{}, opts ...in
|
|||||||
}
|
}
|
||||||
|
|
||||||
// WxMiniLogin mocks base method.
|
// 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()
|
m.ctrl.T.Helper()
|
||||||
varargs := []interface{}{ctx, in}
|
varargs := []interface{}{ctx, in}
|
||||||
for _, a := range opts {
|
for _, a := range opts {
|
||||||
varargs = append(varargs, a)
|
varargs = append(varargs, a)
|
||||||
}
|
}
|
||||||
ret := m.ctrl.Call(m, "WxMiniLogin", varargs...)
|
ret := m.ctrl.Call(m, "WxMiniLogin", varargs...)
|
||||||
ret0, _ := ret[0].(*grpc_pb.WxMiniLoginResp)
|
ret0, _ := ret[0].(*rspb.WxMiniLoginResp)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
@@ -120,10 +120,10 @@ func (m *MockUserServer) EXPECT() *MockUserServerMockRecorder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetUserInfo mocks base method.
|
// 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()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "GetUserInfo", arg0, arg1)
|
ret := m.ctrl.Call(m, "GetUserInfo", arg0, arg1)
|
||||||
ret0, _ := ret[0].(*grpc_pb.GetUserInfoResp)
|
ret0, _ := ret[0].(*rspb.GetUserInfoResp)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
@@ -135,10 +135,10 @@ func (mr *MockUserServerMockRecorder) GetUserInfo(arg0, arg1 interface{}) *gomoc
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PhoneLogin mocks base method.
|
// 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()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "PhoneLogin", arg0, arg1)
|
ret := m.ctrl.Call(m, "PhoneLogin", arg0, arg1)
|
||||||
ret0, _ := ret[0].(*grpc_pb.PhoneLoginResp)
|
ret0, _ := ret[0].(*rspb.PhoneLoginResp)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
@@ -150,10 +150,10 @@ func (mr *MockUserServerMockRecorder) PhoneLogin(arg0, arg1 interface{}) *gomock
|
|||||||
}
|
}
|
||||||
|
|
||||||
// WxMiniLogin mocks base method.
|
// 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()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "WxMiniLogin", arg0, arg1)
|
ret := m.ctrl.Call(m, "WxMiniLogin", arg0, arg1)
|
||||||
ret0, _ := ret[0].(*grpc_pb.WxMiniLoginResp)
|
ret0, _ := ret[0].(*rspb.WxMiniLoginResp)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
@@ -4,10 +4,10 @@
|
|||||||
// protoc v4.25.1
|
// protoc v4.25.1
|
||||||
// source: service_gateway.proto
|
// source: service_gateway.proto
|
||||||
|
|
||||||
package grpc_pb
|
package rspb
|
||||||
|
|
||||||
import (
|
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"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
reflect "reflect"
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x72, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
// - protoc v4.25.1
|
// - protoc v4.25.1
|
||||||
// source: service_gateway.proto
|
// source: service_gateway.proto
|
||||||
|
|
||||||
package grpc_pb
|
package rspb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
@@ -4,10 +4,10 @@
|
|||||||
// protoc v4.25.1
|
// protoc v4.25.1
|
||||||
// source: service_qgdzs.proto
|
// source: service_qgdzs.proto
|
||||||
|
|
||||||
package grpc_pb
|
package rspb
|
||||||
|
|
||||||
import (
|
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"
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x72, 0x73, 0x70, 0x62, 0x62,
|
||||||
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -2,11 +2,11 @@
|
|||||||
// source: service_qgdzs.proto
|
// source: service_qgdzs.proto
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Package grpc_pb is a reverse proxy.
|
Package rspb is a reverse proxy.
|
||||||
|
|
||||||
It translates gRPC into RESTful JSON APIs.
|
It translates gRPC into RESTful JSON APIs.
|
||||||
*/
|
*/
|
||||||
package grpc_pb
|
package rspb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
// - protoc v4.25.1
|
// - protoc v4.25.1
|
||||||
// source: service_qgdzs.proto
|
// source: service_qgdzs.proto
|
||||||
|
|
||||||
package grpc_pb
|
package rspb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
@@ -4,10 +4,10 @@
|
|||||||
// protoc v4.25.1
|
// protoc v4.25.1
|
||||||
// source: service_scene.proto
|
// source: service_scene.proto
|
||||||
|
|
||||||
package grpc_pb
|
package rspb
|
||||||
|
|
||||||
import (
|
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"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
reflect "reflect"
|
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,
|
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,
|
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,
|
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,
|
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,
|
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 (
|
var (
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
// - protoc v4.25.1
|
// - protoc v4.25.1
|
||||||
// source: service_scene.proto
|
// source: service_scene.proto
|
||||||
|
|
||||||
package grpc_pb
|
package rspb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
@@ -4,10 +4,10 @@
|
|||||||
// protoc v4.25.1
|
// protoc v4.25.1
|
||||||
// source: service_user.proto
|
// source: service_user.proto
|
||||||
|
|
||||||
package grpc_pb
|
package rspb
|
||||||
|
|
||||||
import (
|
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"
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
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,
|
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,
|
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,
|
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,
|
0x75, 0x73, 0x65, 0x72, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x33,
|
||||||
0x5a, 0x34, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f,
|
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,
|
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,
|
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x72,
|
||||||
0x72, 0x70, 0x63, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -2,11 +2,11 @@
|
|||||||
// source: service_user.proto
|
// source: service_user.proto
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Package grpc_pb is a reverse proxy.
|
Package rspb is a reverse proxy.
|
||||||
|
|
||||||
It translates gRPC into RESTful JSON APIs.
|
It translates gRPC into RESTful JSON APIs.
|
||||||
*/
|
*/
|
||||||
package grpc_pb
|
package rspb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
// - protoc v4.25.1
|
// - protoc v4.25.1
|
||||||
// source: service_user.proto
|
// source: service_user.proto
|
||||||
|
|
||||||
package grpc_pb
|
package rspb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
// protoc v4.25.1
|
// protoc v4.25.1
|
||||||
// source: ss_common.proto
|
// source: ss_common.proto
|
||||||
|
|
||||||
package ss_common
|
package sscommon
|
||||||
|
|
||||||
import (
|
import (
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
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{
|
var file_ss_common_proto_rawDesc = []byte{
|
||||||
0x0a, 0x0f, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
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,
|
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,
|
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,
|
0x73, 0x2f, 0x73, 0x73, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x74, 0x6f, 0x33,
|
0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_ss_common_proto_goTypes = []interface{}{}
|
var file_ss_common_proto_goTypes = []interface{}{}
|
||||||
@@ -4,10 +4,10 @@
|
|||||||
// protoc v4.25.1
|
// protoc v4.25.1
|
||||||
// source: action.proto
|
// source: action.proto
|
||||||
|
|
||||||
package ss_pb
|
package sspb
|
||||||
|
|
||||||
import (
|
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"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
reflect "reflect"
|
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,
|
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,
|
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,
|
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,
|
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,
|
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, 0x2f, 0x73, 0x73, 0x2f, 0x73, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -4,10 +4,10 @@
|
|||||||
// protoc v4.25.1
|
// protoc v4.25.1
|
||||||
// source: define.proto
|
// source: define.proto
|
||||||
|
|
||||||
package ss_pb
|
package sspb
|
||||||
|
|
||||||
import (
|
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"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
reflect "reflect"
|
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,
|
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,
|
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,
|
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,
|
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,
|
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, 0x2f, 0x73, 0x73, 0x2f, 0x73, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x74, 0x6f, 0x33,
|
0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -4,10 +4,10 @@
|
|||||||
// protoc v4.25.1
|
// protoc v4.25.1
|
||||||
// source: service.proto
|
// source: service.proto
|
||||||
|
|
||||||
package ss_pb
|
package sspb
|
||||||
|
|
||||||
import (
|
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"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
reflect "reflect"
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
0x2f, 0x73, 0x73, 0x2f, 0x73, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -3,7 +3,7 @@ package utils
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"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/gin-gonic/gin"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
@@ -26,7 +26,7 @@ func CreateTestContext(method, path string, body interface{}) (*httptest.Respons
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AssertResponse 断言返回值
|
// 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)
|
ts.Assert().Equal(httpCode, w.Code)
|
||||||
var response map[string]interface{}
|
var response map[string]interface{}
|
||||||
ts.Assert().NoError(json.Unmarshal(w.Body.Bytes(), &response))
|
ts.Assert().NoError(json.Unmarshal(w.Body.Bytes(), &response))
|
||||||
|
|||||||
Reference in New Issue
Block a user