Documentation
¶
Index ¶
- func ErrorList(db *gorm.DB) gin.HandlerFunc
- func GetApps(cfg *config.Config) gin.HandlerFunc
- func GetDailyEvents(db *gorm.DB) gin.HandlerFunc
- func GetEventList(db *gorm.DB) gin.HandlerFunc
- func GetEventOverview(db *gorm.DB) gin.HandlerFunc
- func GetEventStats(db *gorm.DB) gin.HandlerFunc
- func GetEventStatsSummary(db *gorm.DB) gin.HandlerFunc
- func GetTopEvents(db *gorm.DB) gin.HandlerFunc
- func Login(cfg *config.Config) gin.HandlerFunc
- func Overview(db *gorm.DB) gin.HandlerFunc
- func ReportError(db *gorm.DB) gin.HandlerFunc
- func ReportEvent(db *gorm.DB, cfg *config.Config) gin.HandlerFunc
- type AppInfo
- type DashboardOverview
- type ErrorRequest
- type ErrorTrend
- type EventRequest
- type LoginRequest
- type TopError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEventOverview ¶
func GetEventOverview(db *gorm.DB) gin.HandlerFunc
GetEventOverview 获取事件概览数据(用于 Dashboard 首页)
func GetEventStatsSummary ¶
func GetEventStatsSummary(db *gorm.DB) gin.HandlerFunc
GetEventStatsSummary 获取事件统计摘要接口
func ReportEvent ¶
ReportEvent 上报事件接口
Types ¶
type DashboardOverview ¶
type DashboardOverview struct {
TodayPV int64 `json:"todayPV"` // 今日 PV
TodayUV int64 `json:"todayUV"` // 今日 UV
TotalErrors int64 `json:"totalErrors"` // 错误总数
TodayErrors int64 `json:"todayErrors"` // 今日新增错误
TopErrors []TopError `json:"topErrors"` // Top 5 错误
ErrorTrend []ErrorTrend `json:"errorTrend"` // 近 7 日错误趋势
}
DashboardOverview 概览数据响应
type ErrorRequest ¶
type ErrorRequest struct {
Type string `json:"type" binding:"required"`
Message string `json:"message" binding:"required"`
Stack string `json:"stack"`
URL string `json:"url"`
AppID string `json:"appId" binding:"required"`
}
ErrorRequest 错误上报请求
type ErrorTrend ¶
ErrorTrend 错误趋势数据
type EventRequest ¶
type EventRequest struct {
EventName string `json:"eventName" binding:"required"`
Metadata map[string]interface{} `json:"metadata"`
AppID string `json:"appId" binding:"required"`
UserID string `json:"userId" binding:"required"`
}
EventRequest 事件上报请求
type LoginRequest ¶
type LoginRequest struct {
Username string `json:"username" binding:"required"`
Password string `json:"password" binding:"required"`
}
LoginRequest 登录请求
Click to show internal directories.
Click to hide internal directories.