快速接龙
This commit is contained in:
parent
e47d9cbc27
commit
a747332c71
@ -111,6 +111,7 @@ const (
|
||||
ModuleTurntable core.M_Modules = "turntable" //
|
||||
ModuleVenture core.M_Modules = "venture" //
|
||||
ModuleAchieve core.M_Modules = "achieve" //全局成就
|
||||
ModuleJielong core.M_Modules = "jielong" //
|
||||
)
|
||||
|
||||
// 数据表名定义处
|
||||
@ -381,6 +382,8 @@ const (
|
||||
TableVentureLv = "venturelv"
|
||||
|
||||
TableCaravanRank = "caravansrank"
|
||||
|
||||
TableJielong = "jielong"
|
||||
)
|
||||
|
||||
// RPC服务接口定义处
|
||||
|
20
modules/jielong/api.go
Normal file
20
modules/jielong/api.go
Normal file
@ -0,0 +1,20 @@
|
||||
package jielong
|
||||
|
||||
import (
|
||||
"go_dreamfactory/lego/base"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
)
|
||||
|
||||
type apiComp struct {
|
||||
modules.MCompGate
|
||||
service base.IRPCXService
|
||||
module *Jielong
|
||||
}
|
||||
|
||||
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
_ = this.MCompGate.Init(service, module, comp, options)
|
||||
this.service = service.(base.IRPCXService)
|
||||
this.module = module.(*Jielong)
|
||||
return
|
||||
}
|
23
modules/jielong/api_lvlist.go
Normal file
23
modules/jielong/api_lvlist.go
Normal file
@ -0,0 +1,23 @@
|
||||
package jielong
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
// 参数校验
|
||||
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.JielongGetListReq) (errdata *pb.ErrorData) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// /获取自己的排行榜信息
|
||||
func (this *apiComp) GetList(session comm.IUserSession, req *pb.JielongGetListReq) (errdata *pb.ErrorData) {
|
||||
|
||||
if errdata = this.GetListCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "getlist", &pb.JielongGetListResp{})
|
||||
return
|
||||
}
|
22
modules/jielong/api_lvreward.go
Normal file
22
modules/jielong/api_lvreward.go
Normal file
@ -0,0 +1,22 @@
|
||||
package jielong
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
// 参数校验
|
||||
func (this *apiComp) ResultCheck(session comm.IUserSession, req *pb.JielongResultReq) (errdata *pb.ErrorData) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Result(session comm.IUserSession, req *pb.JielongResultReq) (errdata *pb.ErrorData) {
|
||||
|
||||
if errdata = this.ResultCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "result", &pb.JielongResultResp{})
|
||||
return
|
||||
}
|
66
modules/jielong/configure.go
Normal file
66
modules/jielong/configure.go
Normal file
@ -0,0 +1,66 @@
|
||||
package jielong
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/sys/configure"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
const (
|
||||
game_venturegiflogin = "game_venturegiftslogin.json"
|
||||
game_venturegiftslvaward = "game_venturegiftslvaward.json"
|
||||
)
|
||||
|
||||
type configureComp struct {
|
||||
modules.MCompConfigure
|
||||
module *Jielong
|
||||
}
|
||||
|
||||
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
err = this.MCompConfigure.Init(service, module, comp, options)
|
||||
this.module = module.(*Jielong)
|
||||
err = this.LoadMultiConfigure(map[string]interface{}{
|
||||
game_venturegiflogin: cfg.NewGameVenturegiftsLogin,
|
||||
game_venturegiftslvaward: cfg.NewGameVenturegiftsLvaward,
|
||||
})
|
||||
this.getGameVenturegiftsLogin(1)
|
||||
return
|
||||
}
|
||||
|
||||
//读取配置数据
|
||||
func (this *configureComp) GetConfigure(name string) (v interface{}, err error) {
|
||||
return configure.GetConfigure(name)
|
||||
}
|
||||
func (this *configureComp) getGameVenturegiftsLogin(id int32) (conf *cfg.GameVenturegiftsLoginData, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
ok bool
|
||||
)
|
||||
if v, err = this.GetConfigure(game_venturegiflogin); err != nil {
|
||||
return
|
||||
}
|
||||
if conf, ok = v.(*cfg.GameVenturegiftsLogin).GetDataMap()[id]; !ok {
|
||||
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_venturegiflogin, id)
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *configureComp) getGameVenturegiftsLvReward(id int32) (conf *cfg.GameVenturegiftsLvawardData, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
ok bool
|
||||
)
|
||||
if v, err = this.GetConfigure(game_venturegiftslvaward); err != nil {
|
||||
return
|
||||
}
|
||||
if conf, ok = v.(*cfg.GameVenturegiftsLvaward).GetDataMap()[id]; !ok {
|
||||
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_venturegiftslvaward, id)
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
56
modules/jielong/mode_jielong.go
Normal file
56
modules/jielong/mode_jielong.go
Normal file
@ -0,0 +1,56 @@
|
||||
package jielong
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/mgo"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/x/bsonx"
|
||||
)
|
||||
|
||||
type ModelJielong struct {
|
||||
modules.MCompModel
|
||||
module *Jielong
|
||||
}
|
||||
|
||||
func (this *ModelJielong) 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.TableJielong
|
||||
this.module = module.(*Jielong)
|
||||
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
|
||||
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func (this *ModelJielong) getUserJielongData(uid string) (results *pb.DBJielongData, err error) {
|
||||
results = &pb.DBJielongData{}
|
||||
if err = this.Get(uid, results); err != nil && err != mgo.MongodbNil {
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
}
|
||||
if err == mgo.MongodbNil {
|
||||
results = &pb.DBJielongData{
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Uid: uid,
|
||||
Wincount: 0,
|
||||
Reward: map[int32]int32{},
|
||||
Hisotry: 0,
|
||||
Gotarr: map[int32]int32{},
|
||||
Lasttime: configure.Now().Unix(),
|
||||
}
|
||||
err = this.Add(uid, results)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *ModelJielong) changeJielongData(uid string, data map[string]interface{}) (err error) {
|
||||
|
||||
err = this.Change(uid, data)
|
||||
return
|
||||
}
|
47
modules/jielong/module.go
Normal file
47
modules/jielong/module.go
Normal file
@ -0,0 +1,47 @@
|
||||
package jielong
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
)
|
||||
|
||||
type Jielong struct {
|
||||
modules.ModuleBase
|
||||
service core.IService
|
||||
api *apiComp
|
||||
configure *configureComp
|
||||
|
||||
modelJielong *ModelJielong
|
||||
}
|
||||
|
||||
func NewModule() core.IModule {
|
||||
return &Jielong{}
|
||||
}
|
||||
|
||||
func (this *Jielong) GetType() core.M_Modules {
|
||||
return comm.ModuleJielong
|
||||
}
|
||||
|
||||
func (this *Jielong) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||
if err = this.ModuleBase.Init(service, module, options); err != nil {
|
||||
return
|
||||
}
|
||||
this.service = service
|
||||
return
|
||||
}
|
||||
|
||||
func (this *Jielong) Start() (err error) {
|
||||
if err = this.ModuleBase.Start(); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (this *Jielong) OnInstallComp() {
|
||||
this.ModuleBase.OnInstallComp()
|
||||
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
|
||||
this.modelJielong = this.RegisterComp(new(ModelJielong)).(*ModelJielong)
|
||||
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
||||
}
|
214
pb/jielong_db.pb.go
Normal file
214
pb/jielong_db.pb.go
Normal file
@ -0,0 +1,214 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.20.0
|
||||
// source: jielong/jielong_db.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 快速接龙
|
||||
type DBJielongData struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"`
|
||||
Wincount int32 `protobuf:"varint,3,opt,name=wincount,proto3" json:"wincount"` // 连续胜利次数
|
||||
Reward map[int32]int32 `protobuf:"bytes,4,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
||||
Hisotry int32 `protobuf:"varint,5,opt,name=hisotry,proto3" json:"hisotry"` // 历史最高连胜次数
|
||||
Gotarr map[int32]int32 `protobuf:"bytes,6,rep,name=gotarr,proto3" json:"gotarr" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 历史最高记录奖励
|
||||
Lasttime int64 `protobuf:"varint,7,opt,name=lasttime,proto3" json:"lasttime"`
|
||||
}
|
||||
|
||||
func (x *DBJielongData) Reset() {
|
||||
*x = DBJielongData{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_jielong_jielong_db_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DBJielongData) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DBJielongData) ProtoMessage() {}
|
||||
|
||||
func (x *DBJielongData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_jielong_jielong_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 DBJielongData.ProtoReflect.Descriptor instead.
|
||||
func (*DBJielongData) Descriptor() ([]byte, []int) {
|
||||
return file_jielong_jielong_db_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *DBJielongData) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBJielongData) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBJielongData) GetWincount() int32 {
|
||||
if x != nil {
|
||||
return x.Wincount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBJielongData) GetReward() map[int32]int32 {
|
||||
if x != nil {
|
||||
return x.Reward
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBJielongData) GetHisotry() int32 {
|
||||
if x != nil {
|
||||
return x.Hisotry
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBJielongData) GetGotarr() map[int32]int32 {
|
||||
if x != nil {
|
||||
return x.Gotarr
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBJielongData) GetLasttime() int64 {
|
||||
if x != nil {
|
||||
return x.Lasttime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_jielong_jielong_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_jielong_jielong_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x18, 0x6a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x2f, 0x6a, 0x69, 0x65, 0x6c, 0x6f, 0x6e,
|
||||
0x67, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe1, 0x02, 0x0a, 0x0d, 0x44,
|
||||
0x42, 0x4a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 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, 0x1a,
|
||||
0x0a, 0x08, 0x77, 0x69, 0x6e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x08, 0x77, 0x69, 0x6e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x65,
|
||||
0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x44, 0x42, 0x4a,
|
||||
0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72,
|
||||
0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x68, 0x69, 0x73, 0x6f, 0x74, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x07, 0x68, 0x69, 0x73, 0x6f, 0x74, 0x72, 0x79, 0x12, 0x32, 0x0a, 0x06, 0x67, 0x6f, 0x74, 0x61,
|
||||
0x72, 0x72, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x44, 0x42, 0x4a, 0x69, 0x65,
|
||||
0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x45,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08,
|
||||
0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61,
|
||||
0x72, 0x64, 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, 0x1a, 0x39, 0x0a, 0x0b, 0x47, 0x6f, 0x74, 0x61, 0x72, 0x72, 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_jielong_jielong_db_proto_rawDescOnce sync.Once
|
||||
file_jielong_jielong_db_proto_rawDescData = file_jielong_jielong_db_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_jielong_jielong_db_proto_rawDescGZIP() []byte {
|
||||
file_jielong_jielong_db_proto_rawDescOnce.Do(func() {
|
||||
file_jielong_jielong_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_jielong_jielong_db_proto_rawDescData)
|
||||
})
|
||||
return file_jielong_jielong_db_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_jielong_jielong_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_jielong_jielong_db_proto_goTypes = []interface{}{
|
||||
(*DBJielongData)(nil), // 0: DBJielongData
|
||||
nil, // 1: DBJielongData.RewardEntry
|
||||
nil, // 2: DBJielongData.GotarrEntry
|
||||
}
|
||||
var file_jielong_jielong_db_proto_depIdxs = []int32{
|
||||
1, // 0: DBJielongData.reward:type_name -> DBJielongData.RewardEntry
|
||||
2, // 1: DBJielongData.gotarr:type_name -> DBJielongData.GotarrEntry
|
||||
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_jielong_jielong_db_proto_init() }
|
||||
func file_jielong_jielong_db_proto_init() {
|
||||
if File_jielong_jielong_db_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_jielong_jielong_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBJielongData); 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_jielong_jielong_db_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_jielong_jielong_db_proto_goTypes,
|
||||
DependencyIndexes: file_jielong_jielong_db_proto_depIdxs,
|
||||
MessageInfos: file_jielong_jielong_db_proto_msgTypes,
|
||||
}.Build()
|
||||
File_jielong_jielong_db_proto = out.File
|
||||
file_jielong_jielong_db_proto_rawDesc = nil
|
||||
file_jielong_jielong_db_proto_goTypes = nil
|
||||
file_jielong_jielong_db_proto_depIdxs = nil
|
||||
}
|
455
pb/jielong_msg.pb.go
Normal file
455
pb/jielong_msg.pb.go
Normal file
@ -0,0 +1,455 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.20.0
|
||||
// source: jielong/jielong_msg.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type JielongGetListReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *JielongGetListReq) Reset() {
|
||||
*x = JielongGetListReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_jielong_jielong_msg_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *JielongGetListReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*JielongGetListReq) ProtoMessage() {}
|
||||
|
||||
func (x *JielongGetListReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_jielong_jielong_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 JielongGetListReq.ProtoReflect.Descriptor instead.
|
||||
func (*JielongGetListReq) Descriptor() ([]byte, []int) {
|
||||
return file_jielong_jielong_msg_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type JielongGetListResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBJielongData `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *JielongGetListResp) Reset() {
|
||||
*x = JielongGetListResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_jielong_jielong_msg_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *JielongGetListResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*JielongGetListResp) ProtoMessage() {}
|
||||
|
||||
func (x *JielongGetListResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_jielong_jielong_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 JielongGetListResp.ProtoReflect.Descriptor instead.
|
||||
func (*JielongGetListResp) Descriptor() ([]byte, []int) {
|
||||
return file_jielong_jielong_msg_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *JielongGetListResp) GetData() *DBJielongData {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 接龙结果
|
||||
type JielongResultReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Bwin bool `protobuf:"varint,1,opt,name=bwin,proto3" json:"bwin"` // true 胜利
|
||||
}
|
||||
|
||||
func (x *JielongResultReq) Reset() {
|
||||
*x = JielongResultReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_jielong_jielong_msg_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *JielongResultReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*JielongResultReq) ProtoMessage() {}
|
||||
|
||||
func (x *JielongResultReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_jielong_jielong_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 JielongResultReq.ProtoReflect.Descriptor instead.
|
||||
func (*JielongResultReq) Descriptor() ([]byte, []int) {
|
||||
return file_jielong_jielong_msg_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *JielongResultReq) GetBwin() bool {
|
||||
if x != nil {
|
||||
return x.Bwin
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type JielongResultResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBJielongData `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *JielongResultResp) Reset() {
|
||||
*x = JielongResultResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_jielong_jielong_msg_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *JielongResultResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*JielongResultResp) ProtoMessage() {}
|
||||
|
||||
func (x *JielongResultResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_jielong_jielong_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 JielongResultResp.ProtoReflect.Descriptor instead.
|
||||
func (*JielongResultResp) Descriptor() ([]byte, []int) {
|
||||
return file_jielong_jielong_msg_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *JielongResultResp) GetData() *DBJielongData {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type JielongRewardReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Cur bool `protobuf:"varint,1,opt,name=cur,proto3" json:"cur"`
|
||||
}
|
||||
|
||||
func (x *JielongRewardReq) Reset() {
|
||||
*x = JielongRewardReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_jielong_jielong_msg_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *JielongRewardReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*JielongRewardReq) ProtoMessage() {}
|
||||
|
||||
func (x *JielongRewardReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_jielong_jielong_msg_proto_msgTypes[4]
|
||||
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 JielongRewardReq.ProtoReflect.Descriptor instead.
|
||||
func (*JielongRewardReq) Descriptor() ([]byte, []int) {
|
||||
return file_jielong_jielong_msg_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *JielongRewardReq) GetCur() bool {
|
||||
if x != nil {
|
||||
return x.Cur
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type JielongRewardResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBJielongData `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *JielongRewardResp) Reset() {
|
||||
*x = JielongRewardResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_jielong_jielong_msg_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *JielongRewardResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*JielongRewardResp) ProtoMessage() {}
|
||||
|
||||
func (x *JielongRewardResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_jielong_jielong_msg_proto_msgTypes[5]
|
||||
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 JielongRewardResp.ProtoReflect.Descriptor instead.
|
||||
func (*JielongRewardResp) Descriptor() ([]byte, []int) {
|
||||
return file_jielong_jielong_msg_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *JielongRewardResp) GetData() *DBJielongData {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_jielong_jielong_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_jielong_jielong_msg_proto_rawDesc = []byte{
|
||||
0x0a, 0x19, 0x6a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x2f, 0x6a, 0x69, 0x65, 0x6c, 0x6f, 0x6e,
|
||||
0x67, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6a, 0x69, 0x65,
|
||||
0x6c, 0x6f, 0x6e, 0x67, 0x2f, 0x6a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x64, 0x62, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x13, 0x0a, 0x11, 0x4a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67,
|
||||
0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x38, 0x0a, 0x12, 0x4a, 0x69,
|
||||
0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x22, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e,
|
||||
0x2e, 0x44, 0x42, 0x4a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04,
|
||||
0x64, 0x61, 0x74, 0x61, 0x22, 0x26, 0x0a, 0x10, 0x4a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x52,
|
||||
0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x77, 0x69, 0x6e,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x62, 0x77, 0x69, 0x6e, 0x22, 0x37, 0x0a, 0x11,
|
||||
0x4a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x12, 0x22, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x0e, 0x2e, 0x44, 0x42, 0x4a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52,
|
||||
0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x24, 0x0a, 0x10, 0x4a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67,
|
||||
0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x75, 0x72,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x63, 0x75, 0x72, 0x22, 0x37, 0x0a, 0x11, 0x4a,
|
||||
0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x22, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e,
|
||||
0x2e, 0x44, 0x42, 0x4a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04,
|
||||
0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_jielong_jielong_msg_proto_rawDescOnce sync.Once
|
||||
file_jielong_jielong_msg_proto_rawDescData = file_jielong_jielong_msg_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_jielong_jielong_msg_proto_rawDescGZIP() []byte {
|
||||
file_jielong_jielong_msg_proto_rawDescOnce.Do(func() {
|
||||
file_jielong_jielong_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_jielong_jielong_msg_proto_rawDescData)
|
||||
})
|
||||
return file_jielong_jielong_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_jielong_jielong_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_jielong_jielong_msg_proto_goTypes = []interface{}{
|
||||
(*JielongGetListReq)(nil), // 0: JielongGetListReq
|
||||
(*JielongGetListResp)(nil), // 1: JielongGetListResp
|
||||
(*JielongResultReq)(nil), // 2: JielongResultReq
|
||||
(*JielongResultResp)(nil), // 3: JielongResultResp
|
||||
(*JielongRewardReq)(nil), // 4: JielongRewardReq
|
||||
(*JielongRewardResp)(nil), // 5: JielongRewardResp
|
||||
(*DBJielongData)(nil), // 6: DBJielongData
|
||||
}
|
||||
var file_jielong_jielong_msg_proto_depIdxs = []int32{
|
||||
6, // 0: JielongGetListResp.data:type_name -> DBJielongData
|
||||
6, // 1: JielongResultResp.data:type_name -> DBJielongData
|
||||
6, // 2: JielongRewardResp.data:type_name -> DBJielongData
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_jielong_jielong_msg_proto_init() }
|
||||
func file_jielong_jielong_msg_proto_init() {
|
||||
if File_jielong_jielong_msg_proto != nil {
|
||||
return
|
||||
}
|
||||
file_jielong_jielong_db_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_jielong_jielong_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*JielongGetListReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_jielong_jielong_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*JielongGetListResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_jielong_jielong_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*JielongResultReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_jielong_jielong_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*JielongResultResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_jielong_jielong_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*JielongRewardReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_jielong_jielong_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*JielongRewardResp); 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_jielong_jielong_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_jielong_jielong_msg_proto_goTypes,
|
||||
DependencyIndexes: file_jielong_jielong_msg_proto_depIdxs,
|
||||
MessageInfos: file_jielong_jielong_msg_proto_msgTypes,
|
||||
}.Build()
|
||||
File_jielong_jielong_msg_proto = out.File
|
||||
file_jielong_jielong_msg_proto_rawDesc = nil
|
||||
file_jielong_jielong_msg_proto_goTypes = nil
|
||||
file_jielong_jielong_msg_proto_depIdxs = nil
|
||||
}
|
Loading…
Reference in New Issue
Block a user