feat: 实现管理鉴权、API 令牌与操作日志

This commit is contained in:
Nixevol
2026-09-30 06:58:54 +08:00
parent 308b0b9edd
commit 0e068c6ade
13 changed files with 1655 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
package admin
// audit 写结构化操作日志;不写密码、令牌和正文。
func (h *Handler) audit(actor, action, object, result, ip string) {
h.log.Info("admin_audit",
"actor", actor,
"action", action,
"object", object,
"result", result,
"ip", ip,
)
}