2025-02-21 18:24:39 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package admin_service;
|
|
|
|
option go_package = "./admin_service";
|
|
|
|
|
|
|
|
message Request {
|
|
|
|
string ping = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Response {
|
|
|
|
string pong = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message GetAppListRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetAppListResponse {
|
|
|
|
repeated AppInfo app_list = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AppInfo {
|
|
|
|
int32 id = 1;
|
2025-03-04 14:43:39 +08:00
|
|
|
int32 type = 2;
|
2025-02-21 18:24:39 +08:00
|
|
|
string app_id = 3;
|
|
|
|
string secret = 4;
|
|
|
|
string remark = 5;
|
|
|
|
float ecpm = 6;
|
|
|
|
uint32 ipu = 7;
|
|
|
|
}
|
|
|
|
|
2025-02-24 18:47:27 +08:00
|
|
|
message CommonResponse {
|
|
|
|
bool success = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteAppRequest {
|
|
|
|
string app_id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AddAppRequest {
|
|
|
|
AppInfo app_info = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AddAppResponse {
|
|
|
|
bool success = 1;
|
|
|
|
}
|
|
|
|
|
2025-03-04 14:43:39 +08:00
|
|
|
message CoverAppRequest {
|
|
|
|
repeated AppInfo app_info = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CoverAppResponse {
|
|
|
|
bool success = 1;
|
|
|
|
}
|
|
|
|
|
2025-02-21 18:24:39 +08:00
|
|
|
service admin_service {
|
|
|
|
rpc Ping(Request) returns(Response);
|
2025-02-24 18:47:27 +08:00
|
|
|
// 获取app列表
|
2025-02-21 18:24:39 +08:00
|
|
|
rpc GetAppList(GetAppListRequest) returns(GetAppListResponse);
|
2025-02-24 18:47:27 +08:00
|
|
|
|
|
|
|
// UpdateOne 修改app数据
|
|
|
|
rpc UpdateOne(AppInfo) returns(CommonResponse);
|
|
|
|
|
|
|
|
// DeleteApp 删除app
|
|
|
|
rpc DeleteApp(DeleteAppRequest) returns(CommonResponse);
|
|
|
|
|
|
|
|
// AddApp 添加app
|
|
|
|
rpc AddApp(AddAppRequest) returns(AddAppResponse);
|
2025-03-04 14:43:39 +08:00
|
|
|
|
|
|
|
// 覆盖app数据
|
|
|
|
rpc CoverApp(CoverAppRequest) returns(CoverAppResponse);
|
2025-02-21 18:24:39 +08:00
|
|
|
}
|