package httpapi import ( "log/slog" "net/http" "os" "github.com/gin-gonic/gin" ) func NewRouter() *gin.Engine { return NewOperationalRouter(NewOperations(slog.New(slog.NewJSONHandler(os.Stdout, nil)))) } func NewOperationalRouter(ops *Operations) *gin.Engine { gin.SetMode(gin.ReleaseMode) r := gin.New() _ = r.SetTrustedProxies(nil) r.Use(ops.Middleware()) r.NoRoute(func(c *gin.Context) { apiError(c, 404, "not_found", "Not found") }) r.GET("/api/v1/health/live", func(c *gin.Context) { c.JSON(http.StatusOK, gin.H{"status": "ok"}) }) return r }