上传打地鼠代码

This commit is contained in:
liwei1dao 2023-11-20 10:07:37 +08:00
parent 96f801d987
commit 8ded35407c
6 changed files with 361 additions and 36 deletions

View File

@ -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) { func (this *apiComp) Award(session comm.IUserSession, req *pb.WhackamoleAwardReq) (errdata *pb.ErrorData) {
var ( var (
info *pb.DBWhackamole
conf *cfg.GameTDRewardData conf *cfg.GameTDRewardData
atns []*cfg.Gameatn
award []*pb.UserAtno award []*pb.UserAtno
ok bool
err error err error
) )
if errdata = this.AwardCheck(session, req); errdata != nil { if errdata = this.AwardCheck(session, req); errdata != nil {
@ -30,10 +33,23 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.WhackamoleAwardReq
} }
return 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 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}) session.SendMsg(string(this.module.GetType()), "award", &pb.WhackamoleAwardResp{Id: req.Id, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "WhackamoleAwardReq", award) this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "WhackamoleAwardReq", award)

View File

@ -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
}

View File

@ -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
}

View File

@ -18,6 +18,7 @@ type Whackamole struct {
modules.ModuleBase modules.ModuleBase
service comm.IService service comm.IService
api *apiComp api *apiComp
model *modelComp
configure *configureComp configure *configureComp
} }
@ -36,5 +37,6 @@ func (this *Whackamole) Init(service core.IService, module core.IModule, options
func (this *Whackamole) OnInstallComp() { func (this *Whackamole) OnInstallComp() {
this.ModuleBase.OnInstallComp() this.ModuleBase.OnInstallComp()
this.api = this.RegisterComp(new(apiComp)).(*apiComp) this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.model = this.RegisterComp(new(modelComp)).(*modelComp)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp) this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
} }

View File

@ -10,6 +10,7 @@ import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
sync "sync"
) )
const ( const (
@ -19,21 +20,113 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = 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 protoreflect.FileDescriptor
var file_whackamole_whackamole_db_proto_rawDesc = []byte{ var file_whackamole_whackamole_db_proto_rawDesc = []byte{
0x0a, 0x1e, 0x77, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x2f, 0x77, 0x68, 0x61, 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, 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{ var file_whackamole_whackamole_db_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type 1, // 0: DBWhackamole.levels:type_name -> DBWhackamole.LevelsEntry
0, // [0:0] is the sub-list for method input_type 1, // [1:1] is the sub-list for method output_type
0, // [0:0] is the sub-list for extension type_name 1, // [1:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension extendee 1, // [1:1] is the sub-list for extension type_name
0, // [0:0] is the sub-list for field 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() } 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 { if File_whackamole_whackamole_db_proto != nil {
return 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{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_whackamole_whackamole_db_proto_rawDesc, RawDescriptor: file_whackamole_whackamole_db_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 0, NumMessages: 2,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },
GoTypes: file_whackamole_whackamole_db_proto_goTypes, GoTypes: file_whackamole_whackamole_db_proto_goTypes,
DependencyIndexes: file_whackamole_whackamole_db_proto_depIdxs, DependencyIndexes: file_whackamole_whackamole_db_proto_depIdxs,
MessageInfos: file_whackamole_whackamole_db_proto_msgTypes,
}.Build() }.Build()
File_whackamole_whackamole_db_proto = out.File File_whackamole_whackamole_db_proto = out.File
file_whackamole_whackamole_db_proto_rawDesc = nil file_whackamole_whackamole_db_proto_rawDesc = nil

View File

@ -20,6 +20,91 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = 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 { type WhackamoleAwardReq struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -31,7 +116,7 @@ type WhackamoleAwardReq struct {
func (x *WhackamoleAwardReq) Reset() { func (x *WhackamoleAwardReq) Reset() {
*x = WhackamoleAwardReq{} *x = WhackamoleAwardReq{}
if protoimpl.UnsafeEnabled { 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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -44,7 +129,7 @@ func (x *WhackamoleAwardReq) String() string {
func (*WhackamoleAwardReq) ProtoMessage() {} func (*WhackamoleAwardReq) ProtoMessage() {}
func (x *WhackamoleAwardReq) ProtoReflect() protoreflect.Message { 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 { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -57,7 +142,7 @@ func (x *WhackamoleAwardReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use WhackamoleAwardReq.ProtoReflect.Descriptor instead. // Deprecated: Use WhackamoleAwardReq.ProtoReflect.Descriptor instead.
func (*WhackamoleAwardReq) Descriptor() ([]byte, []int) { 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 { func (x *WhackamoleAwardReq) GetId() int32 {
@ -79,7 +164,7 @@ type WhackamoleAwardResp struct {
func (x *WhackamoleAwardResp) Reset() { func (x *WhackamoleAwardResp) Reset() {
*x = WhackamoleAwardResp{} *x = WhackamoleAwardResp{}
if protoimpl.UnsafeEnabled { 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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -92,7 +177,7 @@ func (x *WhackamoleAwardResp) String() string {
func (*WhackamoleAwardResp) ProtoMessage() {} func (*WhackamoleAwardResp) ProtoMessage() {}
func (x *WhackamoleAwardResp) ProtoReflect() protoreflect.Message { 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 { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -105,7 +190,7 @@ func (x *WhackamoleAwardResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use WhackamoleAwardResp.ProtoReflect.Descriptor instead. // Deprecated: Use WhackamoleAwardResp.ProtoReflect.Descriptor instead.
func (*WhackamoleAwardResp) Descriptor() ([]byte, []int) { 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 { 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{ var file_whackamole_whackamole_msg_proto_rawDesc = []byte{
0x0a, 0x1f, 0x77, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x2f, 0x77, 0x68, 0x61, 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, 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, 0x6f, 0x1a, 0x1e, 0x77, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x2f, 0x77, 0x68,
0x12, 0x57, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x41, 0x77, 0x61, 0x72, 0x64, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x13, 0x0a,
0x02, 0x69, 0x64, 0x22, 0x46, 0x0a, 0x13, 0x57, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x11, 0x57, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52,
0x65, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x65, 0x71, 0x22, 0x37, 0x0a, 0x12, 0x57, 0x68, 0x61, 0x63, 0x6b, 0x61, 0x6d, 0x6f, 0x6c, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f,
0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x57, 0x68, 0x61, 0x63, 0x6b,
0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x61, 0x6d, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x24, 0x0a, 0x12, 0x57,
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 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 ( var (
@ -150,19 +242,23 @@ func file_whackamole_whackamole_msg_proto_rawDescGZIP() []byte {
return file_whackamole_whackamole_msg_proto_rawDescData 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{}{ var file_whackamole_whackamole_msg_proto_goTypes = []interface{}{
(*WhackamoleAwardReq)(nil), // 0: WhackamoleAwardReq (*WhackamoleInfoReq)(nil), // 0: WhackamoleInfoReq
(*WhackamoleAwardResp)(nil), // 1: WhackamoleAwardResp (*WhackamoleInfoResp)(nil), // 1: WhackamoleInfoResp
(*UserAtno)(nil), // 2: UserAtno (*WhackamoleAwardReq)(nil), // 2: WhackamoleAwardReq
(*WhackamoleAwardResp)(nil), // 3: WhackamoleAwardResp
(*DBWhackamole)(nil), // 4: DBWhackamole
(*UserAtno)(nil), // 5: UserAtno
} }
var file_whackamole_whackamole_msg_proto_depIdxs = []int32{ var file_whackamole_whackamole_msg_proto_depIdxs = []int32{
2, // 0: WhackamoleAwardResp.award:type_name -> UserAtno 4, // 0: WhackamoleInfoResp.info:type_name -> DBWhackamole
1, // [1:1] is the sub-list for method output_type 5, // 1: WhackamoleAwardResp.award:type_name -> UserAtno
1, // [1:1] is the sub-list for method input_type 2, // [2:2] is the sub-list for method output_type
1, // [1:1] is the sub-list for extension type_name 2, // [2:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension extendee 2, // [2:2] is the sub-list for extension type_name
0, // [0:1] is the sub-list for field 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() } 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 { if File_whackamole_whackamole_msg_proto != nil {
return return
} }
file_whackamole_whackamole_db_proto_init()
file_comm_proto_init() file_comm_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_whackamole_whackamole_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 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: case 0:
return &v.state return &v.state
case 1: 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{} { 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 { switch v := v.(*WhackamoleAwardResp); i {
case 0: case 0:
return &v.state return &v.state
@ -203,7 +324,7 @@ func file_whackamole_whackamole_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_whackamole_whackamole_msg_proto_rawDesc, RawDescriptor: file_whackamole_whackamole_msg_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 2, NumMessages: 4,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },