A 层搬运(整包,源=poc-final 5e09a4cc): 协议四栈/pkg 标准件 12 包/util 计费纯函数/middleware/迁移链 repository·mysql v1~v19+clickhouse/model·entity/config/service·audit·balance/app/cmd·{migrate,reconcile,cmppbench}/tools·gen-dict/_bench/test·integration/openapi·yaml/监控三件/运维资产(compose+kind+CI 两套+Makefile+runbook)/scripts 种子/前端基建(根配置+src 基建目录,views 留 B 层)

This commit is contained in:
2026-11-13 15:16:01 +08:00
parent 2a6a66fbd3
commit e47610f4ed
273 changed files with 33973 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
// fe_error_log.go Day 53(runbook §6.4 P0):前端错误上报落库。
// request.ts 拦截器(HTTP 5xx/网络层)+window.onerror/unhandledrejection(JS 运行时)
// → POST /fe-errors;Day43 vite proxy 死端口案例后,前端层故障后端零感知的补洞。
package entity
// FeErrorLog 前端错误记录(kind/js 堆栈/页面 URL/UA/trace_id 关联后端日志)。
type FeErrorLog struct {
LogModel
Kind string `gorm:"size:16;index:idx_kind_time,priority:1" json:"kind"` // js|http|unhandled
PageURL string `gorm:"size:512" json:"page_url"`
Message string `gorm:"size:1024" json:"message"`
Stack string `gorm:"type:text" json:"stack"`
UA string `gorm:"size:512" json:"ua"`
TraceID string `gorm:"size:64;index:idx_fe_trace" json:"trace_id"`
}
func (FeErrorLog) TableName() string { return "fe_error_log" }