feat: 完成基本的 model

This commit is contained in:
loveuer
2025-07-10 22:39:41 +08:00
parent 84348f9eaf
commit 99cbe8c523
13 changed files with 400 additions and 14 deletions

19
pkg/handler/healthz.go Normal file
View File

@ -0,0 +1,19 @@
package handler
import (
"time"
"github.com/gofiber/fiber/v3"
)
func Healthz(name, version string) fiber.Handler {
start := time.Now()
return func(c fiber.Ctx) error {
return c.JSON(fiber.Map{
"name": name,
"version": version,
"start_at": start,
"uptime": time.Since(start).String(),
})
}
}