Initial commit
This commit is contained in:
223
reference/goedge 文档/NodePriceItemService.md
Normal file
223
reference/goedge 文档/NodePriceItemService.md
Normal file
@@ -0,0 +1,223 @@
|
||||
# NodePriceItemService
|
||||
> 节点区域定价相关服务
|
||||
|
||||
---
|
||||
|
||||
## createNodePriceItem
|
||||
> 创建区域价格
|
||||
|
||||
- 角色:`admin`
|
||||
- HTTP:`POST https://backend.dooki.cloud/NodePriceItemService/createNodePriceItem`
|
||||
- RPC:`rpc createNodePriceItem (CreateNodePriceItemRequest) returns (CreateNodePriceItemResponse);`
|
||||
|
||||
**请求对象 (`CreateNodePriceItemRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "string // 名称",
|
||||
"type": "string",
|
||||
"bitsFrom": "int64",
|
||||
"bitsTo": "int64"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`CreateNodePriceItemResponse`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"NodePriceItemId": "int64"
|
||||
}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/NodePriceItemService/createNodePriceItem" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## deleteNodePriceItem
|
||||
> 删除区域价格
|
||||
|
||||
- 角色:`admin`
|
||||
- HTTP:`POST https://backend.dooki.cloud/NodePriceItemService/deleteNodePriceItem`
|
||||
- RPC:`rpc deleteNodePriceItem (DeleteNodePriceItemRequest) returns (RPCSuccess);`
|
||||
|
||||
**请求对象 (`DeleteNodePriceItemRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"NodePriceItemId": "int64"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`RPCSuccess`)**
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/NodePriceItemService/deleteNodePriceItem" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## findAllAvailableNodePriceItems
|
||||
> 查找所有启用的区域价格
|
||||
|
||||
- 角色:`admin`
|
||||
- HTTP:`POST https://backend.dooki.cloud/NodePriceItemService/findAllAvailableNodePriceItems`
|
||||
- RPC:`rpc findAllAvailableNodePriceItems (FindAllAvailableNodePriceItemsRequest) returns (FindAllAvailableNodePriceItemsResponse);`
|
||||
|
||||
**请求对象 (`FindAllAvailableNodePriceItemsRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`FindAllAvailableNodePriceItemsResponse`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"NodePriceItems": "[]NodePriceItem"
|
||||
}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/NodePriceItemService/findAllAvailableNodePriceItems" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## findAllEnabledNodePriceItems
|
||||
> 查找所有区域价格
|
||||
|
||||
- 角色:`admin`
|
||||
- HTTP:`POST https://backend.dooki.cloud/NodePriceItemService/findAllEnabledNodePriceItems`
|
||||
- RPC:`rpc findAllEnabledNodePriceItems (FindAllEnabledNodePriceItemsRequest) returns (FindAllEnabledNodePriceItemsResponse);`
|
||||
|
||||
**请求对象 (`FindAllEnabledNodePriceItemsRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`FindAllEnabledNodePriceItemsResponse`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"NodePriceItems": "[]NodePriceItem"
|
||||
}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/NodePriceItemService/findAllEnabledNodePriceItems" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## findEnabledNodePriceItem
|
||||
> 查找单个区域信息
|
||||
|
||||
- 角色:`admin`
|
||||
- HTTP:`POST https://backend.dooki.cloud/NodePriceItemService/findEnabledNodePriceItem`
|
||||
- RPC:`rpc findEnabledNodePriceItem (FindEnabledNodePriceItemRequest) returns (FindEnabledNodePriceItemResponse);`
|
||||
|
||||
**请求对象 (`FindEnabledNodePriceItemRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"NodePriceItemId": "int64"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`FindEnabledNodePriceItemResponse`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"NodePriceItem": "NodePriceItem"
|
||||
}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/NodePriceItemService/findEnabledNodePriceItem" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## updateNodePriceItem
|
||||
> 修改区域价格
|
||||
|
||||
- 角色:`admin`
|
||||
- HTTP:`POST https://backend.dooki.cloud/NodePriceItemService/updateNodePriceItem`
|
||||
- RPC:`rpc updateNodePriceItem (UpdateNodePriceItemRequest) returns (RPCSuccess);`
|
||||
|
||||
**请求对象 (`UpdateNodePriceItemRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"NodePriceItemId": "int64",
|
||||
"name": "string // 名称",
|
||||
"isOn": "bool // 是否启用",
|
||||
"bitsFrom": "int64",
|
||||
"bitsTo": "int64"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`RPCSuccess`)**
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/NodePriceItemService/updateNodePriceItem" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user