Files
pyGoEdge-UserPanel/reference/goedge 文档/NodeGroupService.md
2025-11-18 03:36:49 +08:00

217 lines
3.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# NodeGroupService
> 节点分组服务
---
## createNodeGroup
> 创建分组
- 角色:`admin`
- HTTP`POST https://backend.dooki.cloud/NodeGroupService/createNodeGroup`
- RPC`rpc createNodeGroup (CreateNodeGroupRequest) returns (CreateNodeGroupResponse);`
**请求对象 (`CreateNodeGroupRequest`)**
```json
{
"nodeClusterId": "int64 // 集群ID",
"name": "string // 名称"
}
```
**响应对象 (`CreateNodeGroupResponse`)**
```json
{
"nodeGroupId": "int64"
}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/NodeGroupService/createNodeGroup" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## deleteNodeGroup
> 删除分组
- 角色:`admin`
- HTTP`POST https://backend.dooki.cloud/NodeGroupService/deleteNodeGroup`
- RPC`rpc deleteNodeGroup (DeleteNodeGroupRequest) returns (RPCSuccess);`
**请求对象 (`DeleteNodeGroupRequest`)**
```json
{
"nodeGroupId": "int64"
}
```
**响应对象 (`RPCSuccess`)**
```json
{}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/NodeGroupService/deleteNodeGroup" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## findAllEnabledNodeGroupsWithNodeClusterId
> 查询所有分组
- 角色:`admin`
- HTTP`POST https://backend.dooki.cloud/NodeGroupService/findAllEnabledNodeGroupsWithNodeClusterId`
- RPC`rpc findAllEnabledNodeGroupsWithNodeClusterId (FindAllEnabledNodeGroupsWithNodeClusterIdRequest) returns (FindAllEnabledNodeGroupsWithNodeClusterIdResponse);`
**请求对象 (`FindAllEnabledNodeGroupsWithNodeClusterIdRequest`)**
```json
{
"nodeClusterId": "int64 // 集群ID"
}
```
**响应对象 (`FindAllEnabledNodeGroupsWithNodeClusterIdResponse`)**
```json
{
"nodeGroups": "[]NodeGroup"
}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/NodeGroupService/findAllEnabledNodeGroupsWithNodeClusterId" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## findEnabledNodeGroup
> 查找单个分组信息
- 角色:`admin`
- HTTP`POST https://backend.dooki.cloud/NodeGroupService/findEnabledNodeGroup`
- RPC`rpc findEnabledNodeGroup (FindEnabledNodeGroupRequest) returns (FindEnabledNodeGroupResponse);`
**请求对象 (`FindEnabledNodeGroupRequest`)**
```json
{
"nodeGroupId": "int64"
}
```
**响应对象 (`FindEnabledNodeGroupResponse`)**
```json
{
"nodeGroup": "NodeGroup"
}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/NodeGroupService/findEnabledNodeGroup" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## updateNodeGroup
> 修改分组
- 角色:`admin`
- HTTP`POST https://backend.dooki.cloud/NodeGroupService/updateNodeGroup`
- RPC`rpc updateNodeGroup (UpdateNodeGroupRequest) returns (RPCSuccess);`
**请求对象 (`UpdateNodeGroupRequest`)**
```json
{
"nodeGroupId": "int64",
"name": "string // 名称"
}
```
**响应对象 (`RPCSuccess`)**
```json
{}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/NodeGroupService/updateNodeGroup" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## updateNodeGroupOrders
> 修改分组排序
- 角色:`admin`
- HTTP`POST https://backend.dooki.cloud/NodeGroupService/updateNodeGroupOrders`
- RPC`rpc updateNodeGroupOrders (UpdateNodeGroupOrdersRequest) returns (RPCSuccess);`
**请求对象 (`UpdateNodeGroupOrdersRequest`)**
```json
{
"nodeGroupIds": "[]int64"
}
```
**响应对象 (`RPCSuccess`)**
```json
{}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/NodeGroupService/updateNodeGroupOrders" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---