update 【gRPC API】 proto files

This commit is contained in:
社会易姐QwQ
2022-02-02 00:43:56 +08:00
parent 11e00103d2
commit 57f264f996
5 changed files with 3890 additions and 50 deletions

View File

@@ -9,7 +9,25 @@ service Gaia {
// 应用列表上报
rpc ExUploadAppList(GaiaEncryptMsgReq) returns (UploadAppListReply);
// 拉取rsa公钥
rpc ExFetchPublicKey(.google.protobuf.Empty) returns (FetchPublicKeyReply);
rpc ExFetchPublicKey(google.protobuf.Empty) returns (FetchPublicKeyReply);
}
// 待加密的pb对象
message DeviceAppList {
// 上报类型
// first_installation:首次安装上报 first_open:每日启动上报
string source = 1;
// 安装的系统程序列表
repeated string system_app_list = 2;
//安装的用户程序列表
repeated string user_app_list = 3;
}
// 加密方式
enum EncryptType{
INVALID_ENCRYPT_TYPE = 0; // 非法值
CLIENT_AES = 1; // 同客户端人工约定AES加密私钥存储在客户端
SERVER_RSA_AES = 2; // 客户端随机生成一个用于AES加密的私钥并用服务端下发的RSA公钥来加密
}
//
@@ -22,6 +40,7 @@ message FetchPublicKeyReply {
int64 deadline = 3;
}
//
message GaiaDeviceBasicInfo {
//平台&应用信息
string platform = 1; //android/ios/web/h5;
@@ -58,36 +77,14 @@ message GaiaDeviceBasicInfo {
//网络相关的信息
string network = 20; // 网络连接方式, WIFI/CELLULAR/OFFLINE/OTHERNET/ETHERNET "network":"WIFI", ESS_NETWORK_STATE、ACCESS_WIFI_STATE
//string ip = 20;
}
//待加密的pb对象
message DeviceAppList {
// 上报类型
// first_installation:首次安装上报 first_open:每日启动上报
string source = 1;
// 安装的系统程序列表
repeated string system_app_list = 2;
//安装的用户程序列表
repeated string user_app_list = 3;
}
// 加密方式
enum EncryptType{
// 非法值
INVALID_ENCRYPT_TYPE = 0;
// 同客户端人工约定AES加密私钥存储在客户端
CLIENT_AES = 1;
// 客户端随机生成一个用于AES加密的私钥并用服务端下发的RSA公钥来加密
SERVER_RSA_AES = 2;
}
// 负载类型
enum PayloadType {
//非法值
INVALID_PAYLOAD = 0;
//设备app列表对应DeviceAppList
DEVICE_APP_LIST = 1;
// 应用列表上报-请求
message GaiaEncryptMsgReq {
// 上报头部
GaiaMsgHeader header = 1;
// 加密数据
bytes encrypt_payload = 2;
}
// 风控通用消息头
@@ -102,12 +99,10 @@ message GaiaMsgHeader {
int64 ts = 4;
}
// 应用列表上报-请求
message GaiaEncryptMsgReq {
// 上报头部
GaiaMsgHeader header = 1;
// 加密数据
bytes encrypt_payload = 2;
// 负载类型
enum PayloadType {
INVALID_PAYLOAD = 0; //非法值
DEVICE_APP_LIST = 1; //设备app列表对应DeviceAppList
}
// 应用列表上报-响应