mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-02-22 09:25:36 +08:00
增加API注释
This commit is contained in:
@@ -15293,7 +15293,7 @@
|
||||
},
|
||||
{
|
||||
"name": "CreateOriginResponse",
|
||||
"code": "message CreateOriginResponse {\n\tint64 originId = 1;\n}",
|
||||
"code": "message CreateOriginResponse {\n\tint64 originId = 1; // 创建的源站ID\n}",
|
||||
"doc": ""
|
||||
},
|
||||
{
|
||||
@@ -15328,7 +15328,7 @@
|
||||
},
|
||||
{
|
||||
"name": "CreateReverseProxyRequest",
|
||||
"code": "message CreateReverseProxyRequest {\n\tbytes schedulingJSON = 1;\n\tbytes primaryOriginsJSON = 2;\n\tbytes backupOriginsJSON = 3;\n}",
|
||||
"code": "message CreateReverseProxyRequest {\n\tbytes schedulingJSON = 1; // 可选项,调度设置 @link json:scheduling\n\tbytes primaryOriginsJSON = 2; // 可选项,主要源站 @link json:origin_refs\n\tbytes backupOriginsJSON = 3; // 可选项,备用源站 @link json:origin_refs\n}",
|
||||
"doc": "创建反向代理"
|
||||
},
|
||||
{
|
||||
@@ -15388,7 +15388,7 @@
|
||||
},
|
||||
{
|
||||
"name": "CreateServerRequest",
|
||||
"code": "message CreateServerRequest {\n\tint64 userId = 1; // 可选参数,用户ID,如果不想指定用户,此值可以为0\n\tint64 adminId = 2; // 可选参数,管理员ID\n\tstring type = 3; // 类型:httpProxy(HTTP反向代理,一般CDN服务都选这个)、httpWeb(静态文件服务,只会从服务器上读取文件内容,不会转发到源站)、tcpProxy(TCP反向代理)、udpProxy(UDP反向代理)\n\tstring name = 4; // 网站名称,通常可以是一个域名\n\tstring description = 5; // 可选参数,网站描述\n\n\t// 配置相关\n\tbytes serverNamesJSON = 8; // 域名列表 @link json:server_names\n\tbytes serverNamesJON = 19 [deprecated = true]; // 已过期,请使用 serverNamesJSON 代替\n\tbytes httpJSON = 9; // HTTP协议,当type为httpProxy或者httpWeb时填写 @link json:http_protocol\n\tbytes httpsJSON = 10; // HTTPS协议,当type为httpProxy或者httpWeb时填写 @link json:https_protocol\n\tbytes tcpJSON = 11; // TCP协议,当type为tcpProxy时填写 @link json:tcp_protocol\n\tbytes tlsJSON = 12; // TLS协议,当type为tcpProxy时填写 @link json:tls_protocol\n\tbytes unixJSON = 13; // 备用参数,不用填写\n\tbytes udpJSON = 14; // UDP协议,当type为udpProxy时填写 @link json:udp_protocol\n\tint64 webId = 15; // 可选参数,Web配置ID,当type为httpProxy或者httpWeb时填写,可以通过 /HTTPWebService/createHTTPWeb 接口创建;如果你需要配置缓存等信息时需要在 HTTPWebService 接口操作\n\tbytes reverseProxyJSON = 16; // 反向代理(包含源站)设置\n\trepeated int64 serverGroupIds = 17; // 所属网站分组ID列表\n\tint64 userPlanId = 18; // 可选参数,套餐ID\n\n\tint64 nodeClusterId = 30; // 所部署的集群ID\n\tbytes includeNodesJSON = 31; // 备用参数,不用填写\n\tbytes excludeNodesJSON = 32; // 备用参数,不用填写\n}",
|
||||
"code": "message CreateServerRequest {\n\tint64 userId = 1; // 可选项,用户ID,如果不想指定用户,此值可以为0\n\tint64 adminId = 2; // 可选项,管理员ID\n\tstring type = 3; // 类型:httpProxy(HTTP反向代理,一般CDN服务都选这个)、httpWeb(静态文件服务,只会从服务器上读取文件内容,不会转发到源站)、tcpProxy(TCP反向代理)、udpProxy(UDP反向代理)\n\tstring name = 4; // 网站名称,通常可以是一个域名\n\tstring description = 5; // 可选项,网站描述\n\n\t// 配置相关\n\tbytes serverNamesJSON = 8; // 域名列表 @link json:server_names\n\tbytes serverNamesJON = 19 [deprecated = true]; // 已过期,请使用 serverNamesJSON 代替\n\tbytes httpJSON = 9; // HTTP协议,当type为httpProxy或者httpWeb时填写 @link json:http_protocol\n\tbytes httpsJSON = 10; // HTTPS协议,当type为httpProxy或者httpWeb时填写 @link json:https_protocol\n\tbytes tcpJSON = 11; // TCP协议,当type为tcpProxy时填写 @link json:tcp_protocol\n\tbytes tlsJSON = 12; // TLS协议,当type为tcpProxy时填写 @link json:tls_protocol\n\tbytes unixJSON = 13; // 备用参数,不用填写\n\tbytes udpJSON = 14; // UDP协议,当type为udpProxy时填写 @link json:udp_protocol\n\tint64 webId = 15; // 可选项,Web配置ID,当type为httpProxy或者httpWeb时填写,可以通过 /HTTPWebService/createHTTPWeb 接口创建;如果你需要配置缓存等信息时需要在 HTTPWebService 接口操作\n\tbytes reverseProxyJSON = 16; // 反向代理(包含源站)配置引用,此项可以在创建网站后再设置 @link json:reverse_proxy_ref\n\trepeated int64 serverGroupIds = 17; // 可选项,所属网站分组ID列表\n\tint64 userPlanId = 18; // 可选项,套餐ID\n\n\tint64 nodeClusterId = 30; // 所部署的集群ID\n\tbytes includeNodesJSON = 31; // 备用参数,不用填写\n\tbytes excludeNodesJSON = 32; // 备用参数,不用填写\n}",
|
||||
"doc": "创建网站"
|
||||
},
|
||||
{
|
||||
@@ -22863,6 +22863,18 @@
|
||||
"name": "json:https_protocol",
|
||||
"content": "# HTTPS协议配置\n\n## 定义\n~~~json\n{\n\t\"isOn\": \"是否启用\",\n \t\"listen\": [\n {\n\t\t\"protocol\": \"协议\",\n\t\t\"host\": \"主机地址,通常为空\",\n\t\t\"portRange\": \"端口或者端口范围\"\n\t },\n\t ...\n\t],\n \t\"sslPolicyRef\": {\n\t \"isOn\": \"启用SSL策略\",\n\t \"sslPolicyId\": \"SSL策略ID\"\n\t}\n}\n~~~\n\n其中 `SSL策略ID` 通过 `/SSLPolicyService/createSSLPolicy` 接口创建。\n\n## 示例\n\n### 监听443端口\n~~~json\n{\n \"isOn\": true,\n \"listen\": [\n {\n \"protocol\": \"https\",\n \"host\": \"\",\n \"portRange\": \"443\"\n\t}\n ],\n \"sslPolicyRef\": {\n \"isOn\": true,\n \"sslPolicyId\": 123\n }\n}\n~~~\n\n其中SSL策略ID `123` 通过 `/SSLPolicyService/createSSLPolicy` 接口创建。\n\n### 监听443和8443端口\n~~~json\n{\n \"isOn\": true,\n \"listen\": [\n {\n \"protocol\": \"https\",\n \"portRange\": \"443\"\n\t},\n {\n \"protocol\": \"https\",\n \"portRange\": \"8443\"\n\t}\n ],\n \"sslPolicyRef\": {\n \"isOn\": true,\n \"sslPolicyId\": 123\n }\n}\n~~~\n\n其中SSL策略ID `123` 通过 `/SSLPolicyService/createSSLPolicy` 接口创建。"
|
||||
},
|
||||
{
|
||||
"name": "json:origin_refs",
|
||||
"content": "# 源站引用列表\n\n## 定义\n~~~json\n[\n {\n\t\"isOn\": \"是否启用\",\n\t\"originId\": \"源站ID 1\"\n },\n {\n \"isOn\": \"是否启用\",\n \"originId\": \"源站ID 2\"\n },\n ...\n]\n~~~\n\n其中:\n* `originId` - 源站ID,可以通过 `/OriginService/createOrigin` 接口创建源站后获得\n\n## 示例\n~~~json\n[\n {\n\t\"isOn\": true,\n\t\"originId\": 1\n },\n {\n \"isOn\": true,\n \"originId\": 2,\n }\n]\n~~~"
|
||||
},
|
||||
{
|
||||
"name": "json:reverse_proxy_ref",
|
||||
"content": "# 反向代理引用\n## 定义\n~~~json\n{\n \"isOn\": \"是否启用\",\n \"isPrior\": \"是否覆盖上级配置,用于路由规则\",\n \"reverseProxyId\": \"反向代理ID\"\n}\n~~~\n其中:\n* `reverseProxyId` - 反向代理ID,可以通过 `/ReverseProxyService/createReverseProxy` 创建\n\n## 示例\n~~~json\n{\n \"isOn\": true,\n \"reverseProxyId\": 123\n}\n~~~"
|
||||
},
|
||||
{
|
||||
"name": "json:scheduling",
|
||||
"content": "# 反向代理调度\n## 定义\n~~~json\n{\n\t\"code\": \"调度方法代号\",\n \"options\": \"调度选项\"\n}\n~~~\n\n其中:\n* `code` 调度方法代号\n * `random` - 随机\n * `roundRobin` - 轮询\n * `hash` - Hash算法\n * `key` - 自定义Key,可以使用请求变量,比如 `${remoteAddr}`\n * `sticky` - Sticky算法\n * `type` - 类型:cookie、header、argument\n * `param` - 参数值\n\n\n## 示例\n~~~json\n{\n \"code\": \"random\",\n \"options\": null\n}\n~~~"
|
||||
},
|
||||
{
|
||||
"name": "json:server_name",
|
||||
"content": "# 域名信息\n\n## 示例\n~~~json\n{\n \"name\": \"example.com\",\n \"type\": \"full\"\n}\n~~~"
|
||||
|
||||
Reference in New Issue
Block a user