Archive the differentiated YuXinGu product docs, AI engineering system, design contract, and Go/Vue scaffold. Next execution prioritizes Cece-parity over early innovation (see .ai/product/STRATEGY.md). Co-authored-by: Cursor <cursoragent@cursor.com>
26 lines
603 B
Go
26 lines
603 B
Go
package handler
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"github.com/yuxingu/digital-psychology/apps/api/pkg/response"
|
|
)
|
|
|
|
// HealthHandler serves liveness probes.
|
|
type HealthHandler struct{}
|
|
|
|
// NewHealthHandler constructs HealthHandler.
|
|
func NewHealthHandler() *HealthHandler {
|
|
return &HealthHandler{}
|
|
}
|
|
|
|
// Register mounts health routes on the engine or router group.
|
|
func (h *HealthHandler) Register(r gin.IRoutes) {
|
|
r.GET("/healthz", h.Healthz)
|
|
}
|
|
|
|
// Healthz returns a simple OK payload for load balancers.
|
|
func (h *HealthHandler) Healthz(c *gin.Context) {
|
|
response.OK(c, gin.H{"status": "ok"})
|
|
}
|