Initial commit
This commit is contained in:
44
reference/goedge 文档/PriceService.md
Normal file
44
reference/goedge 文档/PriceService.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# 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 '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user