diff --git a/modules/whackamole/api_award.go b/modules/whackamole/api_award.go index 63c2b61a3..aa18f6cd3 100644 --- a/modules/whackamole/api_award.go +++ b/modules/whackamole/api_award.go @@ -15,8 +15,11 @@ func (this *apiComp) AwardCheck(session comm.IUserSession, req *pb.WhackamoleAwa // /获取系统公告 func (this *apiComp) Award(session comm.IUserSession, req *pb.WhackamoleAwardReq) (errdata *pb.ErrorData) { var ( + info *pb.DBWhackamole conf *cfg.GameTDRewardData + atns []*cfg.Gameatn award []*pb.UserAtno + ok bool err error ) if errdata = this.AwardCheck(session, req); errdata != nil { @@ -30,10 +33,23 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.WhackamoleAwardReq } return } - if errdata, award = this.module.DispenseAtno(session, conf.Reward, true); errdata != nil { + if info, err = this.module.model.getModel(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Message: err.Error(), + } return } + if _, ok = info.Levels[req.Id]; ok { + atns = conf.Reward + } else { + atns = conf.Reward + } + + if errdata, award = this.module.DispenseAtno(session, atns, true); errdata != nil { + return + } session.SendMsg(string(this.module.GetType()), "award", &pb.WhackamoleAwardResp{Id: req.Id, Award: award}) go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "WhackamoleAwardReq", award) diff --git a/modules/whackamole/api_info.go b/modules/whackamole/api_info.go new file mode 100644 index 000000000..8d2a5d005 --- /dev/null +++ b/modules/whackamole/api_info.go @@ -0,0 +1,33 @@ +package whackamole + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" +) + +// 参数校验 +func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.WhackamoleInfoReq) (errdata *pb.ErrorData) { + + return +} + +// /获取系统公告 +func (this *apiComp) Info(session comm.IUserSession, req *pb.WhackamoleInfoReq) (errdata *pb.ErrorData) { + var ( + info *pb.DBWhackamole + err error + ) + if errdata = this.InfoCheck(session, req); errdata != nil { + return + } + + if info, err = this.module.model.getModel(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Message: err.Error(), + } + return + } + session.SendMsg(string(this.module.GetType()), "award", &pb.WhackamoleInfoResp{Info: info}) + return +} diff --git a/modules/whackamole/model.go b/modules/whackamole/model.go new file mode 100644 index 000000000..b7cf54590 --- /dev/null +++ b/modules/whackamole/model.go @@ -0,0 +1,45 @@ +package whackamole + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/mgo" + "go_dreamfactory/modules" + "go_dreamfactory/pb" + + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/x/bsonx" +) + +type modelComp struct { + modules.MCompModel + module *Whackamole +} + +func (this *modelComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + err = this.MCompModel.Init(service, module, comp, options) + this.TableName = comm.TableDcolor + this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ + Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, + }) + return +} + +// 获取用户全部的埋点数据 +func (this *modelComp) getModel(uid string) (info *pb.DBWhackamole, err error) { + info = &pb.DBWhackamole{} + if err = this.Get(uid, info); err != nil && err != mgo.MongodbNil { + this.module.Errorln(err) + return + } + if err == mgo.MongodbNil { + info = &pb.DBWhackamole{ + Id: primitive.NewObjectID().Hex(), + Uid: uid, + Levels: make(map[int32]int32), + } + err = this.Add(uid, info) + } + return +} diff --git a/modules/whackamole/module.go b/modules/whackamole/module.go index 59d6d5881..a02ff971b 100644 --- a/modules/whackamole/module.go +++ b/modules/whackamole/module.go @@ -18,6 +18,7 @@ type Whackamole struct { modules.ModuleBase service comm.IService api *apiComp + model *modelComp configure *configureComp } @@ -36,5 +37,6 @@ func (this *Whackamole) Init(service core.IService, module core.IModule, options func (this *Whackamole) OnInstallComp() { this.ModuleBase.OnInstallComp() this.api = this.RegisterComp(new(apiComp)).(*apiComp) + this.model = this.RegisterComp(new(modelComp)).(*modelComp) this.configure = this.RegisterComp(new(configureComp)).(*configureComp) } diff --git a/pb/whackamole_db.pb.go b/pb/whackamole_db.pb.go index 15089cbfb..195531957 100644 --- a/pb/whackamole_db.pb.go +++ b/pb/whackamole_db.pb.go @@ -10,6 +10,7 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" + sync "sync" ) const ( @@ -19,21 +20,113 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +//打豚鼠 +type DBWhackamole struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` + Levels map[int32]int32 `protobuf:"bytes,3,rep,name=levels,proto3" json:"levels" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //关卡信息 +} + +func (x *DBWhackamole) Reset() { + *x = DBWhackamole{} + if protoimpl.UnsafeEnabled { + mi := &file_whackamole_whackamole_db_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBWhackamole) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBWhackamole) ProtoMessage() {} + +func (x *DBWhackamole) ProtoReflect() protoreflect.Message { + mi := &file_whackamole_whackamole_db_proto_msgTypes[0] + 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 DBWhackamole.ProtoReflect.Descriptor instead. +func (*DBWhackamole) Descriptor() ([]byte, []int) { + return file_whackamole_whackamole_db_proto_rawDescGZIP(), []int{0} +} + +func (x *DBWhackamole) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DBWhackamole) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DBWhackamole) GetLevels() map[int32]int32 { + if x != nil { + return x.Levels + } + return nil +} + var File_whackamole_whackamole_db_proto protoreflect.FileDescriptor var file_whackamole_whackamole_db_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x77, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x2f, 0x77, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x9e, 0x01, 0x0a, 0x0c, 0x44, 0x42, 0x57, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, + 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x57, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, + 0x6c, 0x65, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, + 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } -var file_whackamole_whackamole_db_proto_goTypes = []interface{}{} +var ( + file_whackamole_whackamole_db_proto_rawDescOnce sync.Once + file_whackamole_whackamole_db_proto_rawDescData = file_whackamole_whackamole_db_proto_rawDesc +) + +func file_whackamole_whackamole_db_proto_rawDescGZIP() []byte { + file_whackamole_whackamole_db_proto_rawDescOnce.Do(func() { + file_whackamole_whackamole_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_whackamole_whackamole_db_proto_rawDescData) + }) + return file_whackamole_whackamole_db_proto_rawDescData +} + +var file_whackamole_whackamole_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_whackamole_whackamole_db_proto_goTypes = []interface{}{ + (*DBWhackamole)(nil), // 0: DBWhackamole + nil, // 1: DBWhackamole.LevelsEntry +} var file_whackamole_whackamole_db_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 1, // 0: DBWhackamole.levels:type_name -> DBWhackamole.LevelsEntry + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_whackamole_whackamole_db_proto_init() } @@ -41,18 +134,33 @@ func file_whackamole_whackamole_db_proto_init() { if File_whackamole_whackamole_db_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_whackamole_whackamole_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBWhackamole); 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{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_whackamole_whackamole_db_proto_rawDesc, NumEnums: 0, - NumMessages: 0, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, GoTypes: file_whackamole_whackamole_db_proto_goTypes, DependencyIndexes: file_whackamole_whackamole_db_proto_depIdxs, + MessageInfos: file_whackamole_whackamole_db_proto_msgTypes, }.Build() File_whackamole_whackamole_db_proto = out.File file_whackamole_whackamole_db_proto_rawDesc = nil diff --git a/pb/whackamole_msg.pb.go b/pb/whackamole_msg.pb.go index 09998549a..e8b9aaa2c 100644 --- a/pb/whackamole_msg.pb.go +++ b/pb/whackamole_msg.pb.go @@ -20,6 +20,91 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type WhackamoleInfoReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *WhackamoleInfoReq) Reset() { + *x = WhackamoleInfoReq{} + if protoimpl.UnsafeEnabled { + mi := &file_whackamole_whackamole_msg_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WhackamoleInfoReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WhackamoleInfoReq) ProtoMessage() {} + +func (x *WhackamoleInfoReq) ProtoReflect() protoreflect.Message { + mi := &file_whackamole_whackamole_msg_proto_msgTypes[0] + 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 WhackamoleInfoReq.ProtoReflect.Descriptor instead. +func (*WhackamoleInfoReq) Descriptor() ([]byte, []int) { + return file_whackamole_whackamole_msg_proto_rawDescGZIP(), []int{0} +} + +type WhackamoleInfoResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Info *DBWhackamole `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` +} + +func (x *WhackamoleInfoResp) Reset() { + *x = WhackamoleInfoResp{} + if protoimpl.UnsafeEnabled { + mi := &file_whackamole_whackamole_msg_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WhackamoleInfoResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WhackamoleInfoResp) ProtoMessage() {} + +func (x *WhackamoleInfoResp) ProtoReflect() protoreflect.Message { + mi := &file_whackamole_whackamole_msg_proto_msgTypes[1] + 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 WhackamoleInfoResp.ProtoReflect.Descriptor instead. +func (*WhackamoleInfoResp) Descriptor() ([]byte, []int) { + return file_whackamole_whackamole_msg_proto_rawDescGZIP(), []int{1} +} + +func (x *WhackamoleInfoResp) GetInfo() *DBWhackamole { + if x != nil { + return x.Info + } + return nil +} + type WhackamoleAwardReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -31,7 +116,7 @@ type WhackamoleAwardReq struct { func (x *WhackamoleAwardReq) Reset() { *x = WhackamoleAwardReq{} if protoimpl.UnsafeEnabled { - mi := &file_whackamole_whackamole_msg_proto_msgTypes[0] + mi := &file_whackamole_whackamole_msg_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +129,7 @@ func (x *WhackamoleAwardReq) String() string { func (*WhackamoleAwardReq) ProtoMessage() {} func (x *WhackamoleAwardReq) ProtoReflect() protoreflect.Message { - mi := &file_whackamole_whackamole_msg_proto_msgTypes[0] + mi := &file_whackamole_whackamole_msg_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +142,7 @@ func (x *WhackamoleAwardReq) ProtoReflect() protoreflect.Message { // Deprecated: Use WhackamoleAwardReq.ProtoReflect.Descriptor instead. func (*WhackamoleAwardReq) Descriptor() ([]byte, []int) { - return file_whackamole_whackamole_msg_proto_rawDescGZIP(), []int{0} + return file_whackamole_whackamole_msg_proto_rawDescGZIP(), []int{2} } func (x *WhackamoleAwardReq) GetId() int32 { @@ -79,7 +164,7 @@ type WhackamoleAwardResp struct { func (x *WhackamoleAwardResp) Reset() { *x = WhackamoleAwardResp{} if protoimpl.UnsafeEnabled { - mi := &file_whackamole_whackamole_msg_proto_msgTypes[1] + mi := &file_whackamole_whackamole_msg_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -92,7 +177,7 @@ func (x *WhackamoleAwardResp) String() string { func (*WhackamoleAwardResp) ProtoMessage() {} func (x *WhackamoleAwardResp) ProtoReflect() protoreflect.Message { - mi := &file_whackamole_whackamole_msg_proto_msgTypes[1] + mi := &file_whackamole_whackamole_msg_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105,7 +190,7 @@ func (x *WhackamoleAwardResp) ProtoReflect() protoreflect.Message { // Deprecated: Use WhackamoleAwardResp.ProtoReflect.Descriptor instead. func (*WhackamoleAwardResp) Descriptor() ([]byte, []int) { - return file_whackamole_whackamole_msg_proto_rawDescGZIP(), []int{1} + return file_whackamole_whackamole_msg_proto_rawDescGZIP(), []int{3} } func (x *WhackamoleAwardResp) GetId() int32 { @@ -127,15 +212,22 @@ var File_whackamole_whackamole_msg_proto protoreflect.FileDescriptor var file_whackamole_whackamole_msg_proto_rawDesc = []byte{ 0x0a, 0x1f, 0x77, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x2f, 0x77, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x24, 0x0a, - 0x12, 0x57, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x41, 0x77, 0x61, 0x72, 0x64, - 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x46, 0x0a, 0x13, 0x57, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, - 0x65, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, - 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, - 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x1a, 0x1e, 0x77, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x2f, 0x77, 0x68, + 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x13, 0x0a, + 0x11, 0x57, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x22, 0x37, 0x0a, 0x12, 0x57, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x57, 0x68, 0x61, 0x63, 0x6b, + 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x24, 0x0a, 0x12, 0x57, + 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x46, 0x0a, 0x13, 0x57, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x41, + 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, + 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, + 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -150,19 +242,23 @@ func file_whackamole_whackamole_msg_proto_rawDescGZIP() []byte { return file_whackamole_whackamole_msg_proto_rawDescData } -var file_whackamole_whackamole_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_whackamole_whackamole_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_whackamole_whackamole_msg_proto_goTypes = []interface{}{ - (*WhackamoleAwardReq)(nil), // 0: WhackamoleAwardReq - (*WhackamoleAwardResp)(nil), // 1: WhackamoleAwardResp - (*UserAtno)(nil), // 2: UserAtno + (*WhackamoleInfoReq)(nil), // 0: WhackamoleInfoReq + (*WhackamoleInfoResp)(nil), // 1: WhackamoleInfoResp + (*WhackamoleAwardReq)(nil), // 2: WhackamoleAwardReq + (*WhackamoleAwardResp)(nil), // 3: WhackamoleAwardResp + (*DBWhackamole)(nil), // 4: DBWhackamole + (*UserAtno)(nil), // 5: UserAtno } var file_whackamole_whackamole_msg_proto_depIdxs = []int32{ - 2, // 0: WhackamoleAwardResp.award:type_name -> UserAtno - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 4, // 0: WhackamoleInfoResp.info:type_name -> DBWhackamole + 5, // 1: WhackamoleAwardResp.award:type_name -> UserAtno + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_whackamole_whackamole_msg_proto_init() } @@ -170,10 +266,11 @@ func file_whackamole_whackamole_msg_proto_init() { if File_whackamole_whackamole_msg_proto != nil { return } + file_whackamole_whackamole_db_proto_init() file_comm_proto_init() if !protoimpl.UnsafeEnabled { file_whackamole_whackamole_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WhackamoleAwardReq); i { + switch v := v.(*WhackamoleInfoReq); i { case 0: return &v.state case 1: @@ -185,6 +282,30 @@ func file_whackamole_whackamole_msg_proto_init() { } } file_whackamole_whackamole_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WhackamoleInfoResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_whackamole_whackamole_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WhackamoleAwardReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_whackamole_whackamole_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WhackamoleAwardResp); i { case 0: return &v.state @@ -203,7 +324,7 @@ func file_whackamole_whackamole_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_whackamole_whackamole_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 0, },