/internal/billing/quota/check
服务间内部调用:检查租户资源配额是否超出限制(如用户数、存储、API调用),供其他微服务在资源操作前进行配额校验
请求体
Schema: service-billing/internal/handler/dto.QuotaCheckInternalRequest
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
requested_amount |
integer |
是 | 100 |
||
resource_type |
string |
是 | api_calls |
||
app_id |
string |
否 | app_001 |
响应
| 状态 | 描述 | Schema |
|---|---|---|
| 200 | 配额检查成功 | service-billing/internal/handler/dto.QuotaCheckDetailResponse |
| 400 | 请求参数错误 | object |
| 401 | 未授权 | object |
| 500 | 服务器内部错误 | object |
引用的 Schema
service-billing/internal/handler/dto.QuotaCheckDetailResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
integer |
否 | |||
data |
service-billing/internal/handler/dto.QuotaCheckResponse |
否 | |||
message |
string |
否 | |||
timestamp |
string |
否 |
service-billing/internal/handler/dto.QuotaCheckResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
allowed |
boolean |
否 | True |
||
current |
integer |
否 | 5000 |
||
limit |
integer |
否 | 10000 |
||
message |
string |
否 | |||
remaining |
integer |
否 | 5000 |
||
resource_type |
string |
否 | api_calls |