refactor: reorganize modules and add Linux build tooling
This commit is contained in:
67
module/base/initial/proto/check.proto
Normal file
67
module/base/initial/proto/check.proto
Normal file
@@ -0,0 +1,67 @@
|
||||
syntax = "proto3";
|
||||
package initial;
|
||||
option go_package = ".;initial";
|
||||
|
||||
|
||||
|
||||
// initial-检测是否有新版或新的配置
|
||||
service Check{
|
||||
|
||||
// HELLO
|
||||
rpc Hello(Crc) returns (StatusReply){}
|
||||
|
||||
// 获取应用的相关配置信息
|
||||
rpc Config(ConfigRequest) returns (ConfigReply) {}
|
||||
|
||||
// 检查更新
|
||||
rpc Updates(CheckForUpdatesRequest) returns (CheckForUpdatesReply) {}
|
||||
|
||||
|
||||
}
|
||||
|
||||
message Crc{
|
||||
string code = 1;
|
||||
}
|
||||
|
||||
message StatusReply{
|
||||
int32 code=1; // 状态码
|
||||
string message=2; // 状态说明
|
||||
string details=3; // 数据
|
||||
int64 timeseq=4; // 响应时间序列
|
||||
}
|
||||
|
||||
|
||||
|
||||
message ConfigRequest {
|
||||
string app = 1; // 应用程序名称 <必填>
|
||||
string os = 2; // 操作系统 <必填>
|
||||
}
|
||||
|
||||
message ConfigReply {
|
||||
repeated ConfigItem data=1; // 配置参数列表
|
||||
}
|
||||
|
||||
|
||||
message ConfigItem {
|
||||
string Identity=1; //唯一标识
|
||||
string key=2; //配置键
|
||||
string value=3; //配置值
|
||||
int64 version=4; //版本号
|
||||
}
|
||||
|
||||
|
||||
message CheckForUpdatesRequest {
|
||||
string app = 1; // 应用程序名称 <必填>
|
||||
string os = 2; // 操作系统 <必填>
|
||||
string arch = 3; // 构架名称 <必填>
|
||||
string version = 4; // 版本号 <必填>
|
||||
}
|
||||
|
||||
|
||||
message CheckForUpdatesReply {
|
||||
string identity = 1; // 唯一码
|
||||
string version = 2; // 版本号
|
||||
string summary = 3; // 更析说明
|
||||
string files = 4; // 更新文件以及文件hash
|
||||
string pubdate =5; // 发布时间
|
||||
}
|
||||
78
module/base/initial/proto/data.proto
Normal file
78
module/base/initial/proto/data.proto
Normal file
@@ -0,0 +1,78 @@
|
||||
syntax = "proto3";
|
||||
package initial;
|
||||
option go_package = ".;initial";
|
||||
|
||||
|
||||
// initial-数据
|
||||
service Data{
|
||||
rpc Country(Empty) returns (CountryReply) {}
|
||||
|
||||
// 系统区域数据,默认级别:市
|
||||
rpc Areas(AreasRequest) returns (AreasReply) {}
|
||||
|
||||
// 系统数据
|
||||
rpc Datas(Empty) returns (DatasReply) {}
|
||||
|
||||
}
|
||||
|
||||
|
||||
message Empty{
|
||||
}
|
||||
|
||||
message CountryReply {
|
||||
repeated CountryItem countries=1;
|
||||
}
|
||||
|
||||
message CountryItem {
|
||||
uint32 id =1;
|
||||
string Iso2=2;
|
||||
string Iso3=3;
|
||||
string num_code=4;
|
||||
string phone_code=5;
|
||||
string currency=6;
|
||||
string currency_symbol=7;
|
||||
string region=8;
|
||||
string timezones=9;
|
||||
string translations=10;
|
||||
string name=11;
|
||||
string local_name=12;
|
||||
bool enabled=13;
|
||||
int32 sort_order=14;
|
||||
}
|
||||
|
||||
message AreasRequest {
|
||||
// 国家ID,默认:中国 1
|
||||
int32 country_id = 1;
|
||||
// 国家代码,默认:中国 CN
|
||||
string country_code = 2;
|
||||
// 是否输出乡镇,默认:市级
|
||||
bool show_town = 3;
|
||||
}
|
||||
|
||||
|
||||
message AreasReply {
|
||||
repeated AreasItem areas=1;
|
||||
}
|
||||
|
||||
message AreasItem {
|
||||
string id =1;
|
||||
string pid=2;
|
||||
int32 deep=3;
|
||||
string name=4;
|
||||
string pinyin_prefix=5;
|
||||
string pinyin=6;
|
||||
string ext_id=7;
|
||||
string ext_name=8;
|
||||
}
|
||||
message DatasReply {
|
||||
repeated DatasItem datas=1;
|
||||
}
|
||||
|
||||
message DatasItem {
|
||||
int64 id =1;
|
||||
string data_type=2;
|
||||
string key=3;
|
||||
string title=4;
|
||||
string remark=5;
|
||||
string icon=6;
|
||||
}
|
||||
Reference in New Issue
Block a user