diff --git a/cmd/robot/task.go b/cmd/robot/task.go index e6020d0c4..feb5b9f54 100644 --- a/cmd/robot/task.go +++ b/cmd/robot/task.go @@ -83,7 +83,7 @@ var ( HeroCfgId: 13001, }, rsp: &pb.TaskDoStrategyResp{}, - enabled: true, + // enabled: true, }, } ) diff --git a/cmd/robot/user.go b/cmd/robot/user.go index 852b83905..c79aa8e6a 100644 --- a/cmd/robot/user.go +++ b/cmd/robot/user.go @@ -4,6 +4,8 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/modules/user" "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" ) //申明测试接口及请求和响应参数 @@ -43,8 +45,52 @@ var user_builders = []*TestCase{ N: 1, }, }, - rsp: &pb.UserAddResResp{}, + rsp: &pb.UserAddResResp{}, // enabled: true, + }, { + desc: "获取配置", + mainType: string(comm.ModuleUser), + subType: user.UserSubTypeGetSetting, + req: &pb.UserGetSettingReq{}, + rsp: &pb.UserGetSettingResp{}, + // enabled: true, + }, { + desc: "更新配置", + mainType: string(comm.ModuleUser), + subType: user.UserSubTypeUpdatesetting, + req: &pb.UserUpdateSettingReq{ + Setting: &pb.DBUserSetting{ + Huazhi: 2, + Kangjuchi: 1, + Gaoguang: true, + }, + }, + rsp: &pb.UserUpdateSettingResp{}, + // enabled: true, + }, { + desc: "验证码", + mainType: string(comm.ModuleUser), + subType: user.UserSubTypeVeriCode, + req: &pb.UserVeriCodeReq{}, + rsp: &pb.UserVeriCodeResp{}, + enabled: true, + next: func(robot *Robot, rsp proto.Message) { + if r, ok := rsp.(*pb.UserVeriCodeResp); ok { + tcs := []*TestCase{} + tcs = append(tcs, &TestCase{ + desc: "初始化用户", + mainType: string(comm.ModuleUser), + subType: user.UserSubTypeInitData, + req: &pb.UserInitdataReq{ + Code: r.Code, + }, + rsp: &pb.UserInitdataResp{}, + enabled: true, + }) + robot.addBuilders(tcs) + } + + }, }, } diff --git a/comm/imodule.go b/comm/imodule.go index 09d4896c1..f3769da60 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -46,6 +46,8 @@ type ( UpdateEquipment(hero *pb.DBHero, equip []*pb.DB_Equipment) (code pb.ErrorCode) //获取玩家英雄列表 GetHeroList(uid string) []*pb.DBHero + // + CleanData(uid string) } //玩家 @@ -84,5 +86,7 @@ type ( ResetTask(uid string, taskTag TaskTag) //任务通知 SendToTask(uid string, taskType TaskType, param *pb.TaskParam) (code pb.ErrorCode) + // 清理玩家数据 + CleanData(uid string) } ) diff --git a/modules/hero/model_hero.go b/modules/hero/model_hero.go index 86424b06b..9531dddc6 100644 --- a/modules/hero/model_hero.go +++ b/modules/hero/model_hero.go @@ -241,15 +241,58 @@ func (this *ModelHero) getHeroList(uid string) []*pb.DBHero { return heroes } -//更新装备 -func (this *ModelHero) setEquipment(uid, heroId string, equipIds []string) error { - if len(equipIds) == 0 { +// 设置装备属性 +func (this *ModelHero) setEquipProperty(hero *pb.DBHero, equip []*pb.DB_Equipment) { + property := make(map[string]int32) //主属性 + addProperty := make(map[string]int32) //副属性 + for i, v := range equip { + if v == nil { + continue + } + hero.EquipID[i] = v.Id + //主属性 + property[v.MainEntry.AttrName] = v.MainEntry.Value + //附加属性 + for _, v := range v.AdverbEntry { + addProperty[v.AttrName] = v.Value + } + } + + this.mergeMainProperty(hero.Uid, hero.Uid, property) + this.mergeAddProperty(hero.Uid, hero.Uid, addProperty) +} + +//设置装备 +func (this *ModelHero) setEquipment(hero *pb.DBHero) (err error) { + if len(hero.EquipID) == 0 { return nil } - update := map[string]interface{}{ - "equipID": equipIds, + + update := make(map[string]interface{}) + if hero.IsOverlying { + if hero.SameCount-1 > 0 { + update["sameCount"] = hero.SameCount - 1 + } + update["isOverlying"] = false + if err = this.modifyHeroData(hero.Uid, hero.Id, update); err != nil { + this.moduleHero.Errorf("%v", err) + return + } + + //创建新卡 + newHero, err := this.createOneHero(hero.Uid, hero.HeroID) + if err != nil { + this.moduleHero.Errorf("%v", err) + return err + } + newHero.EquipID = hero.EquipID + hero = newHero + return this.modifyHeroData(newHero.Uid, newHero.Id, update) + } else { + update["equipID"] = hero.EquipID } - return this.moduleHero.modelHero.modifyHeroData(uid, heroId, update) + + return this.modifyHeroData(hero.Uid, hero.Id, update) } //合并属性即属性值累加 @@ -400,3 +443,12 @@ func (this *ModelHero) HeroStarUp(session comm.IUserSession, hero *pb.DBHero) (c } return } + +func (this *ModelHero) cleanData(uid string) { + userList := this.moduleHero.GetHeroList(uid) + for _, v := range userList { + if err := this.moduleHero.modelHero.DelListlds(uid, v.Id); err != nil { + this.moduleHero.Errorf("cleanData err:%v", err) + } + } +} diff --git a/modules/hero/module.go b/modules/hero/module.go index ea47442c1..2c3912acb 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -59,28 +59,16 @@ func (this *Hero) GetHero(uid, heroId string) (*pb.DBHero, pb.ErrorCode) { //佩戴装备 func (this *Hero) UpdateEquipment(hero *pb.DBHero, equip []*pb.DB_Equipment) (code pb.ErrorCode) { - equipIds := make([]string, 6) - property := make(map[string]int32) //主属性 - addProperty := make(map[string]int32) //副属性 - for i, v := range equip { - if v == nil { - continue - } - equipIds[i] = v.Id - //主属性 - property[v.MainEntry.AttrName] = v.MainEntry.Value - //附加属性 - for _, v := range v.AdverbEntry { - addProperty[v.AttrName] = v.Value - } + if hero == nil { + code = pb.ErrorCode_HeroNoExist + return } - this.modelHero.mergeMainProperty(hero.Uid, hero.Id, property) - this.modelHero.mergeAddProperty(hero.Uid, hero.Id, addProperty) - if err := this.modelHero.setEquipment(hero.Uid, hero.Id, equipIds); err != nil { + if err := this.modelHero.setEquipment(hero); err != nil { code = pb.ErrorCode_HeroEquipUpdate return } + this.modelHero.setEquipProperty(hero, equip) return } @@ -184,3 +172,8 @@ func (this *Hero) DelCard(udi string, cardid string, amount int32) (code pb.Erro } return } + +// 清空数据 +func (this *Hero) CleanData(uid string) { + this.modelHero.cleanData(uid) +} diff --git a/modules/task/model_active.go b/modules/task/model_active.go index b52abb95a..15ab67759 100644 --- a/modules/task/model_active.go +++ b/modules/task/model_active.go @@ -111,7 +111,7 @@ func (this *ModelTaskActive) receiveHandle(uid, id string, conf *cfg.Game_active func (this *ModelTaskActive) clearTask(uid string, taskTag comm.TaskTag) error { data := this.getUserActiveList(uid, taskTag) for _, v := range data { - if err := this.moduleTask.modelTask.DelListlds(swapKey(uid, taskTag), v.Id); err != nil { + if err := this.moduleTask.modelTaskActive.DelListlds(swapKey(uid, taskTag), v.Id); err != nil { log.Errorf("uid: %v taskTag:%v err:%v", uid, taskTag, err) return err } diff --git a/modules/task/module.go b/modules/task/module.go index 830b23033..bec550bb5 100644 --- a/modules/task/module.go +++ b/modules/task/module.go @@ -94,3 +94,13 @@ func (this *ModuleTask) CreateTaskForStrategy(uid string, heroCfgId int32) { // } + +func (this *ModuleTask) CleanData(uid string) { + this.modelTask.clearTask(uid, comm.TASK_DAILY) + this.modelTask.clearTask(uid, comm.TASK_WEEKLY) + this.modelTask.clearTask(uid, comm.TASK_ACHIEVE) + this.modelTask.clearTask(uid, comm.TASK_STRATEGY) + + this.modelTaskActive.clearTask(uid, comm.TASK_DAILY) + this.modelTaskActive.clearTask(uid, comm.TASK_WEEKLY) +} diff --git a/modules/user/api.go b/modules/user/api.go index 618e82436..a9fcd297b 100644 --- a/modules/user/api.go +++ b/modules/user/api.go @@ -9,10 +9,14 @@ import ( ) const ( - UserSubTypeLogin = "login" - UserSubTypeLogout = "logout" - UserSubTypeCreate = "create" - UserSubTypeAddRes = "addres" //添加用户资源 金币、宝石等 + UserSubTypeLogin = "login" + UserSubTypeLogout = "logout" + UserSubTypeCreate = "create" + UserSubTypeAddRes = "addres" //添加用户资源 金币、宝石等 + UserSubTypeGetSetting = "getsetting" //获取设置 + UserSubTypeUpdatesetting = "updatesetting" //更新设置 + UserSubTypeVeriCode = "vericode" //验证码 + UserSubTypeInitData = "initdata" //初始化用户 ) type apiComp struct { diff --git a/modules/user/api_create.go b/modules/user/api_create.go index 28c7b78e7..d06dbaf91 100644 --- a/modules/user/api_create.go +++ b/modules/user/api_create.go @@ -76,6 +76,9 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (c } } + //初始化用户设置 + this.module.modelSetting.InitSetting(session.GetUserId()) + //初始化任务 this.module.ModuleTask.InitTaskAll(self.Uid) return diff --git a/modules/user/api_getsetting.go b/modules/user/api_getsetting.go new file mode 100644 index 000000000..999eed784 --- /dev/null +++ b/modules/user/api_getsetting.go @@ -0,0 +1,27 @@ +package user + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" +) + +func (this *apiComp) GetsettingCheck(session comm.IUserSession, req *pb.UserGetSettingReq) (code pb.ErrorCode) { + return +} + +func (this *apiComp) Getsetting(session comm.IUserSession, req *pb.UserGetSettingReq) (code pb.ErrorCode, data proto.Message) { + if code = this.GetsettingCheck(session, req); code != pb.ErrorCode_Success { + return + } + + rsp := &pb.UserGetSettingResp{} + rsp.Setting = this.module.modelSetting.GetSetting(session.GetUserId()) + + err := session.SendMsg(string(this.module.GetType()), UserSubTypeGetSetting, rsp) + if err != nil { + code = pb.ErrorCode_SystemError + } + return +} diff --git a/modules/user/api_initdata.go b/modules/user/api_initdata.go new file mode 100644 index 000000000..8f6e8d57c --- /dev/null +++ b/modules/user/api_initdata.go @@ -0,0 +1,50 @@ +package user + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" +) + +//初始化账号数据 恢复到创角前 +func (this *apiComp) InitdataCheck(session comm.IUserSession, req *pb.UserInitdataReq) (code pb.ErrorCode) { + if req.Code == 0 { + code = pb.ErrorCode_ReqParameterError + } + return +} + +func (this *apiComp) Initdata(session comm.IUserSession, req *pb.UserInitdataReq) (code pb.ErrorCode, data proto.Message) { + if code = this.InitdataCheck(session, req); code != pb.ErrorCode_Success { + return + } + + rsp := &pb.UserInitdataResp{} + + defer func() { + if err := session.SendMsg(string(this.module.GetType()), UserSubTypeInitData, rsp); err != nil { + code = pb.ErrorCode_SystemError + return + } + }() + + if vc, ok := this.module.modelSetting.checkVeriCode(session.GetUserId()); ok { + if vc != req.Code { + code = pb.ErrorCode_VeriCodeNoValid + return + } else { + //验证码验证通过 + // TODO 检查该用户是否加入过工会 + // 清除玩家数据 + this.module.ModuleTask.CleanData(session.GetUserId()) //玩家任务 + this.module.ModuleHero.CleanData(session.GetUserId()) //英雄数据 + this.module.modelSetting.cleanData(session.GetUserId()) //用户设置 + + this.module.modelUser.delete(session.GetUserId()) //删除用户 + } + } else { + code = pb.ErrorCode_VeriCodeExpired + } + return +} diff --git a/modules/user/api_updatesetting.go b/modules/user/api_updatesetting.go new file mode 100644 index 000000000..5a68f3cc1 --- /dev/null +++ b/modules/user/api_updatesetting.go @@ -0,0 +1,38 @@ +package user + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + "go_dreamfactory/utils" + + "google.golang.org/protobuf/proto" +) + +func (this *apiComp) UpdatesettingCheck(session comm.IUserSession, req *pb.UserUpdateSettingReq) (code pb.ErrorCode) { + if req.Setting.Huazhi > 3 || req.Setting.Kangjuchi > 3 { + code = pb.ErrorCode_ReqParameterError + } + return +} + +func (this *apiComp) Updatesetting(session comm.IUserSession, req *pb.UserUpdateSettingReq) (code pb.ErrorCode, data proto.Message) { + if code = this.UpdatesettingCheck(session, req); code != pb.ErrorCode_Success { + return + } + + rsp := &pb.UserUpdateSettingResp{} + + req.Setting.Uid = session.GetUserId() + update := utils.StructToMap(req.Setting) + + if err := this.module.modelSetting.UpdateSetting(session.GetUserId(), update); err != nil { + code = pb.ErrorCode_DBError + return + } + + err := session.SendMsg(string(this.module.GetType()), UserSubTypeUpdatesetting, rsp) + if err != nil { + code = pb.ErrorCode_SystemError + } + return +} diff --git a/modules/user/api_vericode.go b/modules/user/api_vericode.go new file mode 100644 index 000000000..6f9c4b415 --- /dev/null +++ b/modules/user/api_vericode.go @@ -0,0 +1,27 @@ +package user + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" +) + +func (this *apiComp) VericodeCheck(session comm.IUserSession, req *pb.UserVeriCodeReq) (code pb.ErrorCode) { + return +} + +func (this *apiComp) Vericode(session comm.IUserSession, req *pb.UserVeriCodeReq) (code pb.ErrorCode, data proto.Message) { + if code = this.VericodeCheck(session, req); code != pb.ErrorCode_Success { + return + } + + rsp := &pb.UserVeriCodeResp{} + rsp.Code = this.module.modelSetting.refresh(session.GetUserId()) + + err := session.SendMsg(string(this.module.GetType()), UserSubTypeVeriCode, rsp) + if err != nil { + code = pb.ErrorCode_SystemError + } + return +} diff --git a/modules/user/model_setting.go b/modules/user/model_setting.go new file mode 100644 index 000000000..a1c0998b6 --- /dev/null +++ b/modules/user/model_setting.go @@ -0,0 +1,102 @@ +package user + +import ( + "fmt" + "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/redis" + "go_dreamfactory/modules" + "go_dreamfactory/pb" + "go_dreamfactory/utils" + "time" + + "github.com/spf13/cast" +) + +type ModelSetting struct { + modules.MCompModel + moduleUser *User +} + +func (this *ModelSetting) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + err = this.MCompModel.Init(service, module, comp, options) + this.moduleUser = module.(*User) + this.TableName = "setting" + return +} + +// 初始用户设置 +func (this *ModelSetting) InitSetting(uid string) { + setting := &pb.DBUserSetting{ + Uid: uid, + Huazhi: 0, + Kangjuchi: 2, + Gaoguang: false, + Wuli: false, + Guaji: true, + Fuben: true, + Huodong: true, + Tansuo: true, + Saiji: true, + Xuanshang: true, + } + if err := this.Add(uid, setting); err != nil { + this.moduleUser.Errorf("InitSetting err:%v", err) + } +} + +// 用户设置获取 +func (this *ModelSetting) GetSetting(uid string) *pb.DBUserSetting { + setting := &pb.DBUserSetting{} + if err := this.moduleUser.modelSetting.Get(uid, setting); err != nil { + return nil + } + return setting +} + +//更新设置 +func (this *ModelSetting) UpdateSetting(uid string, data map[string]interface{}) error { + if len(data) == 0 { + return nil + } + return this.moduleUser.modelSetting.Change(uid, data) +} + +//验证码 +func (this *ModelSetting) checkVeriCode(uid string) (int32, bool) { + key := fmt.Sprintf("code:%s", uid) + var code int32 + err := this.moduleUser.modelSetting.Redis.Get(key, &code) + if err != nil { + if err == redis.RedisNil { + return 0, false + } else { + this.moduleUser.Errorf("%v", err) + } + return 0, false + } + + return code, true +} + +// 刷新验证码 +func (this *ModelSetting) refresh(uid string) (code int32) { + var ok bool + key := fmt.Sprintf("code:%s", uid) + if code, ok = this.checkVeriCode(uid); ok { + return + } else { + code = cast.ToInt32(utils.GenValidateCode(6)) + if err := this.moduleUser.modelSetting.Redis.Set(key, code, time.Second*60); err != nil { + this.moduleUser.Errorf("%v", err) + return 0 + } + return + } +} + +// 清空设置 +func (this *ModelSetting) cleanData(uid string) { + if err := this.moduleUser.modelSetting.Del(uid); err != nil { + this.moduleUser.Errorf("cleanData err:%v", err) + } +} diff --git a/modules/user/model_user.go b/modules/user/model_user.go index 90f7422f3..c63099215 100644 --- a/modules/user/model_user.go +++ b/modules/user/model_user.go @@ -94,3 +94,10 @@ func (this *ModelUser) isLoginFirst(timestamp int64) bool { return false } + +//删除用户数据 +func (this *ModelUser) delete(uid string) { + if err := this.Del(uid); err != nil { + log.Errorf("%v", err) + } +} diff --git a/modules/user/module.go b/modules/user/module.go index 09aab48b7..e0a1de810 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -19,6 +19,7 @@ type User struct { api *apiComp modelUser *ModelUser modelSession *ModelSession + modelSetting *ModelSetting configure *modules.MCompConfigure } @@ -37,7 +38,7 @@ func (this *User) OnInstallComp() { this.api = this.RegisterComp(new(apiComp)).(*apiComp) this.modelUser = this.RegisterComp(new(ModelUser)).(*ModelUser) this.modelSession = this.RegisterComp(new(ModelSession)).(*ModelSession) - + this.modelSetting = this.RegisterComp(new(ModelSetting)).(*ModelSetting) } //获取用户数据 diff --git a/pb/errorcode.pb.go b/pb/errorcode.pb.go index c5f1b6a74..b5de6a3c4 100644 --- a/pb/errorcode.pb.go +++ b/pb/errorcode.pb.go @@ -50,6 +50,8 @@ const ( ErrorCode_DiamondNoEnough ErrorCode = 1004 // 钻石不足 ErrorCode_RoleCreated ErrorCode = 1005 //已创角 ErrorCode_NameExist ErrorCode = 1006 //昵称已存在 + ErrorCode_VeriCodeNoValid ErrorCode = 1007 //验证码无效 + ErrorCode_VeriCodeExpired ErrorCode = 1008 //验证码过期 // friend ErrorCode_FriendNotSelf ErrorCode = 1100 //不能是自己 ErrorCode_FriendSelfMax ErrorCode = 1101 //超出好友最大数量 @@ -138,6 +140,8 @@ var ( 1004: "DiamondNoEnough", 1005: "RoleCreated", 1006: "NameExist", + 1007: "VeriCodeNoValid", + 1008: "VeriCodeExpired", 1100: "FriendNotSelf", 1101: "FriendSelfMax", 1102: "FriendTargetMax", @@ -217,6 +221,8 @@ var ( "DiamondNoEnough": 1004, "RoleCreated": 1005, "NameExist": 1006, + "VeriCodeNoValid": 1007, + "VeriCodeExpired": 1008, "FriendNotSelf": 1100, "FriendSelfMax": 1101, "FriendTargetMax": 1102, @@ -302,7 +308,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, 0xc0, 0x0c, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x6f, 0x2a, 0xec, 0x0c, 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, @@ -334,76 +340,78 @@ var file_errorcode_proto_rawDesc = []byte{ 0x6d, 0x6f, 0x6e, 0x64, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xec, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x10, 0xed, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0xee, - 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, 0x13, 0x0a, 0x0e, 0x48, 0x65, - 0x72, 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x55, 0x70, 0x45, 0x72, 0x72, 0x10, 0x99, 0x0a, 0x12, - 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, - 0x74, 0x65, 0x10, 0x9a, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x52, - 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9b, 0x0a, 0x12, 0x18, 0x0a, 0x13, 0x48, 0x65, - 0x72, 0x6f, 0x4e, 0x6f, 0x74, 0x4e, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, - 0x65, 0x10, 0x9c, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e, - 0x65, 0x72, 0x67, 0x79, 0x10, 0x9d, 0x0a, 0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x10, 0x9e, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, - 0x45, 0x71, 0x75, 0x69, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x10, 0x9f, 0x0a, 0x12, 0x12, - 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x41, 0x77, 0x61, 0x6b, 0x65, 0x6e, 0x10, - 0xa0, 0x0a, 0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x73, 0x4c, 0x6f, 0x63, 0x6b, - 0x10, 0xa1, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x10, 0xa2, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x6f, - 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa3, 0x0a, 0x12, 0x10, 0x0a, 0x0b, - 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x45, 0x72, 0x72, 0x10, 0xa4, 0x0a, 0x12, 0x10, - 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa5, 0x0a, - 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x54, 0x79, 0x70, 0x65, 0x45, - 0x72, 0x72, 0x10, 0xa6, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x64, 0x64, - 0x4d, 0x61, 0x78, 0x45, 0x78, 0x70, 0x10, 0xa7, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, - 0x6f, 0x53, 0x74, 0x61, 0x72, 0x4c, 0x76, 0x45, 0x72, 0x72, 0x10, 0xa8, 0x0a, 0x12, 0x12, 0x0a, - 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x61, 0x72, 0x4c, 0x76, 0x10, 0xa9, - 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, 0x12, - 0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x69, - 0x6e, 0x64, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x10, 0xdc, 0x0b, 0x12, 0x15, 0x0a, 0x10, - 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x44, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, - 0x10, 0xdd, 0x0b, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x69, 0x74, 0x10, - 0xc0, 0x0c, 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x10, - 0xc1, 0x0c, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x10, 0xc2, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x64, 0x10, 0xc3, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc4, 0x0c, 0x12, 0x16, 0x0a, 0x11, 0x54, - 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x66, 0x6f, 0x75, 0x6e, 0x64, - 0x10, 0xc5, 0x0c, 0x12, 0x17, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x4e, 0x6f, 0x65, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xc6, 0x0c, 0x12, 0x13, 0x0a, 0x0e, - 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc7, - 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, - 0x64, 0x10, 0xc8, 0x0c, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x07, 0x12, 0x14, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x69, 0x43, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x10, 0xef, 0x07, 0x12, 0x14, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x69, 0x43, + 0x6f, 0x64, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x10, 0xf0, 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, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x6b, + 0x69, 0x6c, 0x6c, 0x55, 0x70, 0x45, 0x72, 0x72, 0x10, 0x99, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, + 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9a, + 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x6e, + 0x61, 0x74, 0x65, 0x10, 0x9b, 0x0a, 0x12, 0x18, 0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, + 0x74, 0x4e, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9c, 0x0a, + 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, + 0x10, 0x9d, 0x0a, 0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x10, 0x9e, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x71, 0x75, 0x69, + 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x10, 0x9f, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, + 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x41, 0x77, 0x61, 0x6b, 0x65, 0x6e, 0x10, 0xa0, 0x0a, 0x12, 0x0f, + 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x73, 0x4c, 0x6f, 0x63, 0x6b, 0x10, 0xa1, 0x0a, 0x12, + 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, + 0xa2, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa3, 0x0a, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, + 0x53, 0x74, 0x61, 0x72, 0x45, 0x72, 0x72, 0x10, 0xa4, 0x0a, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, + 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa5, 0x0a, 0x12, 0x13, 0x0a, 0x0e, + 0x48, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa6, + 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x4d, 0x61, 0x78, 0x45, + 0x78, 0x70, 0x10, 0xa7, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x61, + 0x72, 0x4c, 0x76, 0x45, 0x72, 0x72, 0x10, 0xa8, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, + 0x6f, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x61, 0x72, 0x4c, 0x76, 0x10, 0xa9, 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, 0x12, 0x1b, 0x0a, 0x16, 0x4d, + 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, + 0x61, 0x70, 0x74, 0x65, 0x72, 0x10, 0xdc, 0x0b, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6e, + 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x44, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xdd, 0x0b, 0x12, + 0x0d, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc0, 0x0c, 0x12, 0x0e, + 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x10, 0xc1, 0x0c, 0x12, 0x0f, + 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x10, 0xc2, 0x0c, 0x12, + 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, + 0xc3, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc4, 0x0c, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xc5, 0x0c, 0x12, + 0x17, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x65, + 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xc6, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, + 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc7, 0x0c, 0x12, 0x11, 0x0a, + 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc8, 0x0c, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/proto/errorcode.proto b/pb/proto/errorcode.proto index 763cea068..6f07c13d5 100644 --- a/pb/proto/errorcode.proto +++ b/pb/proto/errorcode.proto @@ -30,6 +30,8 @@ enum ErrorCode { DiamondNoEnough = 1004; // 钻石不足 RoleCreated = 1005; //已创角 NameExist = 1006; //昵称已存在 + VeriCodeNoValid = 1007; //验证码无效 + VeriCodeExpired = 1008; //验证码过期 // friend FriendNotSelf = 1100; //不能是自己 diff --git a/pb/proto/user/user_db.proto b/pb/proto/user/user_db.proto index 3b6aef8a9..5237fdc9f 100644 --- a/pb/proto/user/user_db.proto +++ b/pb/proto/user/user_db.proto @@ -29,4 +29,21 @@ message DBUser { int32 lv = 16; //@go_tags(`bson:"lv"`) 等级 int32 vip = 17; //@go_tags(`bson:"vip"`) vip int32 diamond = 18; //@go_tags(`bson:"diamond"`) 钻石 +} + +message DBUserSetting { + string uid = 2; //@go_tags(`bson:"uid"`) 用户ID + uint32 huazhi = 3; //@go_tags(`bson:"huazhi"`) 画质 0极致 1精致 2正常 3流畅 + uint32 kangjuchi = 4; //@go_tags(`bson:"kangjuchi"`) 抗锯齿 0 1 2 3 + bool gaoguang = 5; //@go_tags(`bson:"gaoguang"`) 高光 + bool wuli = 6; //@go_tags(`bson:"wuli"`) 物理模拟 + bool music = 7; //@go_tags(`bson:"music"`) 音乐 + bool effect = 8; //@go_tags(`bson:"effect"`) 音效 + + bool guaji = 9; //@go_tags(`bson:"guaji"`) 挂机 + bool fuben = 10; //@go_tags(`bson:"fuben"`) 特殊副本重置 + bool tansuo = 11; //@go_tags(`bson:"tansuo"`) 蜂窝探索 + bool huodong = 12; //@go_tags(`bson:"huodong"`) 特殊活动开启 + bool xuanshang = 13; //@go_tags(`bson:"wanfa"`)悬赏玩法重置 + bool saiji = 14; //@go_tags(`bson:"wanfa"`)格斗场玩法赛季重置 } \ No newline at end of file diff --git a/pb/proto/user/user_msg.proto b/pb/proto/user/user_msg.proto index 6568c976d..5d4998909 100644 --- a/pb/proto/user/user_msg.proto +++ b/pb/proto/user/user_msg.proto @@ -3,6 +3,7 @@ option go_package = ".;pb"; import "errorcode.proto"; import "user/user_db.proto"; import "comm.proto"; + //用户登录 message UserLoginReq { string account = 1; //账号 @@ -11,6 +12,12 @@ message UserLoginReq { message UserLoginResp { DBUser data = 1; } +//登出 +message UserLogoutReq {} + +message UserLogoutResp {} + +//注册 message UserRegisterReq { string account = 1; int32 sid = 2; @@ -40,10 +47,32 @@ message UserAddResResp { } // 玩家资源变更推送 -message UserResChangePush{ - int32 gold = 1; //@go_tags(`bson:"gold"`) 金币 - int32 exp = 2; //@go_tags(`bson:"exp"`) 经验 - int32 lv = 3; //@go_tags(`bson:"lv"`) 等级 - int32 vip = 4; //@go_tags(`bson:"vip"`) vip - int32 diamond = 5; //@go_tags(`bson:"diamond"`) 钻石 +message UserResChangePush { + int32 gold = 1; //@go_tags(`bson:"gold"`) 金币 + int32 exp = 2; //@go_tags(`bson:"exp"`) 经验 + int32 lv = 3; //@go_tags(`bson:"lv"`) 等级 + int32 vip = 4; //@go_tags(`bson:"vip"`) vip + int32 diamond = 5; //@go_tags(`bson:"diamond"`) 钻石 } + +//用户设置获取 +message UserGetSettingReq {} + +message UserGetSettingResp { + DBUserSetting setting = 1; //用户设置 +} + +// 更新用户设置 +message UserUpdateSettingReq { DBUserSetting setting = 1; } +message UserUpdateSettingResp {} + +// 初始化验证码 +message UserVeriCodeReq {} +message UserVeriCodeResp { + int32 code = 1; //验证码 +} + +message UserInitdataReq { + int32 code = 1; //验证码 +} +message UserInitdataResp {} \ No newline at end of file diff --git a/pb/user_db.pb.go b/pb/user_db.pb.go index 737ae3002..d0a170697 100644 --- a/pb/user_db.pb.go +++ b/pb/user_db.pb.go @@ -282,48 +282,209 @@ func (x *DBUser) GetDiamond() int32 { return 0 } +type DBUserSetting struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID + Huazhi uint32 `protobuf:"varint,3,opt,name=huazhi,proto3" json:"huazhi" bson:"huazhi"` //画质 0极致 1精致 2正常 3流畅 + Kangjuchi uint32 `protobuf:"varint,4,opt,name=kangjuchi,proto3" json:"kangjuchi" bson:"kangjuchi"` //抗锯齿 0 1 2 3 + Gaoguang bool `protobuf:"varint,5,opt,name=gaoguang,proto3" json:"gaoguang" bson:"gaoguang"` //高光 + Wuli bool `protobuf:"varint,6,opt,name=wuli,proto3" json:"wuli" bson:"wuli"` //物理模拟 + Music bool `protobuf:"varint,7,opt,name=music,proto3" json:"music" bson:"music"` //音乐 + Effect bool `protobuf:"varint,8,opt,name=effect,proto3" json:"effect" bson:"effect"` //音效 + Guaji bool `protobuf:"varint,9,opt,name=guaji,proto3" json:"guaji" bson:"guaji"` //挂机 + Fuben bool `protobuf:"varint,10,opt,name=fuben,proto3" json:"fuben" bson:"fuben"` //特殊副本重置 + Tansuo bool `protobuf:"varint,11,opt,name=tansuo,proto3" json:"tansuo" bson:"tansuo"` //蜂窝探索 + Huodong bool `protobuf:"varint,12,opt,name=huodong,proto3" json:"huodong" bson:"huodong"` //特殊活动开启 + Xuanshang bool `protobuf:"varint,13,opt,name=xuanshang,proto3" json:"xuanshang"` //@go_tags(`bson:"wanfa"`)悬赏玩法重置 + Saiji bool `protobuf:"varint,14,opt,name=saiji,proto3" json:"saiji"` //@go_tags(`bson:"wanfa"`)格斗场玩法赛季重置 +} + +func (x *DBUserSetting) Reset() { + *x = DBUserSetting{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_db_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBUserSetting) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBUserSetting) ProtoMessage() {} + +func (x *DBUserSetting) ProtoReflect() protoreflect.Message { + mi := &file_user_user_db_proto_msgTypes[2] + 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 DBUserSetting.ProtoReflect.Descriptor instead. +func (*DBUserSetting) Descriptor() ([]byte, []int) { + return file_user_user_db_proto_rawDescGZIP(), []int{2} +} + +func (x *DBUserSetting) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DBUserSetting) GetHuazhi() uint32 { + if x != nil { + return x.Huazhi + } + return 0 +} + +func (x *DBUserSetting) GetKangjuchi() uint32 { + if x != nil { + return x.Kangjuchi + } + return 0 +} + +func (x *DBUserSetting) GetGaoguang() bool { + if x != nil { + return x.Gaoguang + } + return false +} + +func (x *DBUserSetting) GetWuli() bool { + if x != nil { + return x.Wuli + } + return false +} + +func (x *DBUserSetting) GetMusic() bool { + if x != nil { + return x.Music + } + return false +} + +func (x *DBUserSetting) GetEffect() bool { + if x != nil { + return x.Effect + } + return false +} + +func (x *DBUserSetting) GetGuaji() bool { + if x != nil { + return x.Guaji + } + return false +} + +func (x *DBUserSetting) GetFuben() bool { + if x != nil { + return x.Fuben + } + return false +} + +func (x *DBUserSetting) GetTansuo() bool { + if x != nil { + return x.Tansuo + } + return false +} + +func (x *DBUserSetting) GetHuodong() bool { + if x != nil { + return x.Huodong + } + return false +} + +func (x *DBUserSetting) GetXuanshang() bool { + if x != nil { + return x.Xuanshang + } + return false +} + +func (x *DBUserSetting) GetSaiji() bool { + if x != nil { + return x.Saiji + } + return false +} + 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, 0x97, 0x01, 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, 0x1e, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x67, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, - 0x61, 0x67, 0x12, 0x2a, 0x0a, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x47, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0xa6, - 0x03, 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, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, - 0x76, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x76, - 0x69, 0x70, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x69, 0x70, 0x12, 0x18, 0x0a, - 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 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, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0xa6, 0x03, + 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, + 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x69, + 0x70, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x07, + 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x64, + 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x22, 0xc7, 0x02, 0x0a, 0x0d, 0x44, 0x42, 0x55, 0x73, 0x65, + 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x75, + 0x61, 0x7a, 0x68, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x75, 0x61, 0x7a, + 0x68, 0x69, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x61, 0x6e, 0x67, 0x6a, 0x75, 0x63, 0x68, 0x69, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6b, 0x61, 0x6e, 0x67, 0x6a, 0x75, 0x63, 0x68, 0x69, + 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, + 0x77, 0x75, 0x6c, 0x69, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x77, 0x75, 0x6c, 0x69, + 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x67, 0x75, 0x61, 0x6a, 0x69, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x67, + 0x75, 0x61, 0x6a, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x75, 0x62, 0x65, 0x6e, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x75, 0x62, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, + 0x6e, 0x73, 0x75, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x74, 0x61, 0x6e, 0x73, + 0x75, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f, 0x6e, 0x67, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, + 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x61, + 0x69, 0x6a, 0x69, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x61, 0x69, 0x6a, 0x69, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -338,10 +499,11 @@ func file_user_user_db_proto_rawDescGZIP() []byte { return file_user_user_db_proto_rawDescData } -var file_user_user_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_user_user_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_user_user_db_proto_goTypes = []interface{}{ - (*CacheUser)(nil), // 0: CacheUser - (*DBUser)(nil), // 1: DBUser + (*CacheUser)(nil), // 0: CacheUser + (*DBUser)(nil), // 1: DBUser + (*DBUserSetting)(nil), // 2: DBUserSetting } var file_user_user_db_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -381,6 +543,18 @@ func file_user_user_db_proto_init() { return nil } } + file_user_user_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBUserSetting); 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{ @@ -388,7 +562,7 @@ func file_user_user_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_user_user_db_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/user_msg.pb.go b/pb/user_msg.pb.go index bc80f24d8..50274390f 100644 --- a/pb/user_msg.pb.go +++ b/pb/user_msg.pb.go @@ -123,6 +123,84 @@ func (x *UserLoginResp) GetData() *DBUser { return nil } +//登出 +type UserLogoutReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UserLogoutReq) Reset() { + *x = UserLogoutReq{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_msg_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserLogoutReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserLogoutReq) ProtoMessage() {} + +func (x *UserLogoutReq) ProtoReflect() protoreflect.Message { + mi := &file_user_user_msg_proto_msgTypes[2] + 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 UserLogoutReq.ProtoReflect.Descriptor instead. +func (*UserLogoutReq) Descriptor() ([]byte, []int) { + return file_user_user_msg_proto_rawDescGZIP(), []int{2} +} + +type UserLogoutResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UserLogoutResp) Reset() { + *x = UserLogoutResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_msg_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserLogoutResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserLogoutResp) ProtoMessage() {} + +func (x *UserLogoutResp) ProtoReflect() protoreflect.Message { + mi := &file_user_user_msg_proto_msgTypes[3] + 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 UserLogoutResp.ProtoReflect.Descriptor instead. +func (*UserLogoutResp) Descriptor() ([]byte, []int) { + return file_user_user_msg_proto_rawDescGZIP(), []int{3} +} + +//注册 type UserRegisterReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -135,7 +213,7 @@ type UserRegisterReq struct { func (x *UserRegisterReq) Reset() { *x = UserRegisterReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_user_msg_proto_msgTypes[2] + mi := &file_user_user_msg_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -148,7 +226,7 @@ func (x *UserRegisterReq) String() string { func (*UserRegisterReq) ProtoMessage() {} func (x *UserRegisterReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_msg_proto_msgTypes[2] + mi := &file_user_user_msg_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -161,7 +239,7 @@ func (x *UserRegisterReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UserRegisterReq.ProtoReflect.Descriptor instead. func (*UserRegisterReq) Descriptor() ([]byte, []int) { - return file_user_user_msg_proto_rawDescGZIP(), []int{2} + return file_user_user_msg_proto_rawDescGZIP(), []int{4} } func (x *UserRegisterReq) GetAccount() string { @@ -190,7 +268,7 @@ type UserRegisterResp struct { func (x *UserRegisterResp) Reset() { *x = UserRegisterResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_user_msg_proto_msgTypes[3] + mi := &file_user_user_msg_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -203,7 +281,7 @@ func (x *UserRegisterResp) String() string { func (*UserRegisterResp) ProtoMessage() {} func (x *UserRegisterResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_msg_proto_msgTypes[3] + mi := &file_user_user_msg_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -216,7 +294,7 @@ func (x *UserRegisterResp) ProtoReflect() protoreflect.Message { // Deprecated: Use UserRegisterResp.ProtoReflect.Descriptor instead. func (*UserRegisterResp) Descriptor() ([]byte, []int) { - return file_user_user_msg_proto_rawDescGZIP(), []int{3} + return file_user_user_msg_proto_rawDescGZIP(), []int{5} } func (x *UserRegisterResp) GetCode() ErrorCode { @@ -244,7 +322,7 @@ type UserLoadResp struct { func (x *UserLoadResp) Reset() { *x = UserLoadResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_user_msg_proto_msgTypes[4] + mi := &file_user_user_msg_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -257,7 +335,7 @@ func (x *UserLoadResp) String() string { func (*UserLoadResp) ProtoMessage() {} func (x *UserLoadResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_msg_proto_msgTypes[4] + mi := &file_user_user_msg_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -270,7 +348,7 @@ func (x *UserLoadResp) ProtoReflect() protoreflect.Message { // Deprecated: Use UserLoadResp.ProtoReflect.Descriptor instead. func (*UserLoadResp) Descriptor() ([]byte, []int) { - return file_user_user_msg_proto_rawDescGZIP(), []int{4} + return file_user_user_msg_proto_rawDescGZIP(), []int{6} } func (x *UserLoadResp) GetData() *CacheUser { @@ -292,7 +370,7 @@ type UserCreateReq struct { func (x *UserCreateReq) Reset() { *x = UserCreateReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_user_msg_proto_msgTypes[5] + mi := &file_user_user_msg_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -305,7 +383,7 @@ func (x *UserCreateReq) String() string { func (*UserCreateReq) ProtoMessage() {} func (x *UserCreateReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_msg_proto_msgTypes[5] + mi := &file_user_user_msg_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -318,7 +396,7 @@ func (x *UserCreateReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UserCreateReq.ProtoReflect.Descriptor instead. func (*UserCreateReq) Descriptor() ([]byte, []int) { - return file_user_user_msg_proto_rawDescGZIP(), []int{5} + return file_user_user_msg_proto_rawDescGZIP(), []int{7} } func (x *UserCreateReq) GetNickName() string { @@ -337,7 +415,7 @@ type UserCreateResp struct { func (x *UserCreateResp) Reset() { *x = UserCreateResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_user_msg_proto_msgTypes[6] + mi := &file_user_user_msg_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -350,7 +428,7 @@ func (x *UserCreateResp) String() string { func (*UserCreateResp) ProtoMessage() {} func (x *UserCreateResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_msg_proto_msgTypes[6] + mi := &file_user_user_msg_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -363,7 +441,7 @@ func (x *UserCreateResp) ProtoReflect() protoreflect.Message { // Deprecated: Use UserCreateResp.ProtoReflect.Descriptor instead. func (*UserCreateResp) Descriptor() ([]byte, []int) { - return file_user_user_msg_proto_rawDescGZIP(), []int{6} + return file_user_user_msg_proto_rawDescGZIP(), []int{8} } //添加用户资源 @@ -378,7 +456,7 @@ type UserAddResReq struct { func (x *UserAddResReq) Reset() { *x = UserAddResReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_user_msg_proto_msgTypes[7] + mi := &file_user_user_msg_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -391,7 +469,7 @@ func (x *UserAddResReq) String() string { func (*UserAddResReq) ProtoMessage() {} func (x *UserAddResReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_msg_proto_msgTypes[7] + mi := &file_user_user_msg_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -404,7 +482,7 @@ func (x *UserAddResReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UserAddResReq.ProtoReflect.Descriptor instead. func (*UserAddResReq) Descriptor() ([]byte, []int) { - return file_user_user_msg_proto_rawDescGZIP(), []int{7} + return file_user_user_msg_proto_rawDescGZIP(), []int{9} } func (x *UserAddResReq) GetRes() *UserAssets { @@ -425,7 +503,7 @@ type UserAddResResp struct { func (x *UserAddResResp) Reset() { *x = UserAddResResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_user_msg_proto_msgTypes[8] + mi := &file_user_user_msg_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -438,7 +516,7 @@ func (x *UserAddResResp) String() string { func (*UserAddResResp) ProtoMessage() {} func (x *UserAddResResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_msg_proto_msgTypes[8] + mi := &file_user_user_msg_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -451,7 +529,7 @@ func (x *UserAddResResp) ProtoReflect() protoreflect.Message { // Deprecated: Use UserAddResResp.ProtoReflect.Descriptor instead. func (*UserAddResResp) Descriptor() ([]byte, []int) { - return file_user_user_msg_proto_rawDescGZIP(), []int{8} + return file_user_user_msg_proto_rawDescGZIP(), []int{10} } func (x *UserAddResResp) GetRes() *UserAssets { @@ -477,7 +555,7 @@ type UserResChangePush struct { func (x *UserResChangePush) Reset() { *x = UserResChangePush{} if protoimpl.UnsafeEnabled { - mi := &file_user_user_msg_proto_msgTypes[9] + mi := &file_user_user_msg_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -490,7 +568,7 @@ func (x *UserResChangePush) String() string { func (*UserResChangePush) ProtoMessage() {} func (x *UserResChangePush) ProtoReflect() protoreflect.Message { - mi := &file_user_user_msg_proto_msgTypes[9] + mi := &file_user_user_msg_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -503,7 +581,7 @@ func (x *UserResChangePush) ProtoReflect() protoreflect.Message { // Deprecated: Use UserResChangePush.ProtoReflect.Descriptor instead. func (*UserResChangePush) Descriptor() ([]byte, []int) { - return file_user_user_msg_proto_rawDescGZIP(), []int{9} + return file_user_user_msg_proto_rawDescGZIP(), []int{11} } func (x *UserResChangePush) GetGold() int32 { @@ -541,6 +619,349 @@ func (x *UserResChangePush) GetDiamond() int32 { return 0 } +//用户设置获取 +type UserGetSettingReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UserGetSettingReq) Reset() { + *x = UserGetSettingReq{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_msg_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserGetSettingReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserGetSettingReq) ProtoMessage() {} + +func (x *UserGetSettingReq) ProtoReflect() protoreflect.Message { + mi := &file_user_user_msg_proto_msgTypes[12] + 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 UserGetSettingReq.ProtoReflect.Descriptor instead. +func (*UserGetSettingReq) Descriptor() ([]byte, []int) { + return file_user_user_msg_proto_rawDescGZIP(), []int{12} +} + +type UserGetSettingResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Setting *DBUserSetting `protobuf:"bytes,1,opt,name=setting,proto3" json:"setting"` //用户设置 +} + +func (x *UserGetSettingResp) Reset() { + *x = UserGetSettingResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_msg_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserGetSettingResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserGetSettingResp) ProtoMessage() {} + +func (x *UserGetSettingResp) ProtoReflect() protoreflect.Message { + mi := &file_user_user_msg_proto_msgTypes[13] + 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 UserGetSettingResp.ProtoReflect.Descriptor instead. +func (*UserGetSettingResp) Descriptor() ([]byte, []int) { + return file_user_user_msg_proto_rawDescGZIP(), []int{13} +} + +func (x *UserGetSettingResp) GetSetting() *DBUserSetting { + if x != nil { + return x.Setting + } + return nil +} + +// 更新用户设置 +type UserUpdateSettingReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Setting *DBUserSetting `protobuf:"bytes,1,opt,name=setting,proto3" json:"setting"` +} + +func (x *UserUpdateSettingReq) Reset() { + *x = UserUpdateSettingReq{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_msg_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserUpdateSettingReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserUpdateSettingReq) ProtoMessage() {} + +func (x *UserUpdateSettingReq) ProtoReflect() protoreflect.Message { + mi := &file_user_user_msg_proto_msgTypes[14] + 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 UserUpdateSettingReq.ProtoReflect.Descriptor instead. +func (*UserUpdateSettingReq) Descriptor() ([]byte, []int) { + return file_user_user_msg_proto_rawDescGZIP(), []int{14} +} + +func (x *UserUpdateSettingReq) GetSetting() *DBUserSetting { + if x != nil { + return x.Setting + } + return nil +} + +type UserUpdateSettingResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UserUpdateSettingResp) Reset() { + *x = UserUpdateSettingResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_msg_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserUpdateSettingResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserUpdateSettingResp) ProtoMessage() {} + +func (x *UserUpdateSettingResp) ProtoReflect() protoreflect.Message { + mi := &file_user_user_msg_proto_msgTypes[15] + 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 UserUpdateSettingResp.ProtoReflect.Descriptor instead. +func (*UserUpdateSettingResp) Descriptor() ([]byte, []int) { + return file_user_user_msg_proto_rawDescGZIP(), []int{15} +} + +// 初始化验证码 +type UserVeriCodeReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UserVeriCodeReq) Reset() { + *x = UserVeriCodeReq{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_msg_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserVeriCodeReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserVeriCodeReq) ProtoMessage() {} + +func (x *UserVeriCodeReq) ProtoReflect() protoreflect.Message { + mi := &file_user_user_msg_proto_msgTypes[16] + 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 UserVeriCodeReq.ProtoReflect.Descriptor instead. +func (*UserVeriCodeReq) Descriptor() ([]byte, []int) { + return file_user_user_msg_proto_rawDescGZIP(), []int{16} +} + +type UserVeriCodeResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code"` //验证码 +} + +func (x *UserVeriCodeResp) Reset() { + *x = UserVeriCodeResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_msg_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserVeriCodeResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserVeriCodeResp) ProtoMessage() {} + +func (x *UserVeriCodeResp) ProtoReflect() protoreflect.Message { + mi := &file_user_user_msg_proto_msgTypes[17] + 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 UserVeriCodeResp.ProtoReflect.Descriptor instead. +func (*UserVeriCodeResp) Descriptor() ([]byte, []int) { + return file_user_user_msg_proto_rawDescGZIP(), []int{17} +} + +func (x *UserVeriCodeResp) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +type UserInitdataReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code"` //验证码 +} + +func (x *UserInitdataReq) Reset() { + *x = UserInitdataReq{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_msg_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserInitdataReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserInitdataReq) ProtoMessage() {} + +func (x *UserInitdataReq) ProtoReflect() protoreflect.Message { + mi := &file_user_user_msg_proto_msgTypes[18] + 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 UserInitdataReq.ProtoReflect.Descriptor instead. +func (*UserInitdataReq) Descriptor() ([]byte, []int) { + return file_user_user_msg_proto_rawDescGZIP(), []int{18} +} + +func (x *UserInitdataReq) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +type UserInitdataResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UserInitdataResp) Reset() { + *x = UserInitdataResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_msg_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserInitdataResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserInitdataResp) ProtoMessage() {} + +func (x *UserInitdataResp) ProtoReflect() protoreflect.Message { + mi := &file_user_user_msg_proto_msgTypes[19] + 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 UserInitdataResp.ProtoReflect.Descriptor instead. +func (*UserInitdataResp) Descriptor() ([]byte, []int) { + return file_user_user_msg_proto_rawDescGZIP(), []int{19} +} + var File_user_user_msg_proto protoreflect.FileDescriptor var file_user_user_msg_proto_rawDesc = []byte{ @@ -555,37 +976,57 @@ var file_user_user_msg_proto_rawDesc = []byte{ 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, - 0x4c, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x65, 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, 0x2e, 0x0a, - 0x0c, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 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, 0x10, 0x0a, 0x0e, 0x55, 0x73, - 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x2e, 0x0a, 0x0d, - 0x55, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x52, 0x65, 0x71, 0x12, 0x1d, 0x0a, - 0x03, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x03, 0x72, 0x65, 0x73, 0x22, 0x2f, 0x0a, 0x0e, - 0x55, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, - 0x0a, 0x03, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x03, 0x72, 0x65, 0x73, 0x22, 0x75, 0x0a, - 0x11, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, - 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x69, 0x70, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, - 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x64, 0x69, 0x61, - 0x6d, 0x6f, 0x6e, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x0f, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, + 0x71, 0x22, 0x10, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, + 0x65, 0x73, 0x70, 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, 0x4c, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 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, 0x2e, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 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, 0x10, 0x0a, + 0x0e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, + 0x2e, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x12, 0x1d, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x03, 0x72, 0x65, 0x73, 0x22, + 0x2f, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x1d, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x03, 0x72, 0x65, 0x73, + 0x22, 0x75, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x6c, + 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x76, + 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x69, 0x70, 0x12, 0x18, 0x0a, + 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, + 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x47, + 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x22, 0x3e, 0x0a, 0x12, + 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x40, 0x0a, 0x14, + 0x55, 0x73, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x17, + 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x22, 0x11, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x56, + 0x65, 0x72, 0x69, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x22, 0x26, 0x0a, 0x10, 0x55, 0x73, + 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, + 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x22, 0x25, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x6e, 0x69, 0x74, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -600,34 +1041,47 @@ func file_user_user_msg_proto_rawDescGZIP() []byte { return file_user_user_msg_proto_rawDescData } -var file_user_user_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_user_user_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_user_user_msg_proto_goTypes = []interface{}{ - (*UserLoginReq)(nil), // 0: UserLoginReq - (*UserLoginResp)(nil), // 1: UserLoginResp - (*UserRegisterReq)(nil), // 2: UserRegisterReq - (*UserRegisterResp)(nil), // 3: UserRegisterResp - (*UserLoadResp)(nil), // 4: UserLoadResp - (*UserCreateReq)(nil), // 5: UserCreateReq - (*UserCreateResp)(nil), // 6: UserCreateResp - (*UserAddResReq)(nil), // 7: UserAddResReq - (*UserAddResResp)(nil), // 8: UserAddResResp - (*UserResChangePush)(nil), // 9: UserResChangePush - (*DBUser)(nil), // 10: DBUser - (ErrorCode)(0), // 11: ErrorCode - (*CacheUser)(nil), // 12: CacheUser - (*UserAssets)(nil), // 13: UserAssets + (*UserLoginReq)(nil), // 0: UserLoginReq + (*UserLoginResp)(nil), // 1: UserLoginResp + (*UserLogoutReq)(nil), // 2: UserLogoutReq + (*UserLogoutResp)(nil), // 3: UserLogoutResp + (*UserRegisterReq)(nil), // 4: UserRegisterReq + (*UserRegisterResp)(nil), // 5: UserRegisterResp + (*UserLoadResp)(nil), // 6: UserLoadResp + (*UserCreateReq)(nil), // 7: UserCreateReq + (*UserCreateResp)(nil), // 8: UserCreateResp + (*UserAddResReq)(nil), // 9: UserAddResReq + (*UserAddResResp)(nil), // 10: UserAddResResp + (*UserResChangePush)(nil), // 11: UserResChangePush + (*UserGetSettingReq)(nil), // 12: UserGetSettingReq + (*UserGetSettingResp)(nil), // 13: UserGetSettingResp + (*UserUpdateSettingReq)(nil), // 14: UserUpdateSettingReq + (*UserUpdateSettingResp)(nil), // 15: UserUpdateSettingResp + (*UserVeriCodeReq)(nil), // 16: UserVeriCodeReq + (*UserVeriCodeResp)(nil), // 17: UserVeriCodeResp + (*UserInitdataReq)(nil), // 18: UserInitdataReq + (*UserInitdataResp)(nil), // 19: UserInitdataResp + (*DBUser)(nil), // 20: DBUser + (ErrorCode)(0), // 21: ErrorCode + (*CacheUser)(nil), // 22: CacheUser + (*UserAssets)(nil), // 23: UserAssets + (*DBUserSetting)(nil), // 24: DBUserSetting } var file_user_user_msg_proto_depIdxs = []int32{ - 10, // 0: UserLoginResp.data:type_name -> DBUser - 11, // 1: UserRegisterResp.Code:type_name -> ErrorCode - 12, // 2: UserLoadResp.data:type_name -> CacheUser - 13, // 3: UserAddResReq.res:type_name -> UserAssets - 13, // 4: UserAddResResp.res:type_name -> UserAssets - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 20, // 0: UserLoginResp.data:type_name -> DBUser + 21, // 1: UserRegisterResp.Code:type_name -> ErrorCode + 22, // 2: UserLoadResp.data:type_name -> CacheUser + 23, // 3: UserAddResReq.res:type_name -> UserAssets + 23, // 4: UserAddResResp.res:type_name -> UserAssets + 24, // 5: UserGetSettingResp.setting:type_name -> DBUserSetting + 24, // 6: UserUpdateSettingReq.setting:type_name -> DBUserSetting + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_user_user_msg_proto_init() } @@ -664,7 +1118,7 @@ func file_user_user_msg_proto_init() { } } file_user_user_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserRegisterReq); i { + switch v := v.(*UserLogoutReq); i { case 0: return &v.state case 1: @@ -676,7 +1130,7 @@ func file_user_user_msg_proto_init() { } } file_user_user_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserRegisterResp); i { + switch v := v.(*UserLogoutResp); i { case 0: return &v.state case 1: @@ -688,7 +1142,7 @@ func file_user_user_msg_proto_init() { } } file_user_user_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserLoadResp); i { + switch v := v.(*UserRegisterReq); i { case 0: return &v.state case 1: @@ -700,7 +1154,7 @@ func file_user_user_msg_proto_init() { } } file_user_user_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserCreateReq); i { + switch v := v.(*UserRegisterResp); i { case 0: return &v.state case 1: @@ -712,7 +1166,7 @@ func file_user_user_msg_proto_init() { } } file_user_user_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserCreateResp); i { + switch v := v.(*UserLoadResp); i { case 0: return &v.state case 1: @@ -724,7 +1178,7 @@ func file_user_user_msg_proto_init() { } } file_user_user_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserAddResReq); i { + switch v := v.(*UserCreateReq); i { case 0: return &v.state case 1: @@ -736,7 +1190,7 @@ func file_user_user_msg_proto_init() { } } file_user_user_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserAddResResp); i { + switch v := v.(*UserCreateResp); i { case 0: return &v.state case 1: @@ -748,6 +1202,30 @@ func file_user_user_msg_proto_init() { } } file_user_user_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserAddResReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_user_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserAddResResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_user_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserResChangePush); i { case 0: return &v.state @@ -759,6 +1237,102 @@ func file_user_user_msg_proto_init() { return nil } } + file_user_user_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserGetSettingReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_user_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserGetSettingResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_user_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserUpdateSettingReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_user_msg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserUpdateSettingResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_user_msg_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserVeriCodeReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_user_msg_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserVeriCodeResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_user_msg_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserInitdataReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_user_msg_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserInitdataResp); 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{ @@ -766,7 +1340,7 @@ func file_user_user_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_user_user_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 20, NumExtensions: 0, NumServices: 0, }, diff --git a/utils/random.go b/utils/random.go new file mode 100644 index 000000000..4251724e6 --- /dev/null +++ b/utils/random.go @@ -0,0 +1,20 @@ +package utils + +import ( + "fmt" + "math/rand" + "strings" + "time" +) + +func GenValidateCode(width int) string { + numeric := [10]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9} + r := len(numeric) + rand.Seed(time.Now().UnixNano()) + + var sb strings.Builder + for i := 0; i < width; i++ { + fmt.Fprintf(&sb, "%d", numeric[rand.Intn(r)]) + } + return sb.String() +} diff --git a/utils/time_test.go b/utils/utils_test.go similarity index 75% rename from utils/time_test.go rename to utils/utils_test.go index ea0708f6c..4932b9c4a 100644 --- a/utils/time_test.go +++ b/utils/utils_test.go @@ -14,3 +14,7 @@ func TestIsToday(t *testing.T) { func TestSubTime(t *testing.T) { fmt.Println(utils.IsAfterWeek(1657172915)) } + +func TestRandom(t *testing.T) { + fmt.Println(utils.GenValidateCode(6)) +}