add initial application structure with configuration, logging, and health check endpoints

This commit is contained in:
kever
2026-01-15 21:39:15 +08:00
parent fed727e593
commit ed8c3d55b8
103 changed files with 39974 additions and 80 deletions

View File

@@ -8,10 +8,13 @@ import (
type RouteParams struct {
fx.In
Echo *echo.Echo
Health *HealthController
Echo *echo.Echo
Hero *HeroController
}
func RegisterRoutes(p RouteParams) {
p.Echo.GET("/health", p.Health.Health)
p.Echo.POST("/heroes", p.Hero.Create)
p.Echo.GET("/heroes/:id", p.Hero.GetByID)
p.Echo.PUT("/heroes/:id", p.Hero.Update)
p.Echo.DELETE("/heroes/:id", p.Hero.Delete)
}