娃娃机etcd配置

This commit is contained in:
by 2024-08-29 11:32:55 +08:00
parent 14b78495f6
commit 46c68b9785
10 changed files with 270 additions and 88 deletions

View File

@ -39,4 +39,6 @@ const (
ETCDKEY_RANK_TYPE = "/game/RankType" // 排行榜奖励配置
ETCDKEY_AWARD_CONFIG = "/game/awardlog_config" //获奖记录
ETCDKEY_GUIDE = "/game/guide_config" //新手引导配置
ETCDKEY_MACHINE = "/game/machine_config" //娃娃机配置
)

View File

@ -24,6 +24,8 @@ func init() {
etcd.Register(etcd.ETCDKEY_ChannelSwitch, webapi.ChannelSwitchConfig{}, platformConfigEtcd)
// 皮肤配置
etcd.Register(etcd.ETCDKEY_SKin, webapi.SkinConfig{}, platformConfigEtcd)
// 娃娃机配置
etcd.Register(etcd.ETCDKEY_MACHINE, webapi.MachineConfig{}, platformConfigEtcd)
}
func platformConfigEtcd(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
@ -41,6 +43,8 @@ func platformConfigEtcd(ctx context.Context, completeKey string, isInit bool, ev
ConfigMgrInst.GetConfig(d.Platform).ChannelSwitch[d.GetTp()] = d
case *webapi.SkinConfig:
ConfigMgrInst.GetConfig(d.Platform).SkinConfig = d
case *webapi.MachineConfig:
ConfigMgrInst.GetConfig(d.Platform).MachineConfig = d
default:
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
}

View File

@ -2755,3 +2755,12 @@ func (this *Scene) TryRelease() {
this.Destroy(true)
}
}
func (this *Scene) GetMachineServerSecret(Appid int64, platform string) string {
config := ConfigMgrInst.GetConfig(platform).MachineConfig
for _, info := range config.Info {
if info.AppId == Appid {
return info.ServerSecret
}
}
return ""
}

View File

@ -93,7 +93,6 @@ func (h *CSGetTokenHandler) Process(s *netlib.Session, packetid int, data interf
pack := &machine.SMGetToken{}
pack.Snid = p.SnId
pack.AppId = msg.Appid
pack.ServerSecret = msg.ServerSecret
scene := p.GetScene()
if scene == nil {
return nil
@ -102,6 +101,12 @@ func (h *CSGetTokenHandler) Process(s *netlib.Session, packetid int, data interf
if !ok {
return nil
}
serverSecret := sceneEx.GetMachineServerSecret(msg.Appid, p.Platform)
logger.Logger.Tracef("获取娃娃机serverSecret = %v", serverSecret)
if serverSecret == "" {
return nil
}
pack.ServerSecret = serverSecret
sceneEx.SendToMachine(int(machine.DollMachinePacketID_PACKET_SMGetToken), pack)
}
return nil

View File

@ -135,6 +135,8 @@ type AllConfig struct {
*webapi.AwardLogConfig
// 新手引导配置
*webapi.GuideConfig
//娃娃机配置
*webapi.MachineConfig
}
type GlobalConfig struct {

View File

@ -818,8 +818,7 @@ type CSCLAWDOLLGetToken struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Appid int64 `protobuf:"varint,1,opt,name=Appid,proto3" json:"Appid,omitempty"`
ServerSecret string `protobuf:"bytes,2,opt,name=serverSecret,proto3" json:"serverSecret,omitempty"`
Appid int64 `protobuf:"varint,1,opt,name=Appid,proto3" json:"Appid,omitempty"`
}
func (x *CSCLAWDOLLGetToken) Reset() {
@ -861,13 +860,6 @@ func (x *CSCLAWDOLLGetToken) GetAppid() int64 {
return 0
}
func (x *CSCLAWDOLLGetToken) GetServerSecret() string {
if x != nil {
return x.ServerSecret
}
return ""
}
type SCCLAWDOLLSendToken struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -995,49 +987,47 @@ var file_clawdoll_proto_rawDesc = []byte{
0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x29, 0x0a,
0x15, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61, 0x79, 0x65,
0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x50, 0x6f, 0x73, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x03, 0x50, 0x6f, 0x73, 0x22, 0x4e, 0x0a, 0x12, 0x43, 0x53, 0x43, 0x4c,
0x01, 0x28, 0x05, 0x52, 0x03, 0x50, 0x6f, 0x73, 0x22, 0x2a, 0x0a, 0x12, 0x43, 0x53, 0x43, 0x4c,
0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14,
0x0a, 0x05, 0x41, 0x70, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x41,
0x70, 0x70, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65,
0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x2b, 0x0a, 0x13, 0x53, 0x43, 0x43, 0x4c,
0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
0x14, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2a, 0x8c, 0x03, 0x0a, 0x10, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f,
0x4c, 0x4c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x5a, 0x45,
0x52, 0x4f, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x49,
0x4e, 0x46, 0x4f, 0x10, 0xe1, 0x2b, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x43, 0x53, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x50, 0x4c, 0x41,
0x59, 0x45, 0x52, 0x4f, 0x50, 0x10, 0xe2, 0x2b, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x50,
0x4c, 0x41, 0x59, 0x45, 0x52, 0x4f, 0x50, 0x10, 0xe3, 0x2b, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c,
0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0xe4, 0x2b, 0x12, 0x22, 0x0a,
0x1d, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44,
0x4f, 0x4c, 0x4c, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x42, 0x49, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0xe5,
0x2b, 0x12, 0x23, 0x0a, 0x1e, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43,
0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x45, 0x6e,
0x74, 0x65, 0x72, 0x10, 0xe6, 0x2b, 0x12, 0x23, 0x0a, 0x1e, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x50, 0x6c, 0x61,
0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x10, 0xe7, 0x2b, 0x12, 0x22, 0x0a, 0x1d, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c,
0x4c, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xe8, 0x2b, 0x12,
0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x43, 0x4c, 0x41,
0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x47, 0x45, 0x54, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0xe9,
0x2b, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43,
0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x54, 0x4f, 0x4b, 0x45,
0x4e, 0x10, 0xea, 0x2b, 0x2a, 0x64, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63,
0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45,
0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x43,
0x6f, 0x69, 0x6e, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x02, 0x12, 0x1a,
0x0a, 0x16, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x50, 0x6f, 0x73, 0x41, 0x6c, 0x52, 0x65, 0x61, 0x64,
0x79, 0x50, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x10, 0x03, 0x42, 0x28, 0x5a, 0x26, 0x6d, 0x6f,
0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61,
0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x6c, 0x61, 0x77,
0x64, 0x6f, 0x6c, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x70, 0x70, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x13, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f,
0x4c, 0x4c, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x54,
0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x2a, 0x8c, 0x03, 0x0a, 0x10, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x61,
0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00,
0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c,
0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x49, 0x4e, 0x46, 0x4f, 0x10,
0xe1, 0x2b, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f,
0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4f,
0x50, 0x10, 0xe2, 0x2b, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45,
0x52, 0x4f, 0x50, 0x10, 0xe3, 0x2b, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x52, 0x4f, 0x4f,
0x4d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0xe4, 0x2b, 0x12, 0x22, 0x0a, 0x1d, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f,
0x47, 0x41, 0x4d, 0x45, 0x42, 0x49, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0xe5, 0x2b, 0x12, 0x23, 0x0a,
0x1e, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44,
0x4f, 0x4c, 0x4c, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x10,
0xe6, 0x2b, 0x12, 0x23, 0x0a, 0x1e, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f,
0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c,
0x65, 0x61, 0x76, 0x65, 0x10, 0xe7, 0x2b, 0x12, 0x22, 0x0a, 0x1d, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x50, 0x4c,
0x41, 0x59, 0x45, 0x52, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xe8, 0x2b, 0x12, 0x20, 0x0a, 0x1b, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c,
0x4c, 0x5f, 0x47, 0x45, 0x54, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0xe9, 0x2b, 0x12, 0x21, 0x0a,
0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44,
0x4f, 0x4c, 0x4c, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0xea, 0x2b,
0x2a, 0x64, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65,
0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72,
0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x43, 0x6f, 0x69, 0x6e, 0x4e,
0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x50,
0x52, 0x43, 0x5f, 0x50, 0x6f, 0x73, 0x41, 0x6c, 0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x6c, 0x61,
0x79, 0x69, 0x6e, 0x67, 0x10, 0x03, 0x42, 0x28, 0x5a, 0x26, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e,
0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, 0x6c,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -108,7 +108,6 @@ message SCCLAWDOLLPlayerLeave {
//token
message CSCLAWDOLLGetToken {
int64 Appid = 1;
string serverSecret = 2;
}
message SCCLAWDOLLSendToken {

View File

@ -8137,6 +8137,126 @@ func (x *GuideConfig) GetSkip() int32 {
return 0
}
//娃娃机配置视频
// etcd /game/machine_config
type MachineConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台
Info []*MachineInfo `protobuf:"bytes,2,rep,name=Info,proto3" json:"Info,omitempty"`
}
func (x *MachineConfig) Reset() {
*x = MachineConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[86]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MachineConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MachineConfig) ProtoMessage() {}
func (x *MachineConfig) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[86]
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 MachineConfig.ProtoReflect.Descriptor instead.
func (*MachineConfig) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{86}
}
func (x *MachineConfig) GetPlatform() string {
if x != nil {
return x.Platform
}
return ""
}
func (x *MachineConfig) GetInfo() []*MachineInfo {
if x != nil {
return x.Info
}
return nil
}
type MachineInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MachineId int32 `protobuf:"varint,1,opt,name=MachineId,proto3" json:"MachineId,omitempty"` //娃娃机Id
AppId int64 `protobuf:"varint,2,opt,name=AppId,proto3" json:"AppId,omitempty"`
ServerSecret string `protobuf:"bytes,3,opt,name=ServerSecret,proto3" json:"ServerSecret,omitempty"`
}
func (x *MachineInfo) Reset() {
*x = MachineInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[87]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MachineInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MachineInfo) ProtoMessage() {}
func (x *MachineInfo) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[87]
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 MachineInfo.ProtoReflect.Descriptor instead.
func (*MachineInfo) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{87}
}
func (x *MachineInfo) GetMachineId() int32 {
if x != nil {
return x.MachineId
}
return 0
}
func (x *MachineInfo) GetAppId() int64 {
if x != nil {
return x.AppId
}
return 0
}
func (x *MachineInfo) GetServerSecret() string {
if x != nil {
return x.ServerSecret
}
return ""
}
var File_common_proto protoreflect.FileDescriptor
var file_common_proto_rawDesc = []byte{
@ -9421,10 +9541,21 @@ var file_common_proto_rawDesc = []byte{
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12,
0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4f, 0x6e, 0x12,
0x12, 0x0a, 0x04, 0x53, 0x6b, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53,
0x6b, 0x69, 0x70, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d,
0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
0x6b, 0x69, 0x70, 0x22, 0x54, 0x0a, 0x0d, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x43, 0x6f,
0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
0x12, 0x27, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13,
0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x65, 0x0a, 0x0b, 0x4d, 0x61, 0x63,
0x68, 0x69, 0x6e, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x61, 0x63, 0x68,
0x69, 0x6e, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x61, 0x63,
0x68, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x49, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x41, 0x70, 0x70, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c,
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74,
0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -9439,7 +9570,7 @@ func file_common_proto_rawDescGZIP() []byte {
return file_common_proto_rawDescData
}
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 96)
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 98)
var file_common_proto_goTypes = []interface{}{
(*MysqlDbSetting)(nil), // 0: webapi.MysqlDbSetting
(*MongoDbSetting)(nil), // 1: webapi.MongoDbSetting
@ -9527,32 +9658,34 @@ var file_common_proto_goTypes = []interface{}{
(*AwardLogInfo)(nil), // 83: webapi.AwardLogInfo
(*AnnouncerLogInfo)(nil), // 84: webapi.AnnouncerLogInfo
(*GuideConfig)(nil), // 85: webapi.GuideConfig
nil, // 86: webapi.Platform.BindTelRewardEntry
nil, // 87: webapi.PlayerData.RankScoreEntry
nil, // 88: webapi.ItemShop.AwardEntry
nil, // 89: webapi.VIPcfg.AwardEntry
nil, // 90: webapi.VIPcfg.Privilege1Entry
nil, // 91: webapi.VIPcfg.Privilege7Entry
nil, // 92: webapi.VIPcfg.Privilege9Entry
nil, // 93: webapi.ActInviteConfig.PayScoreEntry
nil, // 94: webapi.SkinLevel.UpItemEntry
nil, // 95: webapi.SkinItem.UnlockParamEntry
(*server.DB_GameFree)(nil), // 96: server.DB_GameFree
(*server.DB_GameItem)(nil), // 97: server.DB_GameItem
(*MachineConfig)(nil), // 86: webapi.MachineConfig
(*MachineInfo)(nil), // 87: webapi.MachineInfo
nil, // 88: webapi.Platform.BindTelRewardEntry
nil, // 89: webapi.PlayerData.RankScoreEntry
nil, // 90: webapi.ItemShop.AwardEntry
nil, // 91: webapi.VIPcfg.AwardEntry
nil, // 92: webapi.VIPcfg.Privilege1Entry
nil, // 93: webapi.VIPcfg.Privilege7Entry
nil, // 94: webapi.VIPcfg.Privilege9Entry
nil, // 95: webapi.ActInviteConfig.PayScoreEntry
nil, // 96: webapi.SkinLevel.UpItemEntry
nil, // 97: webapi.SkinItem.UnlockParamEntry
(*server.DB_GameFree)(nil), // 98: server.DB_GameFree
(*server.DB_GameItem)(nil), // 99: server.DB_GameItem
}
var file_common_proto_depIdxs = []int32{
2, // 0: webapi.Platform.Leaderboard:type_name -> webapi.RankSwitch
3, // 1: webapi.Platform.ClubConfig:type_name -> webapi.ClubConfig
4, // 2: webapi.Platform.ThirdGameMerchant:type_name -> webapi.ThirdGame
86, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
88, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
6, // 4: webapi.GameConfigGlobal.GameStatus:type_name -> webapi.GameStatus
96, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree
98, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree
8, // 6: webapi.PlatformGameConfig.DbGameFrees:type_name -> webapi.GameFree
0, // 7: webapi.PlatformDbConfig.Mysql:type_name -> webapi.MysqlDbSetting
1, // 8: webapi.PlatformDbConfig.MongoDb:type_name -> webapi.MongoDbSetting
1, // 9: webapi.PlatformDbConfig.MongoDbLog:type_name -> webapi.MongoDbSetting
96, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
87, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
98, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
89, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
32, // 12: webapi.PlayerData.Items:type_name -> webapi.ItemInfo
14, // 13: webapi.PlayerData.RoleUnlockList:type_name -> webapi.ModInfo
14, // 14: webapi.PlayerData.PetUnlockList:type_name -> webapi.ModInfo
@ -9565,7 +9698,7 @@ var file_common_proto_depIdxs = []int32{
32, // 21: webapi.ExchangeShop.Items:type_name -> webapi.ItemInfo
25, // 22: webapi.ExchangeShopList.List:type_name -> webapi.ExchangeShop
29, // 23: webapi.ExchangeShopList.Weight:type_name -> webapi.ShopWeight
88, // 24: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
90, // 24: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
30, // 25: webapi.ItemShopList.List:type_name -> webapi.ItemShop
32, // 26: webapi.MatchInfoAward.ItemId:type_name -> webapi.ItemInfo
33, // 27: webapi.GameMatchDate.Award:type_name -> webapi.MatchInfoAward
@ -9586,14 +9719,14 @@ var file_common_proto_depIdxs = []int32{
38, // 42: webapi.WelfareSpree.Item:type_name -> webapi.WelfareDate
48, // 43: webapi.WelfareFirstPayDataList.List:type_name -> webapi.WelfareSpree
48, // 44: webapi.WelfareContinuousPayDataList.List:type_name -> webapi.WelfareSpree
89, // 45: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
90, // 46: webapi.VIPcfg.Privilege1:type_name -> webapi.VIPcfg.Privilege1Entry
91, // 47: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
92, // 48: webapi.VIPcfg.Privilege9:type_name -> webapi.VIPcfg.Privilege9Entry
91, // 45: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
92, // 46: webapi.VIPcfg.Privilege1:type_name -> webapi.VIPcfg.Privilege1Entry
93, // 47: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
94, // 48: webapi.VIPcfg.Privilege9:type_name -> webapi.VIPcfg.Privilege9Entry
51, // 49: webapi.VIPcfgDataList.List:type_name -> webapi.VIPcfg
38, // 50: webapi.ChessRankConfig.Item:type_name -> webapi.WelfareDate
55, // 51: webapi.ChessRankcfgData.Datas:type_name -> webapi.ChessRankConfig
93, // 52: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry
95, // 52: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry
62, // 53: webapi.ActInviteConfig.Awards1:type_name -> webapi.RankAward
62, // 54: webapi.ActInviteConfig.Awards2:type_name -> webapi.RankAward
62, // 55: webapi.ActInviteConfig.Awards3:type_name -> webapi.RankAward
@ -9610,22 +9743,23 @@ var file_common_proto_depIdxs = []int32{
69, // 66: webapi.DiamondLotteryData.Info:type_name -> webapi.DiamondLotteryInfo
70, // 67: webapi.DiamondLotteryData.Players:type_name -> webapi.DiamondLotteryPlayers
72, // 68: webapi.DiamondLotteryConfig.LotteryData:type_name -> webapi.DiamondLotteryData
97, // 69: webapi.ItemConfig.Items:type_name -> server.DB_GameItem
99, // 69: webapi.ItemConfig.Items:type_name -> server.DB_GameItem
32, // 70: webapi.RankAwardInfo.Item:type_name -> webapi.ItemInfo
75, // 71: webapi.RankTypeInfo.Award:type_name -> webapi.RankAwardInfo
76, // 72: webapi.RankTypeConfig.Info:type_name -> webapi.RankTypeInfo
94, // 73: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry
95, // 74: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry
96, // 73: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry
97, // 74: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry
78, // 75: webapi.SkinItem.Levels:type_name -> webapi.SkinLevel
79, // 76: webapi.SkinConfig.Items:type_name -> webapi.SkinItem
82, // 77: webapi.AwardLogConfig.AwardLog:type_name -> webapi.AwardLogData
84, // 78: webapi.AwardLogConfig.AnnouncerLog:type_name -> webapi.AnnouncerLogInfo
83, // 79: webapi.AwardLogData.AwardLog:type_name -> webapi.AwardLogInfo
80, // [80:80] is the sub-list for method output_type
80, // [80:80] is the sub-list for method input_type
80, // [80:80] is the sub-list for extension type_name
80, // [80:80] is the sub-list for extension extendee
0, // [0:80] is the sub-list for field type_name
87, // 80: webapi.MachineConfig.Info:type_name -> webapi.MachineInfo
81, // [81:81] is the sub-list for method output_type
81, // [81:81] is the sub-list for method input_type
81, // [81:81] is the sub-list for extension type_name
81, // [81:81] is the sub-list for extension extendee
0, // [0:81] is the sub-list for field type_name
}
func init() { file_common_proto_init() }
@ -10666,6 +10800,30 @@ func file_common_proto_init() {
return nil
}
}
file_common_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MachineConfig); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_common_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MachineInfo); 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{
@ -10673,7 +10831,7 @@ func file_common_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_common_proto_rawDesc,
NumEnums: 0,
NumMessages: 96,
NumMessages: 98,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -889,4 +889,16 @@ message GuideConfig {
string Platform = 1; //
int32 On = 2; // 1 2
int32 Skip = 3; // 1 2
}
//
// etcd /game/machine_config
message MachineConfig{
string Platform = 1; //
repeated MachineInfo Info = 2;
}
message MachineInfo{
int32 MachineId = 1; //Id
int64 AppId = 2;
string ServerSecret = 3;
}

View File

@ -969,3 +969,4 @@ message WindowsInfo{
int32 PartNum = 4;//
int32 GainNum = 5;//
}