 kevinandClaude
|
c527a9fd9a
|
重构:拆出 auth / blocking / runtimesettings / help / mqttforward 包
第二批:把根目录中纯逻辑领域文件(cache、service、admin route)按业务边界
迁到 internal/ 下的子包。各子包暴露 RegisterRoutes 给 web 包调用,根目录
只留下一行 bridge 文件保留旧名字别名。
新增包
- internal/auth/ SessionClaims / Manager / RequireAdmin / HashPassword /
VerifyPassword / AdminUserResponse 等。原 auth.go 中
被两个 admin route 依赖的 sessionClaims 现在以 auth.
SessionClaims 形式被它们 import;不再被锁在 main 包。
- internal/blocking/ Cache + RegisterRoutes,以前散在 blocking_cache.go
和 admin_blocking_routes.go 里。
- internal/runtimesettings/ Cache + RegisterRoutes。
- internal/help/ RenderMarkdown / RegisterPublicRoutes /
RegisterAdminRoutes(拆分原来的 registerHelpRoutes
和 registerAdminHelpRoutes 两条入口)。
- internal/mqttforward/ Manager / Reloader / Stats / RegisterRoutes。
forwarder runner、循环抑制 cache 等运行时逻辑随之迁入。
- internal/webutil/ ParseListOptions / WriteListResponse[WithTotal] /
ParseMapReportListOptions / ParseMapReportViewportOptions
以及 PtrString/PtrInt64/... 等指针解引用 helper。
以前散在 web.go 中,现在被各 admin route 子包共享,
避免 internal/blocking → internal/web → internal/blocking
的循环依赖。
- internal/store/testutil/ OpenStore(t) helper,让其它包测试零样板拿到 store。
根目录新增 bridge 文件
- blocking_bridge.go / runtime_settings_bridge.go / help_bridge.go /
mqttforward_bridge.go:用 type alias + thin wrapper 把上述子包的导出
名映射到旧的小写名(blockingCache、registerAdminBlockingRoutes 等),
让 main.go / web.go 等仍未迁出的文件无须改动。
修改
- auth.go 改为对 internal/auth 的 bridge;web.go 中 sessions.newCookie /
clearCookie 改为 NewCookie / ClearCookie。
- main_test.go 中 BlockingViolationForRecord* 测试不再直接构造未导出字段,
改成走 store.CreateNodeBlocking → newBlockingCache 的真实路径。
- internal/mqttforward 把以前 *_store.go 中没有方法依赖的运行时类型
(forwarder runner、loop cache)和 admin route 一并归位;mqtt_status.go
暂时仍留在根目录(依赖 main 中的 mqttClientInfoFromClient)。
go build ./... / go test ./... 全部通过;测试数量未变。
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-18 14:23:56 +08:00 |
|
kevin
|
e2bf6aa173
|
up
|
2026-06-17 20:18:37 +08:00 |
|
 kevinandClaude
|
8690265fa0
|
新增签到日历筛选
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-16 20:49:21 +08:00 |
|
 kevinandClaude
|
6084897bdb
|
新增签到管理功能
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-16 20:16:28 +08:00 |
|
kevin
|
6c0285c015
|
私聊功能未完成
|
2026-06-12 20:24:18 +08:00 |
|
kevin
|
2e96faf5a2
|
Merge branch 'main' of https://git.lmve.net/kevin/meshtastic_mqtt_server
# Conflicts:
# meshmap_frontend/src/App.vue
# web.go
|
2026-06-12 18:15:30 +08:00 |
|
kevin
|
b645907c52
|
新增机器人功能
|
2026-06-12 18:07:53 +08:00 |
|
kevin
|
563d609121
|
服务器代理地图数据
|
2026-06-06 12:01:46 +08:00 |
|
kevin
|
0f9cb3eae5
|
新增图源修改功能
|
2026-06-06 01:16:03 +08:00 |
|
kevin
|
fb1971da72
|
增加转发开关
|
2026-06-05 20:03:52 +08:00 |
|
kevin
|
dd10d99b99
|
编辑帮助功能
|
2026-06-05 19:05:04 +08:00 |
|
kevin
|
d962ccf9af
|
新增mqtt转发功能
|
2026-06-05 18:49:30 +08:00 |
|
kevin
|
4377a0db0a
|
合并重复消息
|
2026-06-05 14:08:10 +08:00 |
|
kevin
|
25decaba71
|
部署脚本
|
2026-06-04 16:29:52 +08:00 |
|
kevin
|
2e6eab3e01
|
屏蔽词功能ok
|
2026-06-04 15:20:40 +08:00 |
|
kevin
|
5b6a1a60a1
|
地图缩放融合
|
2026-06-04 14:23:17 +08:00 |
|
kevin
|
acd03a614a
|
屏蔽表已创建
|
2026-06-04 12:08:25 +08:00 |
|
kevin
|
f73d79b7d4
|
基本功能差不多完成
|
2026-06-04 09:52:57 +08:00 |
|
kevin
|
e945222519
|
右键删除节点列表,好像实现了,还需要实现右键删除地图节点
|
2026-06-04 01:16:33 +08:00 |
|
kevin
|
63676f7f34
|
更新用户管理相关
|
2026-06-03 23:58:17 +08:00 |
|
kevin
|
9221a53617
|
新增后台管理
|
2026-06-03 23:29:21 +08:00 |
|
kevin
|
3ae2ffa098
|
分表
|
2026-06-03 22:34:25 +08:00 |
|
kevin
|
191651fce9
|
更新地图
|
2026-06-03 19:59:49 +08:00 |
|
kevin
|
9748a1e681
|
添加前端
|
2026-06-03 18:31:15 +08:00 |
|