From e172952cc2ff820506226554636fac95d1c3abd5 Mon Sep 17 00:00:00 2001 From: zqj <582132116@qq.com> Date: Thu, 16 Jun 2022 16:51:30 +0800 Subject: [PATCH] feat: email 系统搭建 以及gm发送邮件接口完成 --- DesignerConfigs | 2 +- cmd/gameserver/action/EmailAction.go | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ cmd/gameserver/action/HeroAction.go | 4 ++-- cmd/gameserver/action/protocode.go | 12 ++++++++---- cmd/gameserver/gmaction/GmAction.go | 44 ++++++++++++++++++++++++++++++++++++++++++++ cmd/test/action/protocode.go | 12 ++++++++---- common/commonFunc.go | 20 ++++++++++++++++++++ common/const.go | 11 ++++++----- common/db/mongoproxy/mongoplugin.go | 8 ++++++++ models/RoleLog.go | 72 ------------------------------------------------------------------------ models/dbseed.go | 4 ++-- models/email.go | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ models/prop.go | 23 ----------------------- models/role.go | 5 +---- models/roleLog.go | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ models/rolePlugin.go | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pb/game.pb.go | 471 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------- pb/models.pb.go | 486 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------------------------------------------------------------- pb/protocode.pb.go | 146 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------- protos | 2 +- tools/generator.py | 34 +++++++++++++--------------------- 21 files changed, 1301 insertions(+), 359 deletions(-) create mode 100644 cmd/gameserver/action/EmailAction.go delete mode 100644 models/RoleLog.go create mode 100644 models/email.go delete mode 100644 models/prop.go create mode 100644 models/roleLog.go diff --git a/DesignerConfigs b/DesignerConfigs index e062c50..38aa59d 160000 --- a/DesignerConfigs +++ b/DesignerConfigs @@ -1 +1 @@ -Subproject commit e062c5009b60e14a5d2eca3d1cfef903bce81d4c +Subproject commit 38aa59df0f03d95f39de9a9379b600cdd80d19a2 diff --git a/cmd/gameserver/action/EmailAction.go b/cmd/gameserver/action/EmailAction.go new file mode 100644 index 0000000..1bb2a70 --- /dev/null +++ b/cmd/gameserver/action/EmailAction.go @@ -0,0 +1,131 @@ +package action + +import ( + "github.com/golang/protobuf/proto" + "go.mongodb.org/mongo-driver/bson" + "pro2d/common" + "pro2d/common/components" + "pro2d/common/db/mongoproxy" + "pro2d/common/logger" + "pro2d/models" + "pro2d/pb" +) + +/* +EmailListRpc 邮件列表 +*/ +func EmailListRpc(role *models.RoleModel, msg components.IMessage) (int32, interface{}) { + // del + err := role.DelExpireEmail() + if err != nil { + logger.Error(err.Error()) + } + + // load + emails := role.LoadEmails() + return 0, emails +} + +func GetEmailPBAttachMents(email *pb.Email) string { + if email.Status == 2 { + return "" + } + return email.Attachments +} + +/* +EmailDrawRpc 打开所有邮件奖励 + 2 邮件不存在 +*/ +func EmailDrawRpc(role *models.RoleModel, msg components.IMessage) (int32, interface{}) { + req := pb.EmailDrawReq{} + if err := proto.Unmarshal(msg.GetData(), &req); err != nil { + logger.Error("loginRpc err: %v", err) + return 1, nil + } + var emails []*pb.Email + + if req.Id == "" { + // 打开所有邮件 + emails = role.LoadEmails() + } else { + // 打开一个邮件 + email := models.NewEmailModel(req.Id) + if err := email.Load(); err != nil { + return 2, nil + } + emails = []*pb.Email{email.Data} + } + + var ids []string + reward := make(common.IMapStringNum) + for _, e := range emails { + attachments := GetEmailPBAttachMents(e) + if attachments == "" { + continue + } + email := models.NewEmailModelPB(e) + email.SetProperty("status", 2) + email.Log(role, 2) + email.Update() + ids = append(ids, e.Id) + for k, v := range common.StringToMapNum(email.Data.Attachments) { + tmp, ok := reward[k] + if !ok { + reward[k] = v + } else { + reward[k] = tmp + v + } + } + } + role.Award(reward) + + return 0, &pb.EmailDrawRsp{Ids: ids, Reward: common.MapNumToString(reward)} +} + +func EmailCheckRpc(role *models.RoleModel, msg components.IMessage) (int32, interface{}) { + req := pb.EmailCheckRar{} + if err := proto.Unmarshal(msg.GetData(), &req); err != nil { + logger.Error("loginRpc err: %v", err) + return 1, nil + } + email := models.NewEmailModel(req.Id) + if err := email.Load(); err != nil { + return 2, nil + } + + email.SetProperty("status", 1) + email.Log(role, 1) + email.Update() + return 0, nil +} + +func EmailDelRpc(role *models.RoleModel, msg components.IMessage) (int32, interface{}) { + req := pb.EmailDelReq{} + if err := proto.Unmarshal(msg.GetData(), &req); err != nil { + logger.Error("loginRpc err: %v", err) + return 1, nil + } + + var result []string + emails := role.LoadEmails() + for _, email := range emails { + attachments := GetEmailPBAttachMents(email) + if email.Status == 2 || (attachments == "" && email.Status == 1) { + result = append(result, email.Id) + models.NewEmailModelPB(email).Log(role, 3) + + role.MyLog("mail_action", &pb.LogConf{ + Desc: "del_mail", + Int1: email.Id, + }) + } + } + + filter := bson.D{{"roleid", role.Data.Id}, {"id", bson.D{{"$in", result}}}} + if err := mongoproxy.DelMany("email", filter); err != nil { + return 2, nil + } + + return 0, &pb.EmailDelRsp{Ids: result} +} diff --git a/cmd/gameserver/action/HeroAction.go b/cmd/gameserver/action/HeroAction.go index 7cbcb0b..9dccd13 100644 --- a/cmd/gameserver/action/HeroAction.go +++ b/cmd/gameserver/action/HeroAction.go @@ -39,8 +39,8 @@ func EquipmentDelRpc(role *models.RoleModel, msg components.IMessage) (int32, in /* HeroUpLevelRpc 英雄升级 - 2 item不存在 - 3 itemType错误 + 2 item 不存在 + 3 itemType 错误 4 itemExp 不存在 5 英雄不存在 6 消耗物品失败 diff --git a/cmd/gameserver/action/protocode.go b/cmd/gameserver/action/protocode.go index 20c8b65..1e869d4 100644 --- a/cmd/gameserver/action/protocode.go +++ b/cmd/gameserver/action/protocode.go @@ -9,14 +9,18 @@ func GetActionMap() map[interface{}]interface{} { logger.Debug("init protocode...") am := make(map[interface{}]interface{}) am[uint32(pb.ProtoCode_HeartRpc)] = HeartRpc - am[uint32(pb.ProtoCode_RoleStartBattleRpc)] = RoleStartBattleRpc - am[uint32(pb.ProtoCode_RoleEndBattleRpc)] = RoleEndBattleRpc - am[uint32(pb.ProtoCode_HeroUpLevelRpc)] = HeroUpLevelRpc am[uint32(pb.ProtoCode_CreateRpc)] = CreateRpc am[uint32(pb.ProtoCode_ChangeTeamRpc)] = ChangeTeamRpc am[uint32(pb.ProtoCode_HeroEquipReferRpc)] = HeroEquipReferRpc am[uint32(pb.ProtoCode_RoleClearItemsRpc)] = RoleClearItemsRpc + am[uint32(pb.ProtoCode_RoleStartBattleRpc)] = RoleStartBattleRpc + am[uint32(pb.ProtoCode_RoleEndBattleRpc)] = RoleEndBattleRpc am[uint32(pb.ProtoCode_EquipmentDelRpc)] = EquipmentDelRpc + am[uint32(pb.ProtoCode_HeroUpLevelRpc)] = HeroUpLevelRpc + am[uint32(pb.ProtoCode_EmailListRpc)] = EmailListRpc + am[uint32(pb.ProtoCode_EmailDrawRpc)] = EmailDrawRpc + am[uint32(pb.ProtoCode_EmailCheckRpc)] = EmailCheckRpc + am[uint32(pb.ProtoCode_EmailDelRpc)] = EmailDelRpc return am -} \ No newline at end of file +} diff --git a/cmd/gameserver/gmaction/GmAction.go b/cmd/gameserver/gmaction/GmAction.go index c07672c..3f397ba 100644 --- a/cmd/gameserver/gmaction/GmAction.go +++ b/cmd/gameserver/gmaction/GmAction.go @@ -2,6 +2,8 @@ package gmaction import ( + "pro2d/common" + "pro2d/common/logger" "pro2d/models" "pro2d/pb" "strconv" @@ -91,3 +93,45 @@ func (gm *GmAction) UpdatePackLimit(role *models.RoleModel, params GMParams) { role.UpdateProperties(update, true) } + +/*GMEmail 发送邮件 +参数 &title= &stitle= &content= &attachments= +*/ +func (gm *GmAction) GMEmail(role *models.RoleModel, params GMParams) { + title, ok := params["title"] + if !ok { + title = "" + } + stitle, ok := params["stitle"] + if !ok { + stitle = "" + } + content, ok := params["content"] + if !ok { + content = "" + } + attachments, ok := params["attachments"] + if !ok { + attachments = "" + } + id, err := common.GetNextEmail() + if err != nil { + logger.Error(err) + return + } + email := &pb.Email{ + Id: id, + RoleId: role.Data.Id, + Title: title, + Stitle: stitle, + Content: content, + Attachments: attachments, + Status: 0, + CreateTime: common.Timex(), + } + m := models.NewEmailModelPB(email) + err = m.Create() + if err != nil { + logger.Error(err) + } +} diff --git a/cmd/test/action/protocode.go b/cmd/test/action/protocode.go index abe7267..2b637a9 100644 --- a/cmd/test/action/protocode.go +++ b/cmd/test/action/protocode.go @@ -7,18 +7,22 @@ import ( func GetTestActionMap() map[interface{}]interface{} { am := make(map[interface{}]interface{}) am[uint32(pb.ProtoCode_HeartRpc)] = HeartRsp - am[uint32(pb.ProtoCode_RoleStartBattleRpc)] = RoleStartBattleRsp - am[uint32(pb.ProtoCode_RoleEndBattleRpc)] = RoleEndBattleRsp - am[uint32(pb.ProtoCode_HeroUpLevelRpc)] = HeroUpLevelRsp am[uint32(pb.ProtoCode_CreateRpc)] = CreateRsp am[uint32(pb.ProtoCode_ChangeTeamRpc)] = ChangeTeamRsp am[uint32(pb.ProtoCode_HeroEquipReferRpc)] = HeroEquipReferRsp am[uint32(pb.ProtoCode_RoleClearItemsRpc)] = RoleClearItemsRsp + am[uint32(pb.ProtoCode_RoleStartBattleRpc)] = RoleStartBattleRsp + am[uint32(pb.ProtoCode_RoleEndBattleRpc)] = RoleEndBattleRsp am[uint32(pb.ProtoCode_EquipmentDelRpc)] = EquipmentDelRsp + am[uint32(pb.ProtoCode_HeroUpLevelRpc)] = HeroUpLevelRsp + am[uint32(pb.ProtoCode_EmailListRpc)] = EmailListRsp + am[uint32(pb.ProtoCode_EmailDrawRpc)] = EmailDrawRsp + am[uint32(pb.ProtoCode_EmailCheckRpc)] = EmailCheckRsp + am[uint32(pb.ProtoCode_EmailDelRpc)] = EmailDelRsp am[uint32(pb.ProtoCode_DisConnectNty)] = DisConnectNty am[uint32(pb.ProtoCode_RoleUpdatePropertyNty)] = RoleUpdatePropertyNty am[uint32(pb.ProtoCode_RoleUpdateItemsNty)] = RoleUpdateItemsNty am[uint32(pb.ProtoCode_EquipmentAddNty)] = EquipmentAddNty return am -} \ No newline at end of file +} diff --git a/common/commonFunc.go b/common/commonFunc.go index 3dff65d..744a0c1 100644 --- a/common/commonFunc.go +++ b/common/commonFunc.go @@ -54,6 +54,26 @@ func GetNextUId() (string, error) { return fmt.Sprintf("%d", ID), nil } +func GetNextEmail() (string, error) { + relay, err := redisproxy.HGET(fmt.Sprintf(AutoIncrement, GlobalSconf.ID), "email") + if err != nil { + return "", err + } + + var ID int64 = 0 + if relay == nil { + ID = 1 + redisproxy.HSET(fmt.Sprintf(AutoIncrement, GlobalSconf.ID), "email", ID) + } else { + relay, err = redisproxy.HINCRBY(fmt.Sprintf(AutoIncrement, GlobalSconf.ID), "email", 1) + ID, err = redis.Int64(relay, err) + if err != nil { + return "", err + } + } + return fmt.Sprintf("%d", ID), nil +} + type IMapString map[string]interface{} type IMapStringNum map[string]int32 diff --git a/common/const.go b/common/const.go index fafed9a..f95787c 100644 --- a/common/const.go +++ b/common/const.go @@ -13,11 +13,12 @@ const ( SaveDataInterval = 5 //s //自增id相关 - MaxCommNum = 1000000 - MaxRoleNum = MaxCommNum - MaxHeroNum = 100 - MaxTeamNum = 10 - MaxUidNum = 90000 + MaxCommNum = 1000000 + MaxRoleNum = MaxCommNum + MaxHeroNum = 100 + MaxTeamNum = 10 + MaxUidNum = 90000 + MaxEmailNum = 10 AutoIncrement = "pro2d_autoincrement_set:%d" AutoIncrementHero = "pro2d_autoincrement:hero" diff --git a/common/db/mongoproxy/mongoplugin.go b/common/db/mongoproxy/mongoplugin.go index 07a1e59..8346d2f 100644 --- a/common/db/mongoproxy/mongoplugin.go +++ b/common/db/mongoproxy/mongoplugin.go @@ -83,6 +83,14 @@ func FindMany(coll string, key string, val interface{}, schema interface{}) erro return r.All(context.TODO(), schema) } +func FindManyFilter(coll string, filter bson.D, opts *options.FindOptions, schema interface{}) error { + r, err := mongoDatabase.Collection(coll).Find(context.TODO(), filter, opts) + if err != nil { + return err + } + return r.All(context.TODO(), schema) +} + func DelOne(coll string, key string, value interface{}) error { filter := bson.D{{key, value}} _, err := mongoDatabase.Collection(coll).DeleteOne(context.TODO(), filter, nil) diff --git a/models/RoleLog.go b/models/RoleLog.go deleted file mode 100644 index dcbf2e5..0000000 --- a/models/RoleLog.go +++ /dev/null @@ -1,72 +0,0 @@ -package models - -import ( - "encoding/json" - "fmt" - "pro2d/common" - "pro2d/common/logger" - "sync/atomic" -) - -var LogType = map[string]string{ - "in_item": "common", - "out_item": "common", - "in_hero": "common", - "out_hero": "common", - "in_equip": "common", - "out_equip": "common", - - "role_action": "common", -} - -var commonRoleField = []string{ - "id", - "uid", - "name", - "device", - "level", -} - -func (m *RoleModel) MyLog(logType string, content map[string]interface{}) { - _, ok := LogType[logType] - if !ok { - logger.Error("LOG ERROR: new logType [%s] need Add Maping.", logType) - return - } - - doc := make(map[string]interface{}) - for _, field := range commonRoleField { - if content[field] != nil { - logger.Error("LOG ERROR: logType [%s] had field [%s] overwrite default.", logType, field) - } - - v := m.GetProperty(field) - if v != nil { - doc[field] = v - } - } - content["ucode"] = m.GetActionUnicode() - for field, value := range content { - doc[field] = value - } - doc["@type"] = logType - j, err := json.Marshal(doc) - if err != nil { - logger.Error("LOG ERROR: logType [%s] json.Marshal", logType) - return - } - logger.Debug(j) -} - -func (m *RoleModel) StartActionUnicode() { - uniqueCount := atomic.AddInt64(&m.uniqueCount, 1) - m.actionUcode = fmt.Sprintf("%s-%d-%d", m.Data.Id, common.Timex(), uniqueCount) -} - -func (m *RoleModel) EndActionUnicode() { - m.actionUcode = "" -} - -func (m *RoleModel) GetActionUnicode() string { - return m.actionUcode -} diff --git a/models/dbseed.go b/models/dbseed.go index 221ef62..fcb6872 100644 --- a/models/dbseed.go +++ b/models/dbseed.go @@ -46,12 +46,12 @@ func GameModels() STOIncrement { &pb.Role{}: common.MaxCommNum, &pb.Equipment{}: 0, &pb.Hero{}: 0, - &pb.Prop{}: 0, &pb.Team{}: 0, + &pb.Email{}: common.MaxEmailNum, } } -//初始化表自增id +// InitAutoIncreUidTable 初始化表自增id func (d *DBSeed) InitAutoIncreUidTable(schema STOIncrement) { for s, b := range schema { if b <= 0 { diff --git a/models/email.go b/models/email.go new file mode 100644 index 0000000..03fdbba --- /dev/null +++ b/models/email.go @@ -0,0 +1,59 @@ +package models + +import ( + "pro2d/common" + "pro2d/common/components" + "pro2d/pb" +) + +const EMAIL_LIMIT = 50 + +type EmailModel struct { + components.ISchema + Data *pb.Email +} + +func NewEmailModel(id string) *EmailModel { + data := &pb.Email{Id: id} + m := &EmailModel{ + ISchema: NewSchema(data.Id, data), + Data: data, + } + return m +} + +func NewEmailModelPB(email *pb.Email) *EmailModel { + m := &EmailModel{ + ISchema: NewSchema(email.Id, email), + Data: email, + } + return m +} + +func InsertEmail(email *pb.Email) bool { + data := &EmailModel{ + ISchema: NewSchema(email.Id, email), + Data: email, + } + + data.SetProperty("createtime", common.Timex()) + err := data.Create() + if err != nil { + return false + } + return true +} + +func (m *EmailModel) Log(role *RoleModel, action int32) { + //{desc = "onMail", int1 = self:getProperty("id"), int2 = self:getProperty("status"), cint1 = self:getProperty("emailId"), + // short1 = action, key1=self:getProperty("title"), key2=self:getProperty("attachments")}) + role.MyLog("mail_action", &pb.LogConf{ + Desc: "onMail", + //Int1: email.Data.Id, + Int2: string(m.Data.Status), + //Cint1: + Short1: action, + Key1: m.Data.Title, + Key2: m.Data.Attachments, + }) +} diff --git a/models/prop.go b/models/prop.go deleted file mode 100644 index 47eaac0..0000000 --- a/models/prop.go +++ /dev/null @@ -1,23 +0,0 @@ -package models - -import ( - "pro2d/common/components" - "pro2d/pb" -) - -type PropModel struct { - components.ISchema - Data *pb.Prop -} - -func NewProp(id string) *PropModel { - data := &pb.Prop{ - Id: id, - } - m := &PropModel{ - ISchema: NewSchema(id, data), - Data: data, - } - - return m -} diff --git a/models/role.go b/models/role.go index 0535b8a..f0da807 100644 --- a/models/role.go +++ b/models/role.go @@ -17,7 +17,6 @@ type RoleModel struct { Heros SchemaMap Teams SchemaMap Equipments SchemaMap - Prop *PropModel Items common.IMapStringNum //背包 lastSaveTs int64 @@ -40,7 +39,6 @@ func RoleExistByUid(uid string) *RoleModel { Heros: make(SchemaMap), Teams: make(SchemaMap), Equipments: make(SchemaMap), - Prop: new(PropModel), Items: make(common.IMapStringNum), } r.Load() @@ -56,7 +54,6 @@ func NewRole(id string) *RoleModel { Heros: make(SchemaMap), Teams: make(SchemaMap), Equipments: make(SchemaMap), - Prop: new(PropModel), Items: make(common.IMapStringNum), } return m @@ -166,7 +163,7 @@ func (m *RoleModel) LoadTeams() { } } -//加载背包数据到内存 +// LoadItems 加载背包数据到内存 func (m *RoleModel) LoadItems() { m.Items = common.StringToMapNum(m.Data.Items) } diff --git a/models/roleLog.go b/models/roleLog.go new file mode 100644 index 0000000..b08d449 --- /dev/null +++ b/models/roleLog.go @@ -0,0 +1,58 @@ +package models + +import ( + "encoding/json" + "fmt" + "pro2d/common" + "pro2d/common/logger" + "pro2d/pb" + "sync/atomic" +) + +var LogType = map[string]string{ + "in_item": "common", + "out_item": "common", + "in_hero": "common", + "out_hero": "common", + "in_equip": "common", + "out_equip": "common", + + "mail_action": "common", + "role_action": "common", +} + +func (m *RoleModel) MyLog(logType string, content *pb.LogConf) { + _, ok := LogType[logType] + if !ok { + logger.Error("LOG ERROR: new logType [%s] need Add Maping.", logType) + return + } + + content.Id = m.Data.Id + content.Uid = m.Data.Uid + content.Name = m.Data.Nick + content.Device = m.Data.Device + content.Level = m.Data.Level + content.Ucode = m.GetActionUnicode() + + content.Typ = logType + j, err := json.Marshal(content) + if err != nil { + logger.Error("LOG ERROR: logType [%s] json.Marshal", logType) + return + } + logger.Debug(j) +} + +func (m *RoleModel) StartActionUnicode() { + uniqueCount := atomic.AddInt64(&m.uniqueCount, 1) + m.actionUcode = fmt.Sprintf("%s-%d-%d", m.Data.Id, common.Timex(), uniqueCount) +} + +func (m *RoleModel) EndActionUnicode() { + m.actionUcode = "" +} + +func (m *RoleModel) GetActionUnicode() string { + return m.actionUcode +} diff --git a/models/rolePlugin.go b/models/rolePlugin.go index 291fd17..8c6defd 100644 --- a/models/rolePlugin.go +++ b/models/rolePlugin.go @@ -3,7 +3,10 @@ package models import ( "fmt" "github.com/golang/protobuf/proto" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo/options" "pro2d/common" + "pro2d/common/db/mongoproxy" "pro2d/common/logger" "pro2d/csvdata" "pro2d/pb" @@ -256,3 +259,56 @@ func (m *RoleModel) EquipmentRefer(equipId, heroId string, refer bool, pos int32 } return 0 } + +func (m *RoleModel) DelExpireEmail() error { + filter := bson.D{{"roleid", m.Data.Id}} + sort := bson.D{ + {"createtime", -1}, + } + + var limit int64 = 10000 + var skip int64 = EMAIL_LIMIT + //查询条件 + opts := &options.FindOptions{ + Sort: sort, + Limit: &limit, + Skip: &skip, + } + emails := make([]*pb.Email, EMAIL_LIMIT) + err := mongoproxy.FindManyFilter("email", filter, opts, &emails) + if err != nil { + return err + } + + var ids []string + for _, email := range emails { + ids = append(ids, email.Id) + } + filter = append(filter, bson.E{Key: "$in", Value: ids}) + err = mongoproxy.DelMany("email", filter) + if err != nil { + return err + } + + return nil +} + +func (m *RoleModel) LoadEmails() []*pb.Email { + //filter := bson.D{{"roleid", m.Data.Id}} + //sort := bson.D{ + // {"createtime", -1}, + //} + + //var limit int64 = EMAIL_LIMIT + ////查询条件 + //opts := &options.FindOptions{ + // Sort: sort, + // Limit: &limit, + //} + emails := make([]*pb.Email, EMAIL_LIMIT) + err := mongoproxy.FindMany("email", "roleid", m.Data.Id, &emails) + if err != nil { + return nil + } + return emails +} diff --git a/pb/game.pb.go b/pb/game.pb.go index 412e3c1..2759161 100644 --- a/pb/game.pb.go +++ b/pb/game.pb.go @@ -1094,6 +1094,325 @@ func (x *HeroUpLevelRsp) GetHero() *Hero { return nil } +type EmailListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EmailListReq) Reset() { + *x = EmailListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_game_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmailListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmailListReq) ProtoMessage() {} + +func (x *EmailListReq) ProtoReflect() protoreflect.Message { + mi := &file_game_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmailListReq.ProtoReflect.Descriptor instead. +func (*EmailListReq) Descriptor() ([]byte, []int) { + return file_game_proto_rawDescGZIP(), []int{20} +} + +type EmailListRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Emails []*Email `protobuf:"bytes,1,rep,name=emails,proto3" json:"emails,omitempty"` +} + +func (x *EmailListRsp) Reset() { + *x = EmailListRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_game_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmailListRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmailListRsp) ProtoMessage() {} + +func (x *EmailListRsp) ProtoReflect() protoreflect.Message { + mi := &file_game_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmailListRsp.ProtoReflect.Descriptor instead. +func (*EmailListRsp) Descriptor() ([]byte, []int) { + return file_game_proto_rawDescGZIP(), []int{21} +} + +func (x *EmailListRsp) GetEmails() []*Email { + if x != nil { + return x.Emails + } + return nil +} + +type EmailDrawReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *EmailDrawReq) Reset() { + *x = EmailDrawReq{} + if protoimpl.UnsafeEnabled { + mi := &file_game_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmailDrawReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmailDrawReq) ProtoMessage() {} + +func (x *EmailDrawReq) ProtoReflect() protoreflect.Message { + mi := &file_game_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmailDrawReq.ProtoReflect.Descriptor instead. +func (*EmailDrawReq) Descriptor() ([]byte, []int) { + return file_game_proto_rawDescGZIP(), []int{22} +} + +func (x *EmailDrawReq) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type EmailDrawRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` + Reward string `protobuf:"bytes,2,opt,name=reward,proto3" json:"reward,omitempty"` +} + +func (x *EmailDrawRsp) Reset() { + *x = EmailDrawRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_game_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmailDrawRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmailDrawRsp) ProtoMessage() {} + +func (x *EmailDrawRsp) ProtoReflect() protoreflect.Message { + mi := &file_game_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmailDrawRsp.ProtoReflect.Descriptor instead. +func (*EmailDrawRsp) Descriptor() ([]byte, []int) { + return file_game_proto_rawDescGZIP(), []int{23} +} + +func (x *EmailDrawRsp) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + +func (x *EmailDrawRsp) GetReward() string { + if x != nil { + return x.Reward + } + return "" +} + +type EmailCheckRar struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *EmailCheckRar) Reset() { + *x = EmailCheckRar{} + if protoimpl.UnsafeEnabled { + mi := &file_game_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmailCheckRar) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmailCheckRar) ProtoMessage() {} + +func (x *EmailCheckRar) ProtoReflect() protoreflect.Message { + mi := &file_game_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmailCheckRar.ProtoReflect.Descriptor instead. +func (*EmailCheckRar) Descriptor() ([]byte, []int) { + return file_game_proto_rawDescGZIP(), []int{24} +} + +func (x *EmailCheckRar) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type EmailDelReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EmailDelReq) Reset() { + *x = EmailDelReq{} + if protoimpl.UnsafeEnabled { + mi := &file_game_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmailDelReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmailDelReq) ProtoMessage() {} + +func (x *EmailDelReq) ProtoReflect() protoreflect.Message { + mi := &file_game_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmailDelReq.ProtoReflect.Descriptor instead. +func (*EmailDelReq) Descriptor() ([]byte, []int) { + return file_game_proto_rawDescGZIP(), []int{25} +} + +type EmailDelRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` +} + +func (x *EmailDelRsp) Reset() { + *x = EmailDelRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_game_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmailDelRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmailDelRsp) ProtoMessage() {} + +func (x *EmailDelRsp) ProtoReflect() protoreflect.Message { + mi := &file_game_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmailDelRsp.ProtoReflect.Descriptor instead. +func (*EmailDelRsp) Descriptor() ([]byte, []int) { + return file_game_proto_rawDescGZIP(), []int{26} +} + +func (x *EmailDelRsp) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + var File_game_proto protoreflect.FileDescriptor var file_game_proto_rawDesc = []byte{ @@ -1185,8 +1504,23 @@ var file_game_proto_rawDesc = []byte{ 0x65, 0x6d, 0x73, 0x22, 0x32, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x55, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x48, 0x65, 0x72, - 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, - 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x35, 0x0a, 0x0c, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x06, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, + 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x06, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x1e, + 0x0a, 0x0c, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x44, 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x38, + 0x0a, 0x0c, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x44, 0x72, 0x61, 0x77, 0x52, 0x73, 0x70, 0x12, 0x10, + 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, + 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x1f, 0x0a, 0x0d, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x0d, 0x0a, 0x0b, 0x45, 0x6d, 0x61, + 0x69, 0x6c, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x22, 0x1f, 0x0a, 0x0b, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x44, 0x65, 0x6c, 0x52, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, + 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1201,7 +1535,7 @@ func file_game_proto_rawDescGZIP() []byte { return file_game_proto_rawDescData } -var file_game_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_game_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_game_proto_goTypes = []interface{}{ (*HeartReq)(nil), // 0: game.HeartReq (*HeartRsp)(nil), // 1: game.HeartRsp @@ -1223,27 +1557,36 @@ var file_game_proto_goTypes = []interface{}{ (*EquipmentAddNty)(nil), // 17: game.EquipmentAddNty (*HeroUpLevelReq)(nil), // 18: game.HeroUpLevelReq (*HeroUpLevelRsp)(nil), // 19: game.HeroUpLevelRsp - (*Role)(nil), // 20: models.Role - (*Hero)(nil), // 21: models.Hero - (*Team)(nil), // 22: models.Team - (*Equipment)(nil), // 23: models.Equipment + (*EmailListReq)(nil), // 20: game.EmailListReq + (*EmailListRsp)(nil), // 21: game.EmailListRsp + (*EmailDrawReq)(nil), // 22: game.EmailDrawReq + (*EmailDrawRsp)(nil), // 23: game.EmailDrawRsp + (*EmailCheckRar)(nil), // 24: game.EmailCheckRar + (*EmailDelReq)(nil), // 25: game.EmailDelReq + (*EmailDelRsp)(nil), // 26: game.EmailDelRsp + (*Role)(nil), // 27: models.Role + (*Hero)(nil), // 28: models.Hero + (*Team)(nil), // 29: models.Team + (*Equipment)(nil), // 30: models.Equipment + (*Email)(nil), // 31: models.Email } var file_game_proto_depIdxs = []int32{ - 20, // 0: game.LoginRsp.role:type_name -> models.Role - 21, // 1: game.LoginRsp.hero:type_name -> models.Hero - 22, // 2: game.LoginRsp.team:type_name -> models.Team - 23, // 3: game.LoginRsp.equipments:type_name -> models.Equipment - 22, // 4: game.ChangeTeamRar.team:type_name -> models.Team + 27, // 0: game.LoginRsp.role:type_name -> models.Role + 28, // 1: game.LoginRsp.hero:type_name -> models.Hero + 29, // 2: game.LoginRsp.team:type_name -> models.Team + 30, // 3: game.LoginRsp.equipments:type_name -> models.Equipment + 29, // 4: game.ChangeTeamRar.team:type_name -> models.Team 7, // 5: game.HeroEquipReferRar.equipIds:type_name -> game.EquipInfo - 20, // 6: game.RoleUpdatePropertyNty.role:type_name -> models.Role - 21, // 7: game.RoleEndBattleRsp.hero:type_name -> models.Hero - 23, // 8: game.EquipmentAddNty.equip:type_name -> models.Equipment - 21, // 9: game.HeroUpLevelRsp.hero:type_name -> models.Hero - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 27, // 6: game.RoleUpdatePropertyNty.role:type_name -> models.Role + 28, // 7: game.RoleEndBattleRsp.hero:type_name -> models.Hero + 30, // 8: game.EquipmentAddNty.equip:type_name -> models.Equipment + 28, // 9: game.HeroUpLevelRsp.hero:type_name -> models.Hero + 31, // 10: game.EmailListRsp.emails:type_name -> models.Email + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_game_proto_init() } @@ -1493,6 +1836,90 @@ func file_game_proto_init() { return nil } } + file_game_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmailListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmailListRsp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmailDrawReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmailDrawRsp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmailCheckRar); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmailDelReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmailDelRsp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1500,7 +1927,7 @@ func file_game_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_game_proto_rawDesc, NumEnums: 0, - NumMessages: 20, + NumMessages: 27, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/models.pb.go b/pb/models.pb.go index 97df073..a2c40c6 100644 --- a/pb/models.pb.go +++ b/pb/models.pb.go @@ -25,8 +25,26 @@ type LogConf struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Typ string `protobuf:"bytes,1,opt,name=typ,proto3" json:"typ,omitempty"` - Ucode string `protobuf:"bytes,2,opt,name=ucode,proto3" json:"ucode,omitempty"` + Typ string `protobuf:"bytes,1,opt,name=typ,proto3" json:"typ,omitempty"` + Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"` + Ucode string `protobuf:"bytes,3,opt,name=ucode,proto3" json:"ucode,omitempty"` + Key1 string `protobuf:"bytes,4,opt,name=key1,proto3" json:"key1,omitempty"` + Key2 string `protobuf:"bytes,6,opt,name=key2,proto3" json:"key2,omitempty"` + Text string `protobuf:"bytes,7,opt,name=text,proto3" json:"text,omitempty"` + Short1 int32 `protobuf:"varint,8,opt,name=short1,proto3" json:"short1,omitempty"` + Int1 string `protobuf:"bytes,9,opt,name=int1,proto3" json:"int1,omitempty"` + Int2 string `protobuf:"bytes,10,opt,name=int2,proto3" json:"int2,omitempty"` + Long1 int64 `protobuf:"varint,11,opt,name=long1,proto3" json:"long1,omitempty"` + Float1 float32 `protobuf:"fixed32,12,opt,name=float1,proto3" json:"float1,omitempty"` + Cint1 int64 `protobuf:"varint,13,opt,name=cint1,proto3" json:"cint1,omitempty"` + Cint2 int64 `protobuf:"varint,14,opt,name=cint2,proto3" json:"cint2,omitempty"` + Cint3 int64 `protobuf:"varint,15,opt,name=cint3,proto3" json:"cint3,omitempty"` + // common role + Id string `protobuf:"bytes,20,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,21,opt,name=name,proto3" json:"name,omitempty"` + Uid string `protobuf:"bytes,22,opt,name=uid,proto3" json:"uid,omitempty"` + Level int32 `protobuf:"varint,23,opt,name=level,proto3" json:"level,omitempty"` + Device string `protobuf:"bytes,24,opt,name=device,proto3" json:"device,omitempty"` } func (x *LogConf) Reset() { @@ -68,6 +86,13 @@ func (x *LogConf) GetTyp() string { return "" } +func (x *LogConf) GetDesc() string { + if x != nil { + return x.Desc + } + return "" +} + func (x *LogConf) GetUcode() string { if x != nil { return x.Ucode @@ -75,6 +100,118 @@ func (x *LogConf) GetUcode() string { return "" } +func (x *LogConf) GetKey1() string { + if x != nil { + return x.Key1 + } + return "" +} + +func (x *LogConf) GetKey2() string { + if x != nil { + return x.Key2 + } + return "" +} + +func (x *LogConf) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +func (x *LogConf) GetShort1() int32 { + if x != nil { + return x.Short1 + } + return 0 +} + +func (x *LogConf) GetInt1() string { + if x != nil { + return x.Int1 + } + return "" +} + +func (x *LogConf) GetInt2() string { + if x != nil { + return x.Int2 + } + return "" +} + +func (x *LogConf) GetLong1() int64 { + if x != nil { + return x.Long1 + } + return 0 +} + +func (x *LogConf) GetFloat1() float32 { + if x != nil { + return x.Float1 + } + return 0 +} + +func (x *LogConf) GetCint1() int64 { + if x != nil { + return x.Cint1 + } + return 0 +} + +func (x *LogConf) GetCint2() int64 { + if x != nil { + return x.Cint2 + } + return 0 +} + +func (x *LogConf) GetCint3() int64 { + if x != nil { + return x.Cint3 + } + return 0 +} + +func (x *LogConf) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *LogConf) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *LogConf) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *LogConf) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *LogConf) GetDevice() string { + if x != nil { + return x.Device + } + return "" +} + type Account struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -391,17 +528,20 @@ func (x *Equipment) GetPos() int32 { return 0 } -type Prop struct { +type Team struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" index:"unique" pri:"1"` // @inject_tag: index:"unique" pri:"1" - Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" index:"unique" pri:"1"` // @inject_tag: index:"unique" pri:"1" + RoleId string `protobuf:"bytes,2,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` + HeroId1 string `protobuf:"bytes,3,opt,name=hero_id1,json=heroId1,proto3" json:"hero_id1,omitempty"` + HeroId2 string `protobuf:"bytes,4,opt,name=hero_id2,json=heroId2,proto3" json:"hero_id2,omitempty"` + HeroId3 string `protobuf:"bytes,5,opt,name=hero_id3,json=heroId3,proto3" json:"hero_id3,omitempty"` } -func (x *Prop) Reset() { - *x = Prop{} +func (x *Team) Reset() { + *x = Team{} if protoimpl.UnsafeEnabled { mi := &file_models_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -409,13 +549,13 @@ func (x *Prop) Reset() { } } -func (x *Prop) String() string { +func (x *Team) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Prop) ProtoMessage() {} +func (*Team) ProtoMessage() {} -func (x *Prop) ProtoReflect() protoreflect.Message { +func (x *Team) ProtoReflect() protoreflect.Message { mi := &file_models_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -427,39 +567,63 @@ func (x *Prop) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Prop.ProtoReflect.Descriptor instead. -func (*Prop) Descriptor() ([]byte, []int) { +// Deprecated: Use Team.ProtoReflect.Descriptor instead. +func (*Team) Descriptor() ([]byte, []int) { return file_models_proto_rawDescGZIP(), []int{5} } -func (x *Prop) GetId() string { +func (x *Team) GetId() string { if x != nil { return x.Id } return "" } -func (x *Prop) GetCount() int64 { +func (x *Team) GetRoleId() string { + if x != nil { + return x.RoleId + } + return "" +} + +func (x *Team) GetHeroId1() string { if x != nil { - return x.Count + return x.HeroId1 } - return 0 + return "" } -type Team struct { +func (x *Team) GetHeroId2() string { + if x != nil { + return x.HeroId2 + } + return "" +} + +func (x *Team) GetHeroId3() string { + if x != nil { + return x.HeroId3 + } + return "" +} + +type Email struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" index:"unique" pri:"1"` // @inject_tag: index:"unique" pri:"1" - RoleId string `protobuf:"bytes,2,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - HeroId1 string `protobuf:"bytes,3,opt,name=hero_id1,json=heroId1,proto3" json:"hero_id1,omitempty"` - HeroId2 string `protobuf:"bytes,4,opt,name=hero_id2,json=heroId2,proto3" json:"hero_id2,omitempty"` - HeroId3 string `protobuf:"bytes,5,opt,name=hero_id3,json=heroId3,proto3" json:"hero_id3,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" index:"unique" pri:"1"` // @inject_tag: index:"unique" pri:"1" + RoleId string `protobuf:"bytes,2,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` + Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` // 标题 + Stitle string `protobuf:"bytes,4,opt,name=stitle,proto3" json:"stitle,omitempty"` // 小标题 + Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` // 邮件正文 + Attachments string `protobuf:"bytes,6,opt,name=attachments,proto3" json:"attachments,omitempty"` // 邮件附件 + Status int32 `protobuf:"varint,7,opt,name=status,proto3" json:"status,omitempty"` // 邮件状态: 0未读, 1已读,2 已领取 + CreateTime int64 `protobuf:"varint,8,opt,name=createTime,proto3" json:"createTime,omitempty"` } -func (x *Team) Reset() { - *x = Team{} +func (x *Email) Reset() { + *x = Email{} if protoimpl.UnsafeEnabled { mi := &file_models_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -467,13 +631,13 @@ func (x *Team) Reset() { } } -func (x *Team) String() string { +func (x *Email) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Team) ProtoMessage() {} +func (*Email) ProtoMessage() {} -func (x *Team) ProtoReflect() protoreflect.Message { +func (x *Email) ProtoReflect() protoreflect.Message { mi := &file_models_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -485,46 +649,67 @@ func (x *Team) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Team.ProtoReflect.Descriptor instead. -func (*Team) Descriptor() ([]byte, []int) { +// Deprecated: Use Email.ProtoReflect.Descriptor instead. +func (*Email) Descriptor() ([]byte, []int) { return file_models_proto_rawDescGZIP(), []int{6} } -func (x *Team) GetId() string { +func (x *Email) GetId() string { if x != nil { return x.Id } return "" } -func (x *Team) GetRoleId() string { +func (x *Email) GetRoleId() string { if x != nil { return x.RoleId } return "" } -func (x *Team) GetHeroId1() string { +func (x *Email) GetTitle() string { if x != nil { - return x.HeroId1 + return x.Title } return "" } -func (x *Team) GetHeroId2() string { +func (x *Email) GetStitle() string { if x != nil { - return x.HeroId2 + return x.Stitle } return "" } -func (x *Team) GetHeroId3() string { +func (x *Email) GetContent() string { if x != nil { - return x.HeroId3 + return x.Content + } + return "" +} + +func (x *Email) GetAttachments() string { + if x != nil { + return x.Attachments } return "" } +func (x *Email) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *Email) GetCreateTime() int64 { + if x != nil { + return x.CreateTime + } + return 0 +} + type Increment struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -775,99 +960,132 @@ var File_models_proto protoreflect.FileDescriptor var file_models_proto_rawDesc = []byte{ 0x0a, 0x0c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x22, 0x31, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, - 0x66, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x79, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x74, 0x79, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x75, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x4d, 0x0a, 0x07, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x32, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xc9, 0x01, 0x0a, - 0x04, 0x48, 0x65, 0x72, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x69, 0x6e, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x65, - 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x69, 0x6e, 0x5f, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x65, 0x69, - 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x71, 0x75, 0x69, - 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x22, 0xb3, 0x01, 0x0a, 0x09, 0x45, 0x71, 0x75, - 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, - 0x13, 0x0a, 0x05, 0x74, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, - 0x74, 0x62, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x5f, - 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x6e, 0x68, - 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x65, 0x72, - 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, - 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x70, 0x6f, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x22, 0x2c, - 0x0a, 0x04, 0x50, 0x72, 0x6f, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x80, 0x01, 0x0a, - 0x04, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x19, - 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x31, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x31, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x65, 0x72, - 0x6f, 0x5f, 0x69, 0x64, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, - 0x6f, 0x49, 0x64, 0x32, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x33, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x33, 0x22, - 0x2f, 0x0a, 0x09, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x76, 0x61, 0x6c, - 0x22, 0x99, 0x05, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 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, 0x16, 0x0a, 0x06, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x69, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x69, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x10, 0x0a, - 0x03, 0x65, 0x78, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, - 0x0e, 0x0a, 0x02, 0x68, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x68, 0x70, 0x12, - 0x15, 0x0a, 0x06, 0x68, 0x70, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x68, 0x70, 0x4d, 0x61, 0x78, 0x12, 0x13, 0x0a, 0x05, 0x62, 0x75, 0x79, 0x5f, 0x72, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x75, 0x79, 0x52, 0x12, 0x13, 0x0a, 0x05, 0x70, - 0x61, 0x79, 0x5f, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x79, 0x52, - 0x12, 0x10, 0x0a, 0x03, 0x64, 0x65, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x64, - 0x65, 0x6c, 0x12, 0x30, 0x0a, 0x06, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, - 0x2e, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6c, - 0x6f, 0x74, 0x68, 0x65, 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x0c, 0x63, 0x6c, 0x6f, 0x74, 0x68, 0x65, 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x22, - 0x0a, 0x0c, 0x77, 0x65, 0x61, 0x70, 0x6f, 0x6e, 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x11, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x77, 0x65, 0x61, 0x70, 0x6f, 0x6e, 0x73, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x18, 0x12, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6a, 0x65, 0x77, 0x65, 0x6c, 0x72, 0x79, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6a, 0x65, 0x77, 0x65, 0x6c, 0x72, - 0x79, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, - 0x61, 0x6c, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x6d, - 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x42, 0x0a, 0x0c, - 0x70, 0x61, 0x73, 0x73, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x18, 0x15, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, - 0x2e, 0x50, 0x61, 0x73, 0x73, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x0c, 0x70, 0x61, 0x73, 0x73, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, - 0x1a, 0x39, 0x0a, 0x0b, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x50, - 0x61, 0x73, 0x73, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0a, 0x5a, 0x08, - 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x22, 0x95, 0x03, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x43, 0x6f, + 0x6e, 0x66, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x79, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x74, 0x79, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, + 0x79, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x32, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6b, 0x65, 0x79, 0x32, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, + 0x6f, 0x72, 0x74, 0x31, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x68, 0x6f, 0x72, + 0x74, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x74, 0x31, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x69, 0x6e, 0x74, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x74, 0x32, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x74, 0x32, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, + 0x6e, 0x67, 0x31, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x6f, 0x6e, 0x67, 0x31, + 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x31, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x02, + 0x52, 0x06, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x31, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x69, 0x6e, 0x74, + 0x31, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x69, 0x6e, 0x74, 0x31, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x69, 0x6e, 0x74, 0x32, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, + 0x69, 0x6e, 0x74, 0x32, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x69, 0x6e, 0x74, 0x33, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x69, 0x6e, 0x74, 0x33, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x17, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x4d, + 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, + 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x32, 0x0a, + 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x22, 0xc9, 0x01, 0x0a, 0x04, 0x48, 0x65, 0x72, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, + 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, + 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1d, 0x0a, + 0x0a, 0x72, 0x65, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x09, 0x72, 0x65, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x72, 0x65, 0x69, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x09, 0x72, 0x65, 0x69, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x65, + 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x65, + 0x78, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x22, 0xb3, 0x01, + 0x0a, 0x09, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, + 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, + 0x6c, 0x65, 0x49, 0x64, 0x12, 0x13, 0x0a, 0x05, 0x74, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x62, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x68, + 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0c, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, + 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, + 0x70, 0x6f, 0x73, 0x22, 0x80, 0x01, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, + 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, + 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, + 0x31, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x31, + 0x12, 0x19, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x32, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x32, 0x12, 0x19, 0x0a, 0x08, 0x68, + 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x33, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, + 0x65, 0x72, 0x6f, 0x49, 0x64, 0x33, 0x22, 0xd2, 0x01, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x2f, 0x0a, 0x09, 0x49, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x99, 0x05, 0x0a, + 0x04, 0x52, 0x6f, 0x6c, 0x65, 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, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x69, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x69, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x68, + 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x68, 0x70, 0x12, 0x15, 0x0a, 0x06, 0x68, + 0x70, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x68, 0x70, 0x4d, + 0x61, 0x78, 0x12, 0x13, 0x0a, 0x05, 0x62, 0x75, 0x79, 0x5f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x62, 0x75, 0x79, 0x52, 0x12, 0x13, 0x0a, 0x05, 0x70, 0x61, 0x79, 0x5f, 0x72, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x79, 0x52, 0x12, 0x10, 0x0a, 0x03, + 0x64, 0x65, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x64, 0x65, 0x6c, 0x12, 0x30, + 0x0a, 0x06, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x63, + 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6c, 0x6f, 0x74, 0x68, 0x65, + 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x63, 0x6c, + 0x6f, 0x74, 0x68, 0x65, 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x65, + 0x61, 0x70, 0x6f, 0x6e, 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0c, 0x77, 0x65, 0x61, 0x70, 0x6f, 0x6e, 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1e, + 0x0a, 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x22, + 0x0a, 0x0c, 0x6a, 0x65, 0x77, 0x65, 0x6c, 0x72, 0x79, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x13, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6a, 0x65, 0x77, 0x65, 0x6c, 0x72, 0x79, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x6d, 0x61, 0x74, 0x65, 0x72, + 0x69, 0x61, 0x6c, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x42, 0x0a, 0x0c, 0x70, 0x61, 0x73, 0x73, + 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x2e, 0x50, 0x61, 0x73, + 0x73, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, + 0x70, 0x61, 0x73, 0x73, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x39, 0x0a, 0x0b, + 0x49, 0x6e, 0x63, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x50, 0x61, 0x73, 0x73, 0x63, + 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, + 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -889,8 +1107,8 @@ var file_models_proto_goTypes = []interface{}{ (*Config)(nil), // 2: models.Config (*Hero)(nil), // 3: models.Hero (*Equipment)(nil), // 4: models.Equipment - (*Prop)(nil), // 5: models.Prop - (*Team)(nil), // 6: models.Team + (*Team)(nil), // 5: models.Team + (*Email)(nil), // 6: models.Email (*Increment)(nil), // 7: models.Increment (*Role)(nil), // 8: models.Role nil, // 9: models.Role.IncresEntry @@ -973,7 +1191,7 @@ func file_models_proto_init() { } } file_models_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Prop); i { + switch v := v.(*Team); i { case 0: return &v.state case 1: @@ -985,7 +1203,7 @@ func file_models_proto_init() { } } file_models_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Team); i { + switch v := v.(*Email); i { case 0: return &v.state case 1: diff --git a/pb/protocode.pb.go b/pb/protocode.pb.go index 0493189..36323d6 100644 --- a/pb/protocode.pb.go +++ b/pb/protocode.pb.go @@ -24,57 +24,69 @@ type ProtoCode int32 const ( ProtoCode_UNKNOWN ProtoCode = 0 - ProtoCode_HeartRpc ProtoCode = 1 - ProtoCode_LoginRpc ProtoCode = 2 - ProtoCode_RoleStartBattleRpc ProtoCode = 3 - ProtoCode_RoleEndBattleRpc ProtoCode = 4 - ProtoCode_HeroUpLevelRpc ProtoCode = 5 - ProtoCode_CreateRpc ProtoCode = 6 - ProtoCode_ChangeTeamRpc ProtoCode = 7 - ProtoCode_HeroEquipReferRpc ProtoCode = 8 - ProtoCode_RoleClearItemsRpc ProtoCode = 9 - ProtoCode_EquipmentDelRpc ProtoCode = 10 - ProtoCode_DisConnectNty ProtoCode = 11 - ProtoCode_RoleUpdatePropertyNty ProtoCode = 12 - ProtoCode_RoleUpdateItemsNty ProtoCode = 13 - ProtoCode_EquipmentAddNty ProtoCode = 14 + ProtoCode_HeartRpc ProtoCode = 501 + ProtoCode_LoginRpc ProtoCode = 502 + ProtoCode_CreateRpc ProtoCode = 503 + ProtoCode_ChangeTeamRpc ProtoCode = 504 + ProtoCode_HeroEquipReferRpc ProtoCode = 505 + ProtoCode_RoleClearItemsRpc ProtoCode = 506 + ProtoCode_RoleStartBattleRpc ProtoCode = 507 + ProtoCode_RoleEndBattleRpc ProtoCode = 508 + ProtoCode_EquipmentDelRpc ProtoCode = 509 + ProtoCode_HeroUpLevelRpc ProtoCode = 510 + ProtoCode_EmailListRpc ProtoCode = 511 + ProtoCode_EmailDrawRpc ProtoCode = 512 + ProtoCode_EmailCheckRpc ProtoCode = 513 + ProtoCode_EmailDelRpc ProtoCode = 514 + ProtoCode_DisConnectNty ProtoCode = 1001 + ProtoCode_RoleUpdatePropertyNty ProtoCode = 1002 + ProtoCode_RoleUpdateItemsNty ProtoCode = 1003 + ProtoCode_EquipmentAddNty ProtoCode = 1004 ) // Enum value maps for ProtoCode. var ( ProtoCode_name = map[int32]string{ - 0: "UNKNOWN", - 1: "HeartRpc", - 2: "LoginRpc", - 3: "RoleStartBattleRpc", - 4: "RoleEndBattleRpc", - 5: "HeroUpLevelRpc", - 6: "CreateRpc", - 7: "ChangeTeamRpc", - 8: "HeroEquipReferRpc", - 9: "RoleClearItemsRpc", - 10: "EquipmentDelRpc", - 11: "DisConnectNty", - 12: "RoleUpdatePropertyNty", - 13: "RoleUpdateItemsNty", - 14: "EquipmentAddNty", + 0: "UNKNOWN", + 501: "HeartRpc", + 502: "LoginRpc", + 503: "CreateRpc", + 504: "ChangeTeamRpc", + 505: "HeroEquipReferRpc", + 506: "RoleClearItemsRpc", + 507: "RoleStartBattleRpc", + 508: "RoleEndBattleRpc", + 509: "EquipmentDelRpc", + 510: "HeroUpLevelRpc", + 511: "EmailListRpc", + 512: "EmailDrawRpc", + 513: "EmailCheckRpc", + 514: "EmailDelRpc", + 1001: "DisConnectNty", + 1002: "RoleUpdatePropertyNty", + 1003: "RoleUpdateItemsNty", + 1004: "EquipmentAddNty", } ProtoCode_value = map[string]int32{ "UNKNOWN": 0, - "HeartRpc": 1, - "LoginRpc": 2, - "RoleStartBattleRpc": 3, - "RoleEndBattleRpc": 4, - "HeroUpLevelRpc": 5, - "CreateRpc": 6, - "ChangeTeamRpc": 7, - "HeroEquipReferRpc": 8, - "RoleClearItemsRpc": 9, - "EquipmentDelRpc": 10, - "DisConnectNty": 11, - "RoleUpdatePropertyNty": 12, - "RoleUpdateItemsNty": 13, - "EquipmentAddNty": 14, + "HeartRpc": 501, + "LoginRpc": 502, + "CreateRpc": 503, + "ChangeTeamRpc": 504, + "HeroEquipReferRpc": 505, + "RoleClearItemsRpc": 506, + "RoleStartBattleRpc": 507, + "RoleEndBattleRpc": 508, + "EquipmentDelRpc": 509, + "HeroUpLevelRpc": 510, + "EmailListRpc": 511, + "EmailDrawRpc": 512, + "EmailCheckRpc": 513, + "EmailDelRpc": 514, + "DisConnectNty": 1001, + "RoleUpdatePropertyNty": 1002, + "RoleUpdateItemsNty": 1003, + "EquipmentAddNty": 1004, } ) @@ -109,28 +121,34 @@ var File_protocode_proto protoreflect.FileDescriptor var file_protocode_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x64, 0x65, 0x2a, 0xb6, 0x02, 0x0a, + 0x6f, 0x12, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x64, 0x65, 0x2a, 0x90, 0x03, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x48, 0x65, 0x61, 0x72, 0x74, - 0x52, 0x70, 0x63, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x70, - 0x63, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x70, 0x63, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x52, - 0x6f, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x70, 0x63, 0x10, - 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x55, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x52, 0x70, 0x63, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x70, 0x63, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x65, - 0x61, 0x6d, 0x52, 0x70, 0x63, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, 0x45, - 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x66, 0x65, 0x72, 0x52, 0x70, 0x63, 0x10, 0x08, 0x12, 0x15, - 0x0a, 0x11, 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x73, - 0x52, 0x70, 0x63, 0x10, 0x09, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, - 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x52, 0x70, 0x63, 0x10, 0x0a, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x69, - 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4e, 0x74, 0x79, 0x10, 0x0b, 0x12, 0x19, 0x0a, - 0x15, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x79, 0x4e, 0x74, 0x79, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x74, 0x79, 0x10, 0x0d, - 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, - 0x4e, 0x74, 0x79, 0x10, 0x0e, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x08, 0x48, 0x65, 0x61, 0x72, 0x74, + 0x52, 0x70, 0x63, 0x10, 0xf5, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, + 0x70, 0x63, 0x10, 0xf6, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x70, 0x63, 0x10, 0xf7, 0x03, 0x12, 0x12, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, + 0x65, 0x61, 0x6d, 0x52, 0x70, 0x63, 0x10, 0xf8, 0x03, 0x12, 0x16, 0x0a, 0x11, 0x48, 0x65, 0x72, + 0x6f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x66, 0x65, 0x72, 0x52, 0x70, 0x63, 0x10, 0xf9, + 0x03, 0x12, 0x16, 0x0a, 0x11, 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x49, 0x74, + 0x65, 0x6d, 0x73, 0x52, 0x70, 0x63, 0x10, 0xfa, 0x03, 0x12, 0x17, 0x0a, 0x12, 0x52, 0x6f, 0x6c, + 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x70, 0x63, 0x10, + 0xfb, 0x03, 0x12, 0x15, 0x0a, 0x10, 0x52, 0x6f, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x61, 0x74, + 0x74, 0x6c, 0x65, 0x52, 0x70, 0x63, 0x10, 0xfc, 0x03, 0x12, 0x14, 0x0a, 0x0f, 0x45, 0x71, 0x75, + 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x52, 0x70, 0x63, 0x10, 0xfd, 0x03, 0x12, + 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x55, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x70, + 0x63, 0x10, 0xfe, 0x03, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x70, 0x63, 0x10, 0xff, 0x03, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x44, 0x72, 0x61, 0x77, 0x52, 0x70, 0x63, 0x10, 0x80, 0x04, 0x12, 0x12, 0x0a, 0x0d, 0x45, 0x6d, + 0x61, 0x69, 0x6c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x70, 0x63, 0x10, 0x81, 0x04, 0x12, 0x10, + 0x0a, 0x0b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x44, 0x65, 0x6c, 0x52, 0x70, 0x63, 0x10, 0x82, 0x04, + 0x12, 0x12, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4e, 0x74, + 0x79, 0x10, 0xe9, 0x07, 0x12, 0x1a, 0x0a, 0x15, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4e, 0x74, 0x79, 0x10, 0xea, 0x07, + 0x12, 0x17, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x74, + 0x65, 0x6d, 0x73, 0x4e, 0x74, 0x79, 0x10, 0xeb, 0x07, 0x12, 0x14, 0x0a, 0x0f, 0x45, 0x71, 0x75, + 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x4e, 0x74, 0x79, 0x10, 0xec, 0x07, 0x42, + 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/protos b/protos index 4a5d0bd..cfe0c1d 160000 --- a/protos +++ b/protos @@ -1 +1 @@ -Subproject commit 4a5d0bdfde97673ee5ce6a6e9084eac7c7b88583 +Subproject commit cfe0c1d6fd5d7bcd6b0d5543359fcf2117db4dc2 diff --git a/tools/generator.py b/tools/generator.py index 68eb508..590e048 100644 --- a/tools/generator.py +++ b/tools/generator.py @@ -24,8 +24,10 @@ GoProtoCodeTestRspLine = "\tam[uint32(pb.ProtoCode_{}Rsp)] = {}Rsp\n" GoProtoCodeTestNtyLine = "\tam[uint32(pb.ProtoCode_{}Nty)] = {}Nty\n" def generatorProto(path): + RpcStartCode = 500 + NtyStartCode = 1000 + files = os.listdir(path) - code = 0 ProtoCodeData = "" GoCodeData = "" GoCodeTestData = "" @@ -42,7 +44,7 @@ def generatorProto(path): if firstline.find("proto3") == -1: continue - # req + # req + rar for line in lines: if line.find("message") == -1: continue @@ -52,34 +54,24 @@ def generatorProto(path): messageStr = sline[1].replace('\n', '').replace('{', "") n1 = messageStr.find('Req') + n2 = messageStr.find('Rar') loginReq = messageStr.find('LoginReq') if n1 != -1: - code += 1 - ProtoCodeData += ProtoCodeLineReq.format(messageStr[:n1], code) + RpcStartCode = RpcStartCode + 1 + ProtoCodeData += ProtoCodeLineReq.format(messageStr[:n1], RpcStartCode) if loginReq != -1: continue GoCodeData += GoProtoCodeLine.format(messageStr[:n1], messageStr[:n1]) GoCodeTestData += GoProtoCodeTestReqLine.format(messageStr[:n1], messageStr[:n1]) - # rar - for line in lines: - if line.find("message") == -1: - continue - sline = line.split(' ') - if len(sline) < 2: - continue - - messageStr = sline[1].replace('\n', '').replace('{', "") - n2 = messageStr.find('Rar') - loginReq = messageStr.find('LoginReq') - if n2 != -1: - code += 1 - ProtoCodeData += ProtoCodeLineReq.format(messageStr[:n2], code) + elif n2 != -1: + RpcStartCode = RpcStartCode + 1 + ProtoCodeData += ProtoCodeLineReq.format(messageStr[:n2], RpcStartCode) if loginReq != -1: continue GoCodeData += GoProtoCodeLine.format(messageStr[:n2], messageStr[:n2]) GoCodeTestData += GoProtoCodeTestReqLine.format(messageStr[:n2], messageStr[:n2]) - + ProtoCodeData += '\n' # nty for line in lines: if line.find("message") == -1: @@ -93,8 +85,8 @@ def generatorProto(path): loginReq = messageStr.find('LoginReq') if n3 != -1: - code += 1 - ProtoCodeData += ProtoCodeLineNty.format(messageStr[:n3], code) + NtyStartCode = NtyStartCode + 1 + ProtoCodeData += ProtoCodeLineNty.format(messageStr[:n3], NtyStartCode) if loginReq != -1: continue GoCodeTestData += GoProtoCodeTestNtyLine.format(messageStr[:n3], messageStr[:n3]) -- libgit2 0.21.2