更改pb命名
This commit is contained in:
parent
b3e9f53ff7
commit
19a1ef270f
@ -19,7 +19,7 @@ import (
|
||||
type Robot struct {
|
||||
ws *websocket.Conn
|
||||
opts *Options
|
||||
user *pb.DB_UserData
|
||||
user *pb.DBUser
|
||||
builders []*builder
|
||||
}
|
||||
|
||||
|
@ -13,9 +13,9 @@ type (
|
||||
IModule interface {
|
||||
core.IModule
|
||||
//向指定用户发送消息
|
||||
SendMsgToUser(mainType, subType string, msg proto.Message, user *pb.Cache_UserData) (err error)
|
||||
SendMsgToUser(mainType, subType string, msg proto.Message, user *pb.CacheUser) (err error)
|
||||
//向多个用户发送消息
|
||||
SendMsgToUsers(mainType, subType string, msg proto.Message, user ...*pb.Cache_UserData) (err error)
|
||||
SendMsgToUsers(mainType, subType string, msg proto.Message, user ...*pb.CacheUser) (err error)
|
||||
//校验消耗资源
|
||||
CheckConsumeRes(uid string, res []*cfg.Game_atn) (code pb.ErrorCode)
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ func (this *ModelFriend) Init(service core.IService, module core.IModule, comp c
|
||||
return
|
||||
}
|
||||
|
||||
func (this *ModelFriend) Frined_FindCond(nickName string) *pb.DB_UserData {
|
||||
var user *pb.DB_UserData
|
||||
func (this *ModelFriend) Frined_FindCond(nickName string) *pb.DBUser {
|
||||
var user *pb.DBUser
|
||||
err := this.DB.FindOne(TableUser, bson.M{
|
||||
"name": nickName,
|
||||
}).Decode(&user)
|
||||
|
14
modules/hero/api_chouka.go
Normal file
14
modules/hero/api_chouka.go
Normal file
@ -0,0 +1,14 @@
|
||||
package hero
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
func (this *apiComp) ChoukaCheck() (result map[string]interface{}, code comm.ErrorCode) {
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Chouka(session comm.IUserSession, result map[string]interface{}, req *pb.HeroInfoReq) {
|
||||
|
||||
}
|
@ -3,6 +3,7 @@ package hero
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/utils"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
@ -24,6 +25,7 @@ func (this *apiComp) Info(session comm.IUserSession, result map[string]interface
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
}
|
||||
utils.TraceFunc(session.GetUserId(), string(this.moduleHero.GetType()), HeroSubTypeList, req, rsp)
|
||||
}()
|
||||
|
||||
if v, ok := result["hero"]; ok {
|
||||
|
@ -3,6 +3,7 @@ package hero
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/utils"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
@ -18,6 +19,7 @@ func (this *apiComp) List(session comm.IUserSession, result map[string]interface
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
}
|
||||
utils.TraceFunc(session.GetUserId(), string(this.moduleHero.GetType()), HeroSubTypeList, req, rsp)
|
||||
}()
|
||||
|
||||
list, err := this.moduleHero.modelHero.getHeroList(session.GetUserId())
|
||||
|
@ -53,28 +53,36 @@ func (this *ModelHero) initHero(uid string, heroCfgId int32) *pb.DBHero {
|
||||
|
||||
//创建一个指定的英雄
|
||||
func (this *ModelHero) createOneHero(uid string, heroCfgId int32) error {
|
||||
hero := this.initHero(uid, heroCfgId)
|
||||
if hero != nil {
|
||||
return this.moduleHero.modelHero.AddList(uid, hero.Id, hero)
|
||||
heroes, err := this.getHeroList(uid)
|
||||
if err != nil {
|
||||
log.Errorf("%v", err)
|
||||
return err
|
||||
}
|
||||
for _, v := range heroes {
|
||||
if v.HeroID == heroCfgId {
|
||||
v.SameCount++
|
||||
data := map[string]interface{}{
|
||||
"sameCount": v.SameCount, //叠加数
|
||||
}
|
||||
return this.moduleHero.modelHero.Change(uid, data)
|
||||
} else {
|
||||
hero := this.initHero(uid, heroCfgId)
|
||||
if hero != nil {
|
||||
return this.moduleHero.modelHero.AddList(uid, hero.Id, hero)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//创建多个指定的英雄 heroCfgIds可填入多个英雄ID
|
||||
func (this *ModelHero) createMultiHero(uid string, heroCfgIds ...int32) error {
|
||||
// data := make(map[string]interface{})
|
||||
for _, v := range heroCfgIds {
|
||||
if err := this.createOneHero(uid, v); err != nil {
|
||||
return err
|
||||
}
|
||||
// hero := this.initHero(uid, v)
|
||||
// if hero != nil {
|
||||
// data[hero.Id] = hero
|
||||
// }
|
||||
}
|
||||
|
||||
return nil
|
||||
// return this.moduleHero.model_hero.AddLists(uid, data)
|
||||
}
|
||||
|
||||
//获取一个英雄
|
||||
@ -104,7 +112,6 @@ func (this *ModelHero) getHeroList(uid string) ([]*pb.DBHero, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return heroes, nil
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ func (this *ModuleBase) Init(service core.IService, module core.IModule, options
|
||||
}
|
||||
|
||||
//向指定用户发送消息
|
||||
func (this *ModuleBase) SendMsgToUser(mainType, subType string, msg proto.Message, user *pb.Cache_UserData) (err error) {
|
||||
func (this *ModuleBase) SendMsgToUser(mainType, subType string, msg proto.Message, user *pb.CacheUser) (err error) {
|
||||
reply := &pb.RPCMessageReply{}
|
||||
data, _ := ptypes.MarshalAny(msg)
|
||||
if _, err = this.service.RpcGo(context.Background(), fmt.Sprintf("%s/%s", comm.Service_Gateway, user.GatewayServiceId), string(comm.Rpc_GatewayAgentSendMsg), &pb.AgentSendMessageReq{
|
||||
@ -49,7 +49,7 @@ func (this *ModuleBase) SendMsgToUser(mainType, subType string, msg proto.Messag
|
||||
}
|
||||
|
||||
//向多个用户发送消息
|
||||
func (this *ModuleBase) SendMsgToUsers(mainType, subType string, msg proto.Message, user ...*pb.Cache_UserData) (err error) {
|
||||
func (this *ModuleBase) SendMsgToUsers(mainType, subType string, msg proto.Message, user ...*pb.CacheUser) (err error) {
|
||||
var (
|
||||
gateways map[string][]string = make(map[string][]string)
|
||||
gateway []string
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
|
||||
func (this *apiComp) CreateCheck(session comm.IUserSession, req *pb.UserCreateReq) (result map[string]interface{}, code comm.ErrorCode) {
|
||||
result = make(map[string]interface{})
|
||||
self := &pb.DB_UserData{}
|
||||
self := &pb.DBUser{}
|
||||
err := this.module.modelUser.Get(session.GetUserId(), self)
|
||||
if err != nil {
|
||||
code = comm.ErrorCode{Code: pb.ErrorCode_DBError}
|
||||
@ -29,6 +29,14 @@ func (this *apiComp) Create(session comm.IUserSession, result map[string]interfa
|
||||
}
|
||||
}()
|
||||
|
||||
if self, ok := result["self"]; ok {
|
||||
v := self.(*pb.DBUser)
|
||||
if v.Name != "" {
|
||||
code = pb.ErrorCode_RoleCreated
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
update := map[string]interface{}{
|
||||
"name": req.NickName,
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ func (this *apiComp) LoginCheck(session comm.IUserSession, req *pb.UserLoginReq)
|
||||
func (this *apiComp) Login(session comm.IUserSession, result map[string]interface{}, req *pb.UserLoginReq) (code pb.ErrorCode) {
|
||||
var (
|
||||
err error
|
||||
user *pb.DB_UserData
|
||||
user *pb.DBUser
|
||||
)
|
||||
|
||||
defer func() {
|
||||
|
@ -27,18 +27,18 @@ func (this *ModelUser) Init(service core.IService, module core.IModule, comp cor
|
||||
return
|
||||
}
|
||||
|
||||
func (this *ModelUser) User_FindByAccount(sid int32, account string) (*pb.DB_UserData, error) {
|
||||
func (this *ModelUser) User_FindByAccount(sid int32, account string) (*pb.DBUser, error) {
|
||||
filter := bson.M{
|
||||
"sid": sid,
|
||||
"binduid": account,
|
||||
}
|
||||
sr := this.DB.FindOne(TableUser, filter)
|
||||
var nd *pb.DB_UserData
|
||||
var nd *pb.DBUser
|
||||
err := sr.Decode(&nd)
|
||||
return nd, err
|
||||
}
|
||||
|
||||
func (this *ModelUser) User_Create(user *pb.DB_UserData) (err error) {
|
||||
func (this *ModelUser) User_Create(user *pb.DBUser) (err error) {
|
||||
_id := primitive.NewObjectID().Hex()
|
||||
user.Id = _id
|
||||
user.Uid = fmt.Sprintf("%d_%s", user.Sid, _id)
|
||||
@ -49,8 +49,8 @@ func (this *ModelUser) User_Create(user *pb.DB_UserData) (err error) {
|
||||
}
|
||||
|
||||
//获取用户
|
||||
func (this *ModelUser) getUser(uid string) *pb.DB_UserData {
|
||||
dbUser := &pb.DB_UserData{}
|
||||
func (this *ModelUser) getUser(uid string) *pb.DBUser {
|
||||
dbUser := &pb.DBUser{}
|
||||
if err := this.Get(uid, dbUser); err != nil {
|
||||
log.Errorf("getUser err:%v", err)
|
||||
return nil
|
||||
|
@ -37,7 +37,7 @@ func (this *Api_Comp) Register(c *engine.Context) {
|
||||
rsp := &pb.UserRegisterRsp{}
|
||||
err := c.BindJSON(&req)
|
||||
if err == nil {
|
||||
err := this.module.modelUser.User_Create(&pb.DB_UserData{
|
||||
err := this.module.modelUser.User_Create(&pb.DBUser{
|
||||
Binduid: req.Account,
|
||||
Sid: req.Sid,
|
||||
})
|
||||
|
@ -48,6 +48,7 @@ const (
|
||||
ErrorCode_BindUser ErrorCode = 1002 //用户绑定错误
|
||||
ErrorCode_GoldNoEnough ErrorCode = 1003 // 金币不足
|
||||
ErrorCode_DiamondNoEnough ErrorCode = 1004 // 钻石不足
|
||||
ErrorCode_RoleCreated ErrorCode = 1005 //已创角
|
||||
// friend
|
||||
ErrorCode_FriendNotSelf ErrorCode = 1100 //不能是自己
|
||||
ErrorCode_FriendSelfMax ErrorCode = 1101 //超出好友最大数量
|
||||
@ -104,6 +105,7 @@ var (
|
||||
1002: "BindUser",
|
||||
1003: "GoldNoEnough",
|
||||
1004: "DiamondNoEnough",
|
||||
1005: "RoleCreated",
|
||||
1100: "FriendNotSelf",
|
||||
1101: "FriendSelfMax",
|
||||
1102: "FriendTargetMax",
|
||||
@ -153,6 +155,7 @@ var (
|
||||
"BindUser": 1002,
|
||||
"GoldNoEnough": 1003,
|
||||
"DiamondNoEnough": 1004,
|
||||
"RoleCreated": 1005,
|
||||
"FriendNotSelf": 1100,
|
||||
"FriendSelfMax": 1101,
|
||||
"FriendTargetMax": 1102,
|
||||
@ -210,7 +213,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_errorcode_proto_rawDesc = []byte{
|
||||
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x2a, 0xe2, 0x07, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x6f, 0x2a, 0xf4, 0x07, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d,
|
||||
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
|
||||
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
@ -240,40 +243,41 @@ var file_errorcode_proto_rawDesc = []byte{
|
||||
0x73, 0x65, 0x72, 0x10, 0xea, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x47, 0x6f, 0x6c, 0x64, 0x4e, 0x6f,
|
||||
0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xeb, 0x07, 0x12, 0x14, 0x0a, 0x0f, 0x44, 0x69, 0x61,
|
||||
0x6d, 0x6f, 0x6e, 0x64, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xec, 0x07, 0x12,
|
||||
0x12, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x6c, 0x66,
|
||||
0x10, 0xcc, 0x08, 0x12, 0x12, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c,
|
||||
0x66, 0x4d, 0x61, 0x78, 0x10, 0xcd, 0x08, 0x12, 0x14, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e,
|
||||
0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x10, 0xce, 0x08, 0x12, 0x15, 0x0a,
|
||||
0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x4e, 0x6f, 0x44, 0x61, 0x74,
|
||||
0x61, 0x10, 0xcf, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x54, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xd0, 0x08, 0x12, 0x0e, 0x0a,
|
||||
0x09, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x59, 0x65, 0x74, 0x10, 0xd1, 0x08, 0x12, 0x13, 0x0a,
|
||||
0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x59, 0x65, 0x74, 0x10,
|
||||
0xd2, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66,
|
||||
0x42, 0x6c, 0x61, 0x63, 0x6b, 0x59, 0x65, 0x74, 0x10, 0xd3, 0x08, 0x12, 0x19, 0x0a, 0x14, 0x46,
|
||||
0x72, 0x69, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x6c, 0x61, 0x63, 0x6b,
|
||||
0x59, 0x65, 0x74, 0x10, 0xd4, 0x08, 0x12, 0x15, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64,
|
||||
0x41, 0x70, 0x70, 0x6c, 0x79, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xd5, 0x08, 0x12, 0x13, 0x0a,
|
||||
0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x4d, 0x61, 0x78, 0x10,
|
||||
0xd6, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x61, 0x72,
|
||||
0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0xd7, 0x08, 0x12, 0x12,
|
||||
0x0a, 0x0d, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10,
|
||||
0xb0, 0x09, 0x12, 0x15, 0x0a, 0x10, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x46, 0x6f, 0x75,
|
||||
0x6e, 0x64, 0x47, 0x69, 0x72, 0x64, 0x10, 0xb1, 0x09, 0x12, 0x16, 0x0a, 0x11, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x73, 0x47, 0x72, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb2,
|
||||
0x09, 0x12, 0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x69, 0x72, 0x64, 0x41, 0x6d,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb3, 0x09, 0x12, 0x10, 0x0a, 0x0b,
|
||||
0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x94, 0x0a, 0x12, 0x11,
|
||||
0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x95,
|
||||
0x0a, 0x12, 0x0e, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x4c, 0x76, 0x10, 0x96,
|
||||
0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x10, 0x97, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x6c,
|
||||
0x6f, 0x72, 0x45, 0x72, 0x72, 0x10, 0x98, 0x0a, 0x12, 0x1e, 0x0a, 0x19, 0x45, 0x71, 0x75, 0x69,
|
||||
0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x6e, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x71, 0x75, 0x69,
|
||||
0x70, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x1c, 0x0a, 0x17, 0x45, 0x71, 0x75, 0x69,
|
||||
0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x76, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x61, 0x63,
|
||||
0x68, 0x65, 0x64, 0x10, 0xf9, 0x0a, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x10, 0x0a, 0x0b, 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x10, 0xed,
|
||||
0x07, 0x12, 0x12, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x53, 0x65,
|
||||
0x6c, 0x66, 0x10, 0xcc, 0x08, 0x12, 0x12, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53,
|
||||
0x65, 0x6c, 0x66, 0x4d, 0x61, 0x78, 0x10, 0xcd, 0x08, 0x12, 0x14, 0x0a, 0x0f, 0x46, 0x72, 0x69,
|
||||
0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x10, 0xce, 0x08, 0x12,
|
||||
0x15, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x4e, 0x6f, 0x44,
|
||||
0x61, 0x74, 0x61, 0x10, 0xcf, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64,
|
||||
0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xd0, 0x08, 0x12,
|
||||
0x0e, 0x0a, 0x09, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x59, 0x65, 0x74, 0x10, 0xd1, 0x08, 0x12,
|
||||
0x13, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x59, 0x65,
|
||||
0x74, 0x10, 0xd2, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65,
|
||||
0x6c, 0x66, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x59, 0x65, 0x74, 0x10, 0xd3, 0x08, 0x12, 0x19, 0x0a,
|
||||
0x14, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x6c, 0x61,
|
||||
0x63, 0x6b, 0x59, 0x65, 0x74, 0x10, 0xd4, 0x08, 0x12, 0x15, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65,
|
||||
0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xd5, 0x08, 0x12,
|
||||
0x13, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x4d, 0x61,
|
||||
0x78, 0x10, 0xd6, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65,
|
||||
0x61, 0x72, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0xd7, 0x08,
|
||||
0x12, 0x12, 0x0a, 0x0d, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67,
|
||||
0x68, 0x10, 0xb0, 0x09, 0x12, 0x15, 0x0a, 0x10, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x46,
|
||||
0x6f, 0x75, 0x6e, 0x64, 0x47, 0x69, 0x72, 0x64, 0x10, 0xb1, 0x09, 0x12, 0x16, 0x0a, 0x11, 0x49,
|
||||
0x74, 0x65, 0x6d, 0x73, 0x47, 0x72, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x55, 0x70, 0x70, 0x65, 0x72,
|
||||
0x10, 0xb2, 0x09, 0x12, 0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x69, 0x72, 0x64,
|
||||
0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb3, 0x09, 0x12, 0x10,
|
||||
0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x94, 0x0a,
|
||||
0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68,
|
||||
0x10, 0x95, 0x0a, 0x12, 0x0e, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x4c, 0x76,
|
||||
0x10, 0x96, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x69, 0x74, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x10, 0x97, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x43,
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x45, 0x72, 0x72, 0x10, 0x98, 0x0a, 0x12, 0x1e, 0x0a, 0x19, 0x45, 0x71,
|
||||
0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x6e, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x71,
|
||||
0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x1c, 0x0a, 0x17, 0x45, 0x71,
|
||||
0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x76, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65,
|
||||
0x61, 0x63, 0x68, 0x65, 0x64, 0x10, 0xf9, 0x0a, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -23,11 +23,12 @@ enum ErrorCode {
|
||||
ConfigNoFound = 104; //配置未找到
|
||||
|
||||
// user
|
||||
SecKeyInvalid = 1000; //秘钥无效
|
||||
SecKey = 1001; //秘钥格式错误
|
||||
BindUser = 1002; //用户绑定错误
|
||||
GoldNoEnough = 1003; // 金币不足
|
||||
SecKeyInvalid = 1000; //秘钥无效
|
||||
SecKey = 1001; //秘钥格式错误
|
||||
BindUser = 1002; //用户绑定错误
|
||||
GoldNoEnough = 1003; // 金币不足
|
||||
DiamondNoEnough = 1004; // 钻石不足
|
||||
RoleCreated = 1005; //已创角
|
||||
|
||||
// friend
|
||||
FriendNotSelf = 1100; //不能是自己
|
||||
@ -54,7 +55,7 @@ enum ErrorCode {
|
||||
HeroNoEnough = 1301; //英雄数量不足
|
||||
HeroMaxLv = 1302; //英雄达到最大等级
|
||||
HeroInitCreat = 1303; //初始化英雄
|
||||
HeroColorErr = 1304; // 品质不匹配
|
||||
HeroColorErr = 1304; // 品质不匹配
|
||||
// equipment
|
||||
EquipmentOnFoundEquipment = 1400; // 未找到武器
|
||||
EquipmentLvlimitReached = 1401; // 武器等级已达上限
|
||||
|
@ -1,14 +1,14 @@
|
||||
syntax = "proto3";
|
||||
option go_package = ".;pb";
|
||||
|
||||
message Cache_UserData {
|
||||
message CacheUser {
|
||||
string uid = 1;
|
||||
string SessionId = 2;
|
||||
string GatewayServiceId = 3;
|
||||
// DB_UserData UserData = 4; //@go_tags(`json:",inline"`)
|
||||
}
|
||||
|
||||
message DB_UserData {
|
||||
message DBUser {
|
||||
string id = 1; //@go_tags(`bson:"_id"`) ID
|
||||
string uid = 2; //@go_tags(`bson:"uid"`) 用户ID
|
||||
string uuid = 3; //@go_tags(`bson:"uuid"`) 玩家唯一uuid
|
||||
|
@ -9,7 +9,7 @@ message UserLoginReq {
|
||||
int32 sid = 2; //区服编号
|
||||
}
|
||||
|
||||
message UserLoginResp { DB_UserData data = 1; }
|
||||
message UserLoginResp { DBUser data = 1; }
|
||||
|
||||
message UserRegisterReq {
|
||||
string account = 1;
|
||||
@ -21,7 +21,7 @@ message UserRegisterRsp {
|
||||
string account = 2;
|
||||
}
|
||||
|
||||
message UserLoadRsp { Cache_UserData data = 1; }
|
||||
message UserLoadRsp { CacheUser data = 1; }
|
||||
|
||||
//创角
|
||||
message UserCreateReq {
|
||||
|
133
pb/user_db.pb.go
133
pb/user_db.pb.go
@ -20,7 +20,7 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type Cache_UserData struct {
|
||||
type CacheUser struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@ -30,8 +30,8 @@ type Cache_UserData struct {
|
||||
GatewayServiceId string `protobuf:"bytes,3,opt,name=GatewayServiceId,proto3" json:",inline"` // DB_UserData UserData = 4; //
|
||||
}
|
||||
|
||||
func (x *Cache_UserData) Reset() {
|
||||
*x = Cache_UserData{}
|
||||
func (x *CacheUser) Reset() {
|
||||
*x = CacheUser{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_user_user_db_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -39,13 +39,13 @@ func (x *Cache_UserData) Reset() {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Cache_UserData) String() string {
|
||||
func (x *CacheUser) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Cache_UserData) ProtoMessage() {}
|
||||
func (*CacheUser) ProtoMessage() {}
|
||||
|
||||
func (x *Cache_UserData) ProtoReflect() protoreflect.Message {
|
||||
func (x *CacheUser) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_user_db_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -57,33 +57,33 @@ func (x *Cache_UserData) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Cache_UserData.ProtoReflect.Descriptor instead.
|
||||
func (*Cache_UserData) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use CacheUser.ProtoReflect.Descriptor instead.
|
||||
func (*CacheUser) Descriptor() ([]byte, []int) {
|
||||
return file_user_user_db_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Cache_UserData) GetUid() string {
|
||||
func (x *CacheUser) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Cache_UserData) GetSessionId() string {
|
||||
func (x *CacheUser) GetSessionId() string {
|
||||
if x != nil {
|
||||
return x.SessionId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Cache_UserData) GetGatewayServiceId() string {
|
||||
func (x *CacheUser) GetGatewayServiceId() string {
|
||||
if x != nil {
|
||||
return x.GatewayServiceId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DB_UserData struct {
|
||||
type DBUser struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@ -104,8 +104,8 @@ type DB_UserData struct {
|
||||
Exp int32 `protobuf:"varint,14,opt,name=exp,proto3" json:"exp" bson:"exp"` //经验
|
||||
}
|
||||
|
||||
func (x *DB_UserData) Reset() {
|
||||
*x = DB_UserData{}
|
||||
func (x *DBUser) Reset() {
|
||||
*x = DBUser{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_user_user_db_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -113,13 +113,13 @@ func (x *DB_UserData) Reset() {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DB_UserData) String() string {
|
||||
func (x *DBUser) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DB_UserData) ProtoMessage() {}
|
||||
func (*DBUser) ProtoMessage() {}
|
||||
|
||||
func (x *DB_UserData) ProtoReflect() protoreflect.Message {
|
||||
func (x *DBUser) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_user_db_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -131,103 +131,103 @@ func (x *DB_UserData) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DB_UserData.ProtoReflect.Descriptor instead.
|
||||
func (*DB_UserData) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use DBUser.ProtoReflect.Descriptor instead.
|
||||
func (*DBUser) Descriptor() ([]byte, []int) {
|
||||
return file_user_user_db_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *DB_UserData) GetId() string {
|
||||
func (x *DBUser) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DB_UserData) GetUid() string {
|
||||
func (x *DBUser) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DB_UserData) GetUuid() string {
|
||||
func (x *DBUser) GetUuid() string {
|
||||
if x != nil {
|
||||
return x.Uuid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DB_UserData) GetBinduid() string {
|
||||
func (x *DBUser) GetBinduid() string {
|
||||
if x != nil {
|
||||
return x.Binduid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DB_UserData) GetName() string {
|
||||
func (x *DBUser) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DB_UserData) GetSid() int32 {
|
||||
func (x *DBUser) GetSid() int32 {
|
||||
if x != nil {
|
||||
return x.Sid
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DB_UserData) GetCreateip() string {
|
||||
func (x *DBUser) GetCreateip() string {
|
||||
if x != nil {
|
||||
return x.Createip
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DB_UserData) GetLastloginip() string {
|
||||
func (x *DBUser) GetLastloginip() string {
|
||||
if x != nil {
|
||||
return x.Lastloginip
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DB_UserData) GetCtime() int64 {
|
||||
func (x *DBUser) GetCtime() int64 {
|
||||
if x != nil {
|
||||
return x.Ctime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DB_UserData) GetLogintime() int64 {
|
||||
func (x *DBUser) GetLogintime() int64 {
|
||||
if x != nil {
|
||||
return x.Logintime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DB_UserData) GetFriendPoint() int32 {
|
||||
func (x *DBUser) GetFriendPoint() int32 {
|
||||
if x != nil {
|
||||
return x.FriendPoint
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DB_UserData) GetAvatar() int32 {
|
||||
func (x *DBUser) GetAvatar() int32 {
|
||||
if x != nil {
|
||||
return x.Avatar
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DB_UserData) GetGold() int32 {
|
||||
func (x *DBUser) GetGold() int32 {
|
||||
if x != nil {
|
||||
return x.Gold
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DB_UserData) GetExp() int32 {
|
||||
func (x *DBUser) GetExp() int32 {
|
||||
if x != nil {
|
||||
return x.Exp
|
||||
}
|
||||
@ -238,36 +238,35 @@ var File_user_user_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_user_user_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x62, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6c, 0x0a, 0x0e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x55, 0x73,
|
||||
0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x65, 0x73, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x65, 0x73,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61,
|
||||
0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x49, 0x64, 0x22, 0xd5, 0x02, 0x0a, 0x0b, 0x44, 0x42, 0x5f, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61,
|
||||
0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
|
||||
0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64,
|
||||
0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x75,
|
||||
0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x06, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x03, 0x73, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x69, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x69, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x6c, 0x6f, 0x67, 0x69,
|
||||
0x6e, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x6c,
|
||||
0x6f, 0x67, 0x69, 0x6e, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18,
|
||||
0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x09, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x72,
|
||||
0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x76,
|
||||
0x61, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x18, 0x0d, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18,
|
||||
0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
|
||||
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x67, 0x0a, 0x09, 0x43, 0x61, 0x63, 0x68, 0x65, 0x55, 0x73, 0x65,
|
||||
0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||
0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49,
|
||||
0x64, 0x12, 0x2a, 0x0a, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x47, 0x61, 0x74,
|
||||
0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0xd0, 0x02,
|
||||
0x0a, 0x06, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75,
|
||||
0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x07, 0x62, 0x69, 0x6e, 0x64, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x73, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x73, 0x69, 0x64, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x69, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x08, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x69, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x6c, 0x61,
|
||||
0x73, 0x74, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0b, 0x6c, 0x61, 0x73, 0x74, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18,
|
||||
0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x12, 0x20, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x18,
|
||||
0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69,
|
||||
0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x0c, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f,
|
||||
0x6c, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70,
|
||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -284,8 +283,8 @@ func file_user_user_db_proto_rawDescGZIP() []byte {
|
||||
|
||||
var file_user_user_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_user_user_db_proto_goTypes = []interface{}{
|
||||
(*Cache_UserData)(nil), // 0: Cache_UserData
|
||||
(*DB_UserData)(nil), // 1: DB_UserData
|
||||
(*CacheUser)(nil), // 0: CacheUser
|
||||
(*DBUser)(nil), // 1: DBUser
|
||||
}
|
||||
var file_user_user_db_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
@ -302,7 +301,7 @@ func file_user_user_db_proto_init() {
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_user_user_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Cache_UserData); i {
|
||||
switch v := v.(*CacheUser); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -314,7 +313,7 @@ func file_user_user_db_proto_init() {
|
||||
}
|
||||
}
|
||||
file_user_user_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DB_UserData); i {
|
||||
switch v := v.(*DBUser); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -81,7 +81,7 @@ type UserLoginResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DB_UserData `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
Data *DBUser `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *UserLoginResp) Reset() {
|
||||
@ -116,7 +116,7 @@ func (*UserLoginResp) Descriptor() ([]byte, []int) {
|
||||
return file_user_user_msg_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *UserLoginResp) GetData() *DB_UserData {
|
||||
func (x *UserLoginResp) GetData() *DBUser {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
@ -238,7 +238,7 @@ type UserLoadRsp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *Cache_UserData `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
Data *CacheUser `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *UserLoadRsp) Reset() {
|
||||
@ -273,7 +273,7 @@ func (*UserLoadRsp) Descriptor() ([]byte, []int) {
|
||||
return file_user_user_msg_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *UserLoadRsp) GetData() *Cache_UserData {
|
||||
func (x *UserLoadRsp) GetData() *CacheUser {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
@ -376,27 +376,26 @@ var file_user_user_msg_proto_rawDesc = []byte{
|
||||
0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x03, 0x73, 0x69, 0x64, 0x22, 0x31, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f,
|
||||
0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x5f, 0x55, 0x73, 0x65, 0x72, 0x44,
|
||||
0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3d, 0x0a, 0x0f, 0x55, 0x73, 0x65,
|
||||
0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x03, 0x73, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72,
|
||||
0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x43,
|
||||
0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f,
|
||||
0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x32, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x61,
|
||||
0x64, 0x52, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x55, 0x73, 0x65, 0x72, 0x44,
|
||||
0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2b, 0x0a, 0x0d, 0x55, 0x73, 0x65,
|
||||
0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69,
|
||||
0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4e, 0x69,
|
||||
0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x52, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x05, 0x52, 0x03, 0x73, 0x69, 0x64, 0x22, 0x2c, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f,
|
||||
0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04,
|
||||
0x64, 0x61, 0x74, 0x61, 0x22, 0x3d, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69,
|
||||
0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
|
||||
0x73, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73,
|
||||
0x74, 0x65, 0x72, 0x52, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65,
|
||||
0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x22, 0x2d, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x73, 0x70, 0x12,
|
||||
0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e,
|
||||
0x43, 0x61, 0x63, 0x68, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22,
|
||||
0x2b, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
|
||||
0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x0f, 0x0a, 0x0d,
|
||||
0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x73, 0x70, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -420,14 +419,14 @@ var file_user_user_msg_proto_goTypes = []interface{}{
|
||||
(*UserLoadRsp)(nil), // 4: UserLoadRsp
|
||||
(*UserCreateReq)(nil), // 5: UserCreateReq
|
||||
(*UserCreateRsp)(nil), // 6: UserCreateRsp
|
||||
(*DB_UserData)(nil), // 7: DB_UserData
|
||||
(*DBUser)(nil), // 7: DBUser
|
||||
(ErrorCode)(0), // 8: ErrorCode
|
||||
(*Cache_UserData)(nil), // 9: Cache_UserData
|
||||
(*CacheUser)(nil), // 9: CacheUser
|
||||
}
|
||||
var file_user_user_msg_proto_depIdxs = []int32{
|
||||
7, // 0: UserLoginResp.data:type_name -> DB_UserData
|
||||
7, // 0: UserLoginResp.data:type_name -> DBUser
|
||||
8, // 1: UserRegisterRsp.Code:type_name -> ErrorCode
|
||||
9, // 2: UserLoadRsp.data:type_name -> Cache_UserData
|
||||
9, // 2: UserLoadRsp.data:type_name -> CacheUser
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
|
Loading…
Reference in New Issue
Block a user