mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-01-03 09:36:35 +08:00
完善API注释
This commit is contained in:
@@ -11,7 +11,7 @@ import "models/model_user_plan.proto";
|
||||
|
||||
// 网站服务相关服务
|
||||
service ServerService {
|
||||
// 创建服务
|
||||
// 创建网站
|
||||
rpc createServer (CreateServerRequest) returns (CreateServerResponse);
|
||||
|
||||
// 修改服务基本信息
|
||||
@@ -177,31 +177,31 @@ service ServerService {
|
||||
rpc copyServerConfig(CopyServerConfigRequest) returns (RPCSuccess);
|
||||
}
|
||||
|
||||
// 创建服务
|
||||
// 创建网站
|
||||
message CreateServerRequest {
|
||||
int64 userId = 1;
|
||||
int64 adminId = 2;
|
||||
string type = 3;
|
||||
string name = 4;
|
||||
string description = 5;
|
||||
int64 userId = 1; // 可选参数,用户ID,如果不想指定用户,此值可以为0
|
||||
int64 adminId = 2; // 可选参数,管理员ID
|
||||
string type = 3; // 类型:httpProxy(HTTP反向代理,一般CDN服务都选这个)、httpWeb(静态文件服务,只会从服务器上读取文件内容,不会转发到源站)、tcpProxy(TCP反向代理)、udpProxy(UDP反向代理)
|
||||
string name = 4; // 网站名称,通常可以是一个域名
|
||||
string description = 5; // 可选参数,网站描述
|
||||
|
||||
// 配置相关
|
||||
bytes serverNamesJSON = 8; // @link json:server_names
|
||||
bytes serverNamesJSON = 8; // 域名列表 @link json:server_names
|
||||
bytes serverNamesJON = 19 [deprecated = true]; // 已过期,请使用 serverNamesJSON 代替
|
||||
bytes httpJSON = 9;
|
||||
bytes httpsJSON = 10;
|
||||
bytes tcpJSON = 11;
|
||||
bytes tlsJSON = 12;
|
||||
bytes unixJSON = 13;
|
||||
bytes udpJSON = 14;
|
||||
int64 webId = 15;
|
||||
bytes reverseProxyJSON = 16;
|
||||
repeated int64 serverGroupIds = 17;
|
||||
int64 userPlanId = 18;
|
||||
bytes httpJSON = 9; // HTTP协议,当type为httpProxy或者httpWeb时填写 @link json:http_protocol
|
||||
bytes httpsJSON = 10; // HTTPS协议,当type为httpProxy或者httpWeb时填写 @link json:https_protocol
|
||||
bytes tcpJSON = 11; // TCP协议,当type为tcpProxy时填写 @link json:tcp_protocol
|
||||
bytes tlsJSON = 12; // TLS协议,当type为tcpProxy时填写 @link json:tls_protocol
|
||||
bytes unixJSON = 13; // 备用参数,不用填写
|
||||
bytes udpJSON = 14; // UDP协议,当type为udpProxy时填写 @link json:udp_protocol
|
||||
int64 webId = 15; // 可选参数,Web配置ID,当type为httpProxy或者httpWeb时填写,可以通过 /HTTPWebService/createHTTPWeb 接口创建;如果你需要配置缓存等信息时需要在 HTTPWebService 接口操作
|
||||
bytes reverseProxyJSON = 16; // 反向代理(包含源站)设置
|
||||
repeated int64 serverGroupIds = 17; // 所属网站分组ID列表
|
||||
int64 userPlanId = 18; // 可选参数,套餐ID
|
||||
|
||||
int64 nodeClusterId = 30;
|
||||
bytes includeNodesJSON = 31;
|
||||
bytes excludeNodesJSON = 32;
|
||||
int64 nodeClusterId = 30; // 所部署的集群ID
|
||||
bytes includeNodesJSON = 31; // 备用参数,不用填写
|
||||
bytes excludeNodesJSON = 32; // 备用参数,不用填写
|
||||
}
|
||||
|
||||
message CreateServerResponse {
|
||||
|
||||
@@ -7,55 +7,55 @@ import "models/rpc_messages.proto";
|
||||
|
||||
// SSL/TLS策略管理服务
|
||||
service SSLPolicyService {
|
||||
// 创建Policy
|
||||
// 创建策略
|
||||
rpc createSSLPolicy (CreateSSLPolicyRequest) returns (CreateSSLPolicyResponse);
|
||||
|
||||
// 修改Policy
|
||||
// 修改策略
|
||||
rpc updateSSLPolicy (UpdateSSLPolicyRequest) returns (RPCSuccess);
|
||||
|
||||
// 查找Policy
|
||||
// 查找策略
|
||||
rpc findEnabledSSLPolicyConfig (FindEnabledSSLPolicyConfigRequest) returns (FindEnabledSSLPolicyConfigResponse);
|
||||
}
|
||||
|
||||
// 创建Policy
|
||||
// 创建策略
|
||||
message CreateSSLPolicyRequest {
|
||||
bool http2Enabled = 1; // 是否启用HTTP/2
|
||||
bool http3Enabled = 10; // 是否启用HTTP/3(在满足条件的基础上)
|
||||
string minVersion = 2; // 支持的最低SSL版本
|
||||
bytes sslCertsJSON = 3; // 证书内容
|
||||
bytes hstsJSON = 4; // HSTS配置
|
||||
int32 clientAuthType = 5; //
|
||||
bytes clientCACertsJSON = 6; // CA证书内容
|
||||
repeated string cipherSuites = 7; // 自定义加密套件
|
||||
bool cipherSuitesIsOn = 8; // 是否启用自定义加密套件
|
||||
bool ocspIsOn = 9; // 是否启用OCSP
|
||||
bool http2Enabled = 1; // 可选项,是否启用HTTP/2
|
||||
bool http3Enabled = 10; // 可选项,是否启用HTTP/3(在满足条件的基础上)
|
||||
string minVersion = 2; // 支持的最低SSL版本,可选择值: SSL 3.0, TLS 1.0, TLS 1.1, TLS 1.2, TLS 1.3
|
||||
bytes sslCertsJSON = 3; // 可选项,关联的证书信息,可以在创建后再通过修改策略来配置 @link json:ssl_cert_refs
|
||||
bytes hstsJSON = 4; // 可选项,HSTS配置 @link json:hsts
|
||||
int32 clientAuthType = 5; // 可选项,客户端校验类型:0 无需证书,1 需要客户端证书,2 需要任一客户端证书,3 如果客户端上传了证书才校验,4 需要客户端证书而且需要校验
|
||||
bytes clientCACertsJSON = 6; // 可选项,CA证书内容
|
||||
repeated string cipherSuites = 7; // 可选项,自定义加密套件
|
||||
bool cipherSuitesIsOn = 8; // 可选项,是否启用自定义加密套件
|
||||
bool ocspIsOn = 9; // 可选项,是否启用OCSP
|
||||
}
|
||||
|
||||
message CreateSSLPolicyResponse {
|
||||
int64 sslPolicyId = 1;
|
||||
int64 sslPolicyId = 1; // 创建的策略ID
|
||||
}
|
||||
|
||||
// 修改Policy
|
||||
// 修改策略
|
||||
message UpdateSSLPolicyRequest {
|
||||
int64 sslPolicyId = 1;
|
||||
bool http2Enabled = 2;
|
||||
bool http3Enabled = 11; // 是否启用HTTP/3(在满足条件的基础上)
|
||||
string minVersion = 3;
|
||||
bytes sslCertsJSON = 4;
|
||||
bytes hstsJSON = 5;
|
||||
int32 clientAuthType = 6;
|
||||
bytes clientCACertsJSON = 7;
|
||||
repeated string cipherSuites = 8;
|
||||
bool cipherSuitesIsOn = 9;
|
||||
bool ocspIsOn = 10;
|
||||
int64 sslPolicyId = 1; // 策略ID
|
||||
bool http2Enabled = 2; // 可选项,是否启用HTTP/2
|
||||
bool http3Enabled = 11; // 可选项,是否启用HTTP/3(在满足条件的基础上)
|
||||
string minVersion = 3; // 支持的最低SSL版本,可选择值: SSL 3.0, TLS 1.0, TLS 1.1, TLS 1.2, TLS 1.3
|
||||
bytes sslCertsJSON = 4; // 关联的证书信息 @link json:ssl_cert_refs
|
||||
bytes hstsJSON = 5; // 可选项,HSTS配置 @link json:hsts
|
||||
int32 clientAuthType = 6; // 可选项,客户端校验类型:0 无需证书,1 需要客户端证书,2 需要任一客户端证书,3 如果客户端上传了证书才校验,4 需要客户端证书而且需要校验
|
||||
bytes clientCACertsJSON = 7; // 可选项,CA证书内容
|
||||
repeated string cipherSuites = 8; // 可选项,自定义加密套件
|
||||
bool cipherSuitesIsOn = 9; // 可选项,是否启用自定义加密套件
|
||||
bool ocspIsOn = 10; // 可选项,是否启用OCSP
|
||||
}
|
||||
|
||||
// 查找Policy
|
||||
// 查找策略
|
||||
message FindEnabledSSLPolicyConfigRequest {
|
||||
int64 sslPolicyId = 1; // SSL策略ID
|
||||
bool ignoreData = 2; // 忽略证书内容数据
|
||||
bool ignoreData = 2; // 是否忽略证书内容数据
|
||||
}
|
||||
|
||||
message FindEnabledSSLPolicyConfigResponse {
|
||||
bytes sslPolicyJSON = 1;
|
||||
bytes sslPolicyJSON = 1; // 策略配置信息
|
||||
}
|
||||
Reference in New Issue
Block a user