印度包网
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

132 lines
3.7 KiB

syntax = "proto3";
package pb;
option go_package = "../../pb";
// 通用消息
message CommonResponse{
uint32 result = 1; // 0:成功
}
/*静态服务定义:这里定义的静态服务,如果是具体游戏,则是动态值*/
enum ServerType
{
ServerTypeInvalid = 0; // 无效
ServerTypeGate = 1000; // 网关服务
ServerTypeCommon = 1100; // 通用服务
ServerTypeCrash = 3000; // 小火箭游戏
}
/***************************************网关消息开始*******************************************/
enum ServerGateReq{
GateInvalidReq = 0; // 无效网关消息
GateLoginReq = 1; // 登录请求:LoginRequest
GateLogoutReq = 2; // 登录请求:LoginRequest
GatePingReq = 3; // 请求心跳
}
enum ServerGateResp{
GateInvalidResp = 0; // 无效网关消息
GateLoginResp = 1; // 登录返回:LoginResponse
GateLogoutResp = 2; // 返回注销
GateRepeatResp = 3; // 返回重复登录
GatePingResp = 4; // 返回心跳
}
// 登录请求 :这个登录请求的command可能有多个,但是返回取都是一样的
message LoginRequest{
uint32 user_id = 1; // UID
string token = 2; // Token
}
// 登录返回
message LoginResponse{
uint32 result = 1; // 0 成功;1 userId错误(用户不存在)
uint32 user_id = 2; // UID:这个地方必定和请求中的uid一致,但是为了方便客户端异步处理,把UID返回了
}
// 红点
message RedPoint{
uint32 Mail = 1;
}
enum ConfigChangeType{
ConfigINVALID = 0; // 无效
ConfigPay = 1; // 充值配置变动
ConfigActivity = 2; // 活动配置变动
ConfigWithdraw = 3; // 代付配置变动
ConfigGame = 4; // 游戏开关相关配置变动
ConfigVipLevel = 5; // vip等级变动
ConfigExcel = 6; // 配置表变动
}
// 配置变动
message ConfigChangeResp{
ConfigChangeType Type = 1; // 变动配置的类型
}
// 活动获得物品
message ActivityResp{
int64 ActivityID = 1; // 活动id
repeated ActivityItem ActivityItems = 2;
}
message ActivityItem{
uint32 Type = 1; // 物品类型
uint32 Num = 2; // 物品数量
}
/****************************************网关消息结束************************************************/
/****************************************通用平台类消息开始**********************************************/
enum ServerCommonReq{
CommonInvalidReq = 0;
CommonPlayerBalanceReq = 1; // 返回用户余额 PlayerBalanceReq
}
enum ServerCommonResp{
CommonInvalidResp = 0;
CommonPlayerBalanceResp = 1; // 返回用户余额 PlayerBalanceResp
CommonRedPointResp = 2; // 红点推送 RedPoint
CommonConfigChangeResp = 3; // 配置变动通知 ConfigChangeResp
CommonActivityItemResp = 4; // 活动获得物品通知 ActivityResp
CommonVipResp = 5; // 活动获得物品通知 ActivityResp
CommonBroadcastResp = 6; // 广播
}
// 获取用户余额
message PlayerBalanceReq{
int64 Type = 1; // 货币类型
}
// 获取用户余额返回
message PlayerBalanceResp{
int64 Type = 1; // 货币类型
int64 Balance = 2; // 余额
int64 Event = 3; // 事件
int64 Value = 4; // 变化的值
string Exs1 = 5; // 产生金币变化的描述
string Exs2 = 6; // 充值的时候代表订单号
}
message BroadcastMsg{
string Content = 1;
uint32 Priority = 2;
int64 Loop = 3; // 重复次数
int64 Interval = 4; // 时间间隔
}
// 物品键值对
message CurrencyPair {
int64 Type = 1;
int64 Value = 2;
}
// 商品
message Product {
uint32 ProductID = 1;
repeated CurrencyPair Rewards = 2; // 充值获得的物品
int64 Amount = 3; // 充值的金额
}