第 0 阶段:项目初始化

This commit is contained in:
yml
2026-05-22 15:05:28 +08:00
commit 8e7f1f17f0
55 changed files with 4519 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
package handler
import (
"net/http"
"time"
"github.com/gin-gonic/gin"
)
type HealthHandler struct {
startedAt time.Time
}
func NewHealthHandler() *HealthHandler {
return &HealthHandler{startedAt: time.Now()}
}
func (h *HealthHandler) Check(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"status": "ok",
"service": "hfb-api",
"started_at": h.startedAt.Format(time.RFC3339),
})
}