From 4f32f23c0fee72020856af9f65e337004ea2a12b Mon Sep 17 00:00:00 2001 From: zhaocy Date: Fri, 22 Jul 2022 18:22:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/robot/hero.go | 8 ++-- cmd/robot/task.go | 34 +++++++-------- cmd/robot/user.go | 4 +- comm/imodule.go | 2 + modules/hero/api_strengthenUplv.go | 2 +- modules/hero/model_hero.go | 2 +- modules/task/api_receive.go | 4 +- modules/task/model_active.go | 12 ++++-- modules/task/model_task.go | 66 ++++++++++++++++++++---------- modules/task/module.go | 8 ++-- modules/user/model_session.go | 7 ++++ modules/user/module.go | 12 ++++++ pb/proto/task/task_db.proto | 3 +- pb/task_db.pb.go | 29 ++++++++----- 14 files changed, 126 insertions(+), 67 deletions(-) diff --git a/cmd/robot/hero.go b/cmd/robot/hero.go index a2bdae0dc..036509098 100644 --- a/cmd/robot/hero.go +++ b/cmd/robot/hero.go @@ -33,13 +33,13 @@ var ( mainType: string(comm.ModuleHero), subType: hero.StrengthenUplv, req: &pb.HeroStrengthenUplvReq{ - HeroObjID: "62da0353ebe27f9446dd4a1d", + HeroObjID: "62da4e1ecd19e620141eed75", ExpCards: map[string]int32{ - "62da19017944b60fd473df61": 1, + "62da4e40cd19e620141eedeb": 1, }, }, - rsp: &pb.HeroStrengthenUplvResp{}, - // enabled: true, + rsp: &pb.HeroStrengthenUplvResp{}, + enabled: true, } tcs = append(tcs, tc) } diff --git a/cmd/robot/task.go b/cmd/robot/task.go index c6a2d1c5e..0014501e0 100644 --- a/cmd/robot/task.go +++ b/cmd/robot/task.go @@ -17,7 +17,7 @@ var ( subType: task.TaskSubTypeList, req: &pb.TaskListReq{ //设置任务类型 - TaskTag: int32(comm.TASK_DAILY), //每天任务 + // TaskTag: int32(comm.TASK_DAILY), //每天任务 // TaskTag: int32(comm.TASK_WEEKLY), //周任务 // TaskTag: int32(comm.TASK_ACHIEVE), // TaskTag: int32(comm.TASK_STRATEGY), @@ -29,24 +29,24 @@ var ( fmt.Printf("%v \n", v) } }, - enabled: true, + // enabled: true, next: func(robot *Robot, rsp proto.Message) { tcs := []*TestCase{} - if v, ok := rsp.(*pb.TaskListResp); ok { - for _, tt := range v.List { - tc := &TestCase{ - desc: "领取任务奖励", - mainType: string(comm.ModuleTask), - subType: task.TaskSubTypeReceive, - req: &pb.TaskReceiveReq{ - TaskTag: int32(comm.TASK_DAILY), - Id: tt.Id, - }, - rsp: &pb.TaskReceiveResp{}, - // enabled: true, - } - tcs = append(tcs, tc) + if _, ok := rsp.(*pb.TaskListResp); ok { + // for _, tt := range v.List { + tc := &TestCase{ + desc: "领取任务奖励", + mainType: string(comm.ModuleTask), + subType: task.TaskSubTypeReceive, + req: &pb.TaskReceiveReq{ + TaskTag: int32(comm.TASK_DAILY), + Id: "62da4e20cd19e620141eed7b", + }, + rsp: &pb.TaskReceiveResp{}, + // enabled: true, } + tcs = append(tcs, tc) + // } robot.addBuilders(tcs) } }, @@ -64,7 +64,7 @@ var ( fmt.Printf("%v 活跃值:%v\n", v, out.Active) } }, - // enabled: true, + enabled: true, }, { desc: "活跃度领取", mainType: string(comm.ModuleTask), diff --git a/cmd/robot/user.go b/cmd/robot/user.go index cbe462821..3aae5e74b 100644 --- a/cmd/robot/user.go +++ b/cmd/robot/user.go @@ -32,7 +32,7 @@ var user_builders = []*TestCase{ }, }, rsp: &pb.UserAddResResp{}, - //enabled: true, + // enabled: true, }, { desc: "添加资源", @@ -46,7 +46,7 @@ var user_builders = []*TestCase{ }, }, rsp: &pb.UserAddResResp{}, - enabled: true, + // enabled: true, }, { desc: "获取配置", mainType: string(comm.ModuleUser), diff --git a/comm/imodule.go b/comm/imodule.go index 8517e2cda..e6b767afd 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -82,6 +82,8 @@ type ( InitTaskAll(uid string) //清空任务 ResetTask(uid string, taskTag TaskTag) + //监听任务 + ListenTask() //任务通知 SendToTask(session IUserSession, taskType TaskType, param *pb.TaskParam) (code pb.ErrorCode) // 清理玩家任务数据 diff --git a/modules/hero/api_strengthenUplv.go b/modules/hero/api_strengthenUplv.go index 0b3aa9fde..2fae6d39f 100644 --- a/modules/hero/api_strengthenUplv.go +++ b/modules/hero/api_strengthenUplv.go @@ -182,7 +182,7 @@ func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStren session.SendMsg(string(this.module.GetType()), "change", &pb.HeroChangePush{List: []*pb.DBHero{_hero}}) session.SendMsg(string(this.module.GetType()), StrengthenUplv, &pb.HeroStrengthenUplvResp{Hero: _hero}) if iLvUp > 0 { // 升级了 统计任务 - this.module.ModuleTask.SendToTask(session, comm.TaskTypeUpHeroLevel, &pb.TaskParam{First: iLvUp}) + this.module.ModuleTask.SendToTask(session, comm.TaskTypeUpHeroLevel, &pb.TaskParam{Second: iLvUp}) } return diff --git a/modules/hero/model_hero.go b/modules/hero/model_hero.go index 283eba13c..b0b55681f 100644 --- a/modules/hero/model_hero.go +++ b/modules/hero/model_hero.go @@ -115,7 +115,7 @@ func (this *ModelHero) initHeroOverlying(uid string, heroCfgId, count int32) (he this.ChanageUserExpand(uid, initUpdate) } } - hero.SameCount += count + hero.SameCount = count if err = this.moduleHero.modelHero.AddList(uid, hero.Id, hero); err != nil { this.moduleHero.Errorf("%v", err) return diff --git a/modules/task/api_receive.go b/modules/task/api_receive.go index 9a5047e13..ba84c0c7a 100644 --- a/modules/task/api_receive.go +++ b/modules/task/api_receive.go @@ -8,7 +8,7 @@ import ( "google.golang.org/protobuf/proto" ) -//领取 +//任务奖励领取 func (this *apiComp) ReceiveCheck(session comm.IUserSession, req *pb.TaskReceiveReq) (code pb.ErrorCode) { if req.TaskTag == 0 || req.Id == "" { code = pb.ErrorCode_ReqParameterError @@ -49,7 +49,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.TaskReceiveReq) } //奖励 - if code = this.moduleTask.ConsumeRes(session, conf.Reword, true); code != pb.ErrorCode_Success { + if code = this.moduleTask.DispenseRes(session, conf.Reword, true); code != pb.ErrorCode_Success { return } diff --git a/modules/task/model_active.go b/modules/task/model_active.go index 9f845a590..4d4737103 100644 --- a/modules/task/model_active.go +++ b/modules/task/model_active.go @@ -40,21 +40,27 @@ func (this *ModelTaskActive) initActiveReward(uid string) { RId: conf.Key, } if err := this.moduleTask.modelTaskActive.AddList(uid, ta.Id, ta); err != nil { - log.Errorf("uid:%v tag:%v initActiv add err %v", uid, err) + log.Errorf("uid:%v tag:%v initActiv add err %v", uid, err) return } } } //获取玩家活跃度列表 -func (this *ModelTaskActive) getUserActiveList(uid string, taskTag comm.TaskTag) []*pb.DBTaskActive { +func (this *ModelTaskActive) getUserActiveList(uid string, taskTag comm.TaskTag) (list []*pb.DBTaskActive) { al := []*pb.DBTaskActive{} if err := this.GetList(uid, &al); err != nil { log.Errorf("getUserActiveList err:%v", err) return al } - return al + for _, v := range al { + if v.Tag == int32(taskTag) { + list = append(list, v) + } + } + + return list } //获取玩家活跃记录 id 唯一ID diff --git a/modules/task/model_task.go b/modules/task/model_task.go index 289df7963..ed63a0279 100644 --- a/modules/task/model_task.go +++ b/modules/task/model_task.go @@ -1,7 +1,6 @@ package task import ( - "fmt" "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/lego/sys/log" @@ -19,12 +18,15 @@ const ( //Redis type ModelTask struct { modules.MCompModel moduleTask *ModuleTask + + handleHandle ITaskHandle } func (this *ModelTask) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { err = this.MCompModel.Init(service, module, comp, options) this.moduleTask = module.(*ModuleTask) this.TableName = string(TableTask) + this.handleHandle = new(TaskHandler) return } @@ -44,15 +46,36 @@ func (this *ModelTask) getTaskList(uid string, taskTag comm.TaskTag) (newlist [] return } +func (this *ModelTask) getTaskTypeList(uid string, taskType comm.TaskType) (newlist []*pb.DBTask) { + list := []*pb.DBTask{} + if err := this.GetList(uid, &list); err != nil { + log.Errorf("getTaskList err %v", err) + return + } + + for _, v := range list { + if v.TypeId == int32(taskType) { + newlist = append(newlist, v) + } + } + return +} + +//任务处理器注册 + //初始化任务 func (this *ModelTask) initTask(uid string) error { if data, err := this.moduleTask.configure.getTaskList(); err == nil { for _, cnf := range data { + //注册任务处理器 + + //初始玩家任务数据 objId := primitive.NewObjectID().Hex() task := &pb.DBTask{ Id: objId, Tag: cnf.IdTag, Uid: uid, + TypeId: cnf.TypeId, TaskId: cnf.Key, Active: cnf.Active, Progress: cnf.ConditionSecond, @@ -77,8 +100,8 @@ func (this *ModelTask) getUserTask(uid string, taskId string) *pb.DBTask { } //获取未完成的任务列表 -func (this *ModelTask) getUnFinishTaskList(uid string, taskTag comm.TaskTag) (list []*pb.DBTask) { - taskList := this.getTaskList(uid, taskTag) +func (this *ModelTask) getUnFinishTaskList(uid string, taskType comm.TaskType) (list []*pb.DBTask) { + taskList := this.getTaskTypeList(uid, taskType) for _, v := range taskList { if v.Status == 0 { list = append(list, v) @@ -100,7 +123,7 @@ func (this *ModelTask) countActive(uid string, taskTag comm.TaskTag) (total int3 //检查任务进度 返回未完成的 func (this *ModelTask) checkTaskProgress(uid string, config *cfg.Game_taskRoundData) (*pb.DBTask, bool) { - taskList := this.getUnFinishTaskList(uid, comm.TaskTag(config.IdTag)) + taskList := this.getUnFinishTaskList(uid, comm.TaskType(config.TypeId)) for _, v := range taskList { if config.Key == v.TaskId && v.Status == 0 { return v, true @@ -120,7 +143,7 @@ func (this *ModelTask) modifyUserTask(uid string, taskId string, data map[string } //任务处理 -func (this *ModelTask) taskHandle(uid string, taskType comm.TaskType, taskParam *pb.TaskParam) (*pb.DBTask, error) { +func (this *ModelTask) taskHandle(uid string, taskType comm.TaskType, taskParam *pb.TaskParam) (tasks []*pb.DBTask, err error) { data, err := this.moduleTask.configure.getTasks(int32(taskType)) if err != nil { log.Errorf("taskHandle err %v", err) @@ -135,7 +158,7 @@ func (this *ModelTask) taskHandle(uid string, taskType comm.TaskType, taskParam } } - if taskParam.Second != conf.ConditionSecond { + if taskParam.Second < conf.ConditionSecond { continue } @@ -144,35 +167,34 @@ func (this *ModelTask) taskHandle(uid string, taskType comm.TaskType, taskParam if tt, err := this.finishHandle(v, conf, taskParam.Second); err != nil { return nil, err } else { - return tt, nil + tasks = append(tasks, tt) } } } - return nil, nil + return tasks, nil } //任务完成处理 func (this *ModelTask) finishHandle(userTask *pb.DBTask, config *cfg.Game_taskRoundData, count int32) (*pb.DBTask, error) { - progress := userTask.Progress - count - if progress < 0 { - return nil, fmt.Errorf("uid %s task[%s] was finished", userTask.Uid, userTask.Id) + var progress int32 + if count >= userTask.Progress { + progress = 0 } - //修改玩家任务状态和进度 - update := map[string]interface{}{ - "progress": progress, - } if progress == 0 { + //修改玩家任务状态和进度 + update := map[string]interface{}{ + "progress": progress, + } update["status"] = 1 + if err := this.modifyUserTask(userTask.Uid, userTask.Id, update); err != nil { + log.Errorf("err %v", err) + return nil, err + } + userTask.Progress = progress + userTask.Status = 1 } - if err := this.modifyUserTask(userTask.Uid, userTask.Id, update); err != nil { - log.Errorf("err %v", err) - return nil, err - } - - userTask.Progress = progress - userTask.Status = 1 return userTask, nil } diff --git a/modules/task/module.go b/modules/task/module.go index 1c62c9963..fad79cfdf 100644 --- a/modules/task/module.go +++ b/modules/task/module.go @@ -67,11 +67,11 @@ func (this *ModuleTask) ResetTask(uid string, taskTag comm.TaskTag) { //任务处理 func (this *ModuleTask) SendToTask(session comm.IUserSession, taskType comm.TaskType, taskPram *pb.TaskParam) (code pb.ErrorCode) { - if task, err := this.modelTask.taskHandle(session.GetUserId(), taskType, taskPram); err != nil { + if tasks, err := this.modelTask.taskHandle(session.GetUserId(), taskType, taskPram); err != nil { code = pb.ErrorCode_TaskHandle } else { - if task != nil { - if err := session.SendMsg(string(comm.ModuleTask), TaskSubTypeFinishedPush, &pb.TaskFinishedPush{TaskId: task.TaskId}); err != nil { + for _, t := range tasks { + if err := session.SendMsg(string(comm.ModuleTask), TaskSubTypeFinishedPush, &pb.TaskFinishedPush{TaskId: t.TaskId}); err != nil { this.modelTask.moduleTask.Errorf("SendToTask sendmsg err:%v", err) } } @@ -97,4 +97,4 @@ func (this *ModuleTask) CleanData(uid string) { this.modelTaskActive.clearTask(uid, comm.TASK_DAILY) this.modelTaskActive.clearTask(uid, comm.TASK_WEEKLY) -} +} \ No newline at end of file diff --git a/modules/user/model_session.go b/modules/user/model_session.go index 04cfba88b..13a4d0166 100644 --- a/modules/user/model_session.go +++ b/modules/user/model_session.go @@ -26,3 +26,10 @@ func (this *ModelSession) getUserSession(uid string) (cuser *pb.CacheUser) { } return } + +//清除session缓存 +func (this *ModelSession) cleanSession(uid string) { + if err := this.Del(uid); err != nil { + log.Errorf("clean session err: %v", err) + } +} diff --git a/modules/user/module.go b/modules/user/module.go index f079a29c7..663d5634c 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -6,6 +6,7 @@ import ( "go_dreamfactory/pb" "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/event" "go_dreamfactory/lego/sys/log" ) @@ -33,6 +34,12 @@ func (this *User) Init(service core.IService, module core.IModule, options core. return } +func (this *User) Start() (err error) { + err = this.ModuleBase.Start() + event.RegisterGO(comm.EventUserOffline, this.CleanSession) + return +} + func (this *User) OnInstallComp() { this.ModuleBase.OnInstallComp() this.api = this.RegisterComp(new(apiComp)).(*apiComp) @@ -59,6 +66,11 @@ func (this *User) GetUserSession(uid string) *pb.CacheUser { return cuser } +// 清除session +func (this *User) CleanSession(session comm.IUserSession) { + this.modelSession.cleanSession(session.GetUserId()) +} + //查询用户属性值 例如 金币 经验 func (this *User) QueryAttributeValue(uid string, attr string) (value int32) { user := this.modelUser.GetUser(uid) diff --git a/pb/proto/task/task_db.proto b/pb/proto/task/task_db.proto index 12750ea04..f5ba4a937 100644 --- a/pb/proto/task/task_db.proto +++ b/pb/proto/task/task_db.proto @@ -10,12 +10,13 @@ message DBTask { int32 active = 6; //@go_tags(`bson:"active"`) 活跃度 int32 status = 7; //@go_tags(`bson:"status"`) 任务状态 默认0未完成 1已完成 int32 received = 8; //@go_tags(`bson:"received"`) 领取状态 默认0未领取 1已领取 + int32 typeId = 9; //@go_tags(`bson:"typeId"`) } message DBTaskActive { string id = 1; //@go_tags(`bson:"_id"`) ID string uid = 2; //@go_tags(`bson:"uid"`) 用户ID int32 rId = 3; //@go_tags(`bson:"taskId"`) rewardId - int32 tag = 4; //@go_tags(`bson:"tag"`) 标签 + int32 tag = 4; //@go_tags(`bson:"tag"`) 标签 int32 received = 5; //@go_tags(`bson:"received"`) 领取状态 默认0未领取 1已领取 } \ No newline at end of file diff --git a/pb/task_db.pb.go b/pb/task_db.pb.go index f8abcc25a..a3ac6e3e6 100644 --- a/pb/task_db.pb.go +++ b/pb/task_db.pb.go @@ -33,6 +33,7 @@ type DBTask struct { Active int32 `protobuf:"varint,6,opt,name=active,proto3" json:"active" bson:"active"` //活跃度 Status int32 `protobuf:"varint,7,opt,name=status,proto3" json:"status" bson:"status"` // 任务状态 默认0未完成 1已完成 Received int32 `protobuf:"varint,8,opt,name=received,proto3" json:"received" bson:"received"` //领取状态 默认0未领取 1已领取 + TypeId int32 `protobuf:"varint,9,opt,name=typeId,proto3" json:"typeId" bson:"typeId"` } func (x *DBTask) Reset() { @@ -123,6 +124,13 @@ func (x *DBTask) GetReceived() int32 { return 0 } +func (x *DBTask) GetTypeId() int32 { + if x != nil { + return x.TypeId + } + return 0 +} + type DBTaskActive struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -206,7 +214,7 @@ var File_task_task_db_proto protoreflect.FileDescriptor var file_task_task_db_proto_rawDesc = []byte{ 0x0a, 0x12, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x64, 0x62, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x01, 0x0a, 0x06, 0x44, 0x42, 0x54, 0x61, 0x73, 0x6b, 0x12, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd4, 0x01, 0x0a, 0x06, 0x44, 0x42, 0x54, 0x61, 0x73, 0x6b, 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, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, @@ -218,15 +226,16 @@ var file_task_task_db_proto_rawDesc = []byte{ 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x64, 0x22, 0x70, 0x0a, 0x0c, 0x44, 0x42, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, - 0x69, 0x76, 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, 0x10, 0x0a, 0x03, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x03, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x79, 0x70, 0x65, 0x49, 0x64, 0x22, 0x70, 0x0a, 0x0c, 0x44, + 0x42, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 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, 0x10, 0x0a, + 0x03, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x49, 0x64, 0x12, + 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x61, + 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var (