增加简化版的创建HTTP网站API

This commit is contained in:
GoEdgeLab
2023-06-18 16:19:52 +08:00
parent 62e43cbc5c
commit 3a9d508508
3 changed files with 1599 additions and 1334 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -14,6 +14,9 @@ service ServerService {
// 创建网站
rpc createServer (CreateServerRequest) returns (CreateServerResponse);
// 快速创建基本的HTTP网站
rpc createBasicHTTPServer(CreateBasicHTTPServerRequest) returns (CreateBasicHTTPServerResponse);
// 修改网站基本信息
rpc updateServerBasic (UpdateServerBasicRequest) returns (RPCSuccess);
@@ -205,7 +208,22 @@ message CreateServerRequest {
}
message CreateServerResponse {
int64 serverId = 1;
int64 serverId = 1; // 所创建的网站ID
}
// 快速创建基本的HTTP网站
message CreateBasicHTTPServerRequest {
int64 nodeClusterId = 1; // 部署的集群ID用户创建时不需要指定此项
int64 userId = 2; // 管理员创建网站时可以指定此用户ID也可以为0表示不指定
repeated string domains = 3; // 域名列表
repeated int64 sslCertIds = 4; // HTTPS用到的证书ID列表
repeated string originAddrs = 5; // 源站地址列表,每一个源站地址需要带协议部分,比如 http://example.com
bool enableWebsocket = 6; // 可选项是否启用Websocket
}
message CreateBasicHTTPServerResponse {
int64 serverId = 1; // 所创建的网站ID
}
// 修改网站基本信息