增加API注释

This commit is contained in:
刘祥超
2023-06-17 21:05:03 +08:00
parent f436763c8d
commit fe9bc332c1
10 changed files with 116 additions and 25 deletions

View File

@@ -35,11 +35,11 @@ type CreateServerRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 可选参数用户ID如果不想指定用户此值可以为0
AdminId int64 `protobuf:"varint,2,opt,name=adminId,proto3" json:"adminId,omitempty"` // 可选参数管理员ID
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 可选用户ID如果不想指定用户此值可以为0
AdminId int64 `protobuf:"varint,2,opt,name=adminId,proto3" json:"adminId,omitempty"` // 可选管理员ID
Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // 类型httpProxyHTTP反向代理一般CDN服务都选这个、httpWeb静态文件服务只会从服务器上读取文件内容不会转发到源站、tcpProxyTCP反向代理、udpProxyUDP反向代理
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // 网站名称,通常可以是一个域名
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` // 可选参数,网站描述
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` // 可选,网站描述
// 配置相关
ServerNamesJSON []byte `protobuf:"bytes,8,opt,name=serverNamesJSON,proto3" json:"serverNamesJSON,omitempty"` // 域名列表 @link json:server_names
// Deprecated: Do not use.
@@ -50,10 +50,10 @@ type CreateServerRequest struct {
TlsJSON []byte `protobuf:"bytes,12,opt,name=tlsJSON,proto3" json:"tlsJSON,omitempty"` // TLS协议当type为tcpProxy时填写 @link json:tls_protocol
UnixJSON []byte `protobuf:"bytes,13,opt,name=unixJSON,proto3" json:"unixJSON,omitempty"` // 备用参数,不用填写
UdpJSON []byte `protobuf:"bytes,14,opt,name=udpJSON,proto3" json:"udpJSON,omitempty"` // UDP协议当type为udpProxy时填写 @link json:udp_protocol
WebId int64 `protobuf:"varint,15,opt,name=webId,proto3" json:"webId,omitempty"` // 可选参数Web配置ID当type为httpProxy或者httpWeb时填写可以通过 /HTTPWebService/createHTTPWeb 接口创建;如果你需要配置缓存等信息时需要在 HTTPWebService 接口操作
ReverseProxyJSON []byte `protobuf:"bytes,16,opt,name=reverseProxyJSON,proto3" json:"reverseProxyJSON,omitempty"` // 反向代理(包含源站)设置
ServerGroupIds []int64 `protobuf:"varint,17,rep,packed,name=serverGroupIds,proto3" json:"serverGroupIds,omitempty"` // 所属网站分组ID列表
UserPlanId int64 `protobuf:"varint,18,opt,name=userPlanId,proto3" json:"userPlanId,omitempty"` // 可选参数套餐ID
WebId int64 `protobuf:"varint,15,opt,name=webId,proto3" json:"webId,omitempty"` // 可选Web配置ID当type为httpProxy或者httpWeb时填写可以通过 /HTTPWebService/createHTTPWeb 接口创建;如果你需要配置缓存等信息时需要在 HTTPWebService 接口操作
ReverseProxyJSON []byte `protobuf:"bytes,16,opt,name=reverseProxyJSON,proto3" json:"reverseProxyJSON,omitempty"` // 反向代理(包含源站)配置引用,此项可以在创建网站后再设置 @link json:reverse_proxy_ref
ServerGroupIds []int64 `protobuf:"varint,17,rep,packed,name=serverGroupIds,proto3" json:"serverGroupIds,omitempty"` // 可选项,所属网站分组ID列表
UserPlanId int64 `protobuf:"varint,18,opt,name=userPlanId,proto3" json:"userPlanId,omitempty"` // 可选套餐ID
NodeClusterId int64 `protobuf:"varint,30,opt,name=nodeClusterId,proto3" json:"nodeClusterId,omitempty"` // 所部署的集群ID
IncludeNodesJSON []byte `protobuf:"bytes,31,opt,name=includeNodesJSON,proto3" json:"includeNodesJSON,omitempty"` // 备用参数,不用填写
ExcludeNodesJSON []byte `protobuf:"bytes,32,opt,name=excludeNodesJSON,proto3" json:"excludeNodesJSON,omitempty"` // 备用参数,不用填写