feat: add internal workbench admin api
This commit is contained in:
@@ -14,11 +14,14 @@
|
||||
- `/v1/workbench/reports/daily*`
|
||||
- `/v1/workbench/reports/monthly*`
|
||||
- `/v1/workbench/executive-mailbox/*`
|
||||
- `/internal/admin/workbench/*`,HotGo 后台内部管理接口,使用服务间 HMAC 鉴权
|
||||
|
||||
## 本地运行
|
||||
|
||||
```bash
|
||||
IM_WORKBENCH_CONFIG=configs/workbench.local.json go run ./cmd/workbench
|
||||
IM_WORKBENCH_CONFIG=configs/workbench.local.json \
|
||||
IM_WORKBENCH_INTERNAL_SECRET=local-workbench-secret \
|
||||
go run ./cmd/workbench
|
||||
```
|
||||
|
||||
默认监听 `:6061`,默认连接本地 `tinode` 库和本地 Redis。
|
||||
@@ -43,6 +46,13 @@ X-Request-ID: {uuid}
|
||||
|
||||
服务从 Redis 读取 `im:session:token:{sha256(token)}` 校验登录态。
|
||||
|
||||
HotGo 后台访问 `/internal/admin/workbench/*` 时需要配置同一组内部鉴权参数:
|
||||
|
||||
```text
|
||||
IM_WORKBENCH_INTERNAL_SERVICE_NAME=hotgo-admin
|
||||
IM_WORKBENCH_INTERNAL_SECRET={shared-secret}
|
||||
```
|
||||
|
||||
## Kafka 事件
|
||||
|
||||
工作台写操作统一投递到 `im.workbench.event`。本地配置默认关闭 Kafka:
|
||||
|
||||
Reference in New Issue
Block a user