Files
pyGoEdge-UserPanel/reference/goedge 文档/PriceService.md

45 lines
753 B
Markdown
Raw Normal View History

2025-11-18 03:36:49 +08:00
# PriceService
> 价格相关服务
---
## calculatePrice
> 计算费用
- 角色:`admin`, `user`
- HTTP`POST https://backend.dooki.cloud/PriceService/calculatePrice`
- RPC`rpc calculatePrice(CalculatePriceRequest) returns (CalculatePriceResponse);`
**请求对象 (`CalculatePriceRequest`)**
```json
{
"priceType": "string",
"trafficGB": "double",
"bandwidthMB": "double",
"nodeRegionId": "int64"
}
```
**响应对象 (`CalculatePriceResponse`)**
```json
{
"amount": "double",
"hasNodeRegionPrice": "bool"
}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/PriceService/calculatePrice" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---