阶段性提交
This commit is contained in:
14
pkg/rpc/protos/model_http_gzip.proto
Normal file
14
pkg/rpc/protos/model_http_gzip.proto
Normal file
@@ -0,0 +1,14 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "model_size_capacity.proto";
|
||||
|
||||
message HTTPGzip {
|
||||
int64 id = 1;
|
||||
bool isOn = 2;
|
||||
int32 level = 3;
|
||||
SizeCapacity minLength = 4;
|
||||
SizeCapacity maxLength = 5;
|
||||
}
|
||||
@@ -5,5 +5,7 @@ package pb;
|
||||
|
||||
message HTTPWeb {
|
||||
int64 id = 1;
|
||||
string root = 2;
|
||||
bool isOn = 2;
|
||||
string root = 3;
|
||||
int64 gzipId = 4;
|
||||
}
|
||||
9
pkg/rpc/protos/model_size_capacity.proto
Normal file
9
pkg/rpc/protos/model_size_capacity.proto
Normal file
@@ -0,0 +1,9 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
message SizeCapacity {
|
||||
int64 count = 1;
|
||||
string unit = 2;
|
||||
}
|
||||
49
pkg/rpc/protos/service_http_gzip.proto
Normal file
49
pkg/rpc/protos/service_http_gzip.proto
Normal file
@@ -0,0 +1,49 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "model_size_capacity.proto";
|
||||
|
||||
service HTTPGzipService {
|
||||
// 创建Gzip配置
|
||||
rpc createHTTPGzip (CreateHTTPGzipRequest) returns (CreateHTTPGzipResponse);
|
||||
|
||||
// 查找Gzip配置
|
||||
rpc findEnabledHTTPGzipConfig (FindEnabledGzipConfigRequest) returns (FindEnabledGzipConfigResponse);
|
||||
|
||||
// 修改Gzip配置
|
||||
rpc updateHTTPGzip (UpdateHTTPGzipRequest) returns (UpdateHTTPGzipResponse);
|
||||
}
|
||||
|
||||
// 创建Gzip配置
|
||||
message CreateHTTPGzipRequest {
|
||||
int32 level = 1;
|
||||
SizeCapacity minLength = 2;
|
||||
SizeCapacity maxLength = 3;
|
||||
}
|
||||
|
||||
message CreateHTTPGzipResponse {
|
||||
int64 gzipId = 1;
|
||||
}
|
||||
|
||||
// 查找Gzip配置
|
||||
message FindEnabledGzipConfigRequest {
|
||||
int64 gzipId = 1;
|
||||
}
|
||||
|
||||
message FindEnabledGzipConfigResponse {
|
||||
bytes config = 1;
|
||||
}
|
||||
|
||||
// 修改Gzip配置
|
||||
message UpdateHTTPGzipRequest {
|
||||
int64 gzipId = 1;
|
||||
int32 level = 2;
|
||||
SizeCapacity minLength = 3;
|
||||
SizeCapacity maxLength = 4;
|
||||
}
|
||||
|
||||
message UpdateHTTPGzipResponse {
|
||||
|
||||
}
|
||||
@@ -12,8 +12,11 @@ service HTTPWebService {
|
||||
// 查找Web配置
|
||||
rpc findEnabledHTTPWeb (FindEnabledHTTPWebRequest) returns (FindEnabledHTTPWebResponse);
|
||||
|
||||
// 更新Web配置
|
||||
// 更改Web配置
|
||||
rpc updateHTTPWeb (UpdateHTTPWebRequest) returns (UpdateHTTPWebResponse);
|
||||
|
||||
// 更改Gzip配置
|
||||
rpc updateHTTPWebGzip (UpdateHTTPWebGzipRequest) returns (UpdateHTTPWebGzipResponse);
|
||||
}
|
||||
|
||||
// 创建Web配置
|
||||
@@ -34,7 +37,7 @@ message FindEnabledHTTPWebResponse {
|
||||
HTTPWeb web = 1;
|
||||
}
|
||||
|
||||
// 更新Web配置
|
||||
// 更改Web配置
|
||||
message UpdateHTTPWebRequest {
|
||||
int64 webId = 1;
|
||||
string root = 2;
|
||||
@@ -42,4 +45,14 @@ message UpdateHTTPWebRequest {
|
||||
|
||||
message UpdateHTTPWebResponse {
|
||||
|
||||
}
|
||||
|
||||
// 更改Gzip配置
|
||||
message UpdateHTTPWebGzipRequest {
|
||||
int64 webId = 1;
|
||||
int64 gzipId = 2;
|
||||
}
|
||||
|
||||
message UpdateHTTPWebGzipResponse {
|
||||
|
||||
}
|
||||
@@ -23,6 +23,9 @@ service ReverseProxyService {
|
||||
|
||||
// 修改备用源站信息
|
||||
rpc updateReverseProxyBackupOrigins (UpdateReverseProxyBackupOriginsRequest) returns (UpdateReverseProxyBackupOriginsResponse);
|
||||
|
||||
// 修改是否启用
|
||||
rpc updateReverseProxyIsOn (UpdateReverseProxyIsOnRequest) returns (UpdateReverseProxyIsOnResponse);
|
||||
}
|
||||
|
||||
// 创建反向代理
|
||||
@@ -82,4 +85,14 @@ message UpdateReverseProxyBackupOriginsRequest {
|
||||
|
||||
message UpdateReverseProxyBackupOriginsResponse {
|
||||
|
||||
}
|
||||
|
||||
// 修改是否启用
|
||||
message UpdateReverseProxyIsOnRequest {
|
||||
int64 reverseProxyId = 1;
|
||||
bool isOn = 2;
|
||||
}
|
||||
|
||||
message UpdateReverseProxyIsOnResponse {
|
||||
|
||||
}
|
||||
@@ -54,7 +54,10 @@ service ServerService {
|
||||
rpc findEnabledServerType (FindEnabledServerTypeRequest) returns (FindEnabledServerTypeResponse);
|
||||
|
||||
// 查找反向代理设置
|
||||
rpc findServerReverseProxy (FindServerReverseProxyRequest) returns (FindServerReverseProxyResponse);
|
||||
rpc findServerReverseProxyConfig (FindServerReverseProxyConfigRequest) returns (FindServerReverseProxyConfigResponse);
|
||||
|
||||
// 初始化Web设置
|
||||
rpc initServerWeb (InitServerWebRequest) returns (InitServerWebResponse);
|
||||
}
|
||||
|
||||
// 创建服务
|
||||
@@ -226,10 +229,19 @@ message FindEnabledServerTypeResponse {
|
||||
}
|
||||
|
||||
// 查找反向代理设置
|
||||
message FindServerReverseProxyRequest {
|
||||
message FindServerReverseProxyConfigRequest {
|
||||
int64 serverId = 1;
|
||||
}
|
||||
|
||||
message FindServerReverseProxyResponse {
|
||||
message FindServerReverseProxyConfigResponse {
|
||||
bytes config = 1;
|
||||
}
|
||||
|
||||
// 初始化Web设置
|
||||
message InitServerWebRequest {
|
||||
int64 serverId = 1;
|
||||
}
|
||||
|
||||
message InitServerWebResponse {
|
||||
int64 webId = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user