vue_dreamfactory/src/pb/proto/comm.proto
2022-07-26 13:56:02 +08:00

96 lines
2.1 KiB
Protocol Buffer

syntax = "proto3";
option go_package = ".;pb";
import "errorcode.proto";
import "google/protobuf/any.proto";
//用户消息流结构1
message UserMessage {
string MainType = 1; //用户消息处理 模块名 例如:user 对应项目中 user的模块
string SubType = 2; //用户消息处理函数名 例如:login 对应项目中 user的模块中
// api_login 的处理函数
google.protobuf.Any data = 3;
string sec = 4; //密文
}
//代理用户转发消息结构
message AgentMessage {
string Ip = 1;
string UserSessionId = 2;
string UserId = 3;
string ServiceTag = 4;
string GatewayServiceId = 5;
string MainType = 6;
string SubType = 7;
google.protobuf.Any Message = 8;
}
// RPC 服务固定回复结构
message RPCMessageReply {
ErrorCode Code = 1;
string ErrorMessage = 2;
google.protobuf.Any ErrorData = 3;
repeated UserMessage Reply = 4;
}
//用户代理绑定Uid请求
message AgentBuildReq {
string UserSessionId = 1;
string UserId = 2;
string WorkerId = 3;
}
//用户代理解绑请求
message AgentUnBuildReq { string UserSessionId = 1; }
//向用户代理发送消息请求
message AgentSendMessageReq {
string UserSessionId = 1;
repeated UserMessage Reply = 2;
}
//发送批量消息
message BatchMessageReq {
repeated string UserSessionIds = 1;
string MainType = 2;
string SubType = 3;
google.protobuf.Any Data = 4;
}
//发送广播消息
message BroadCastMessageReq {
string MainType = 1; //服务名
string SubType = 2;
google.protobuf.Any Data = 3;
}
//关闭用户代理
message AgentCloseeReq { string UserSessionId = 1; }
//通知用户离线
message NoticeUserCloseReq {
string Ip = 1;
string UserSessionId = 2;
string UserId = 3;
string ServiceTag = 4;
string GatewayServiceId = 5;
}
//英雄属性类型
enum HeroAttributesType {
Hp = 0; //血量
Atk = 1; //攻击
Def = 2; //防御
Speed = 3; //速度
Crit = 4; //暴击
}
//用户资产数据 对标*cfg.Game_atn 数据结构
message UserAssets {
string A = 1;
string T = 2;
int32 N = 3;
}
message TaskParam {
int32 first = 1; //限定条件
int32 second = 2; //次数
}