got a exporter for forecasting

This commit is contained in:
samantha42
2026-03-21 18:42:54 +01:00
parent 6c5b4bae67
commit 8a8a64c8af
6 changed files with 259 additions and 1 deletions

View File

@@ -49,6 +49,8 @@ func main() {
reportRepo := database.NewReportRepo(db)
reportSvc := service.NewReportService(reportRepo)
reportH := handler.NewReportHandler(reportSvc)
forecastH := handler.NewForecastHandler(budgetRepo, actualsRepo)
mux := http.NewServeMux()
// Reference endpoints
@@ -75,6 +77,10 @@ func main() {
mux.HandleFunc("GET /api/v1/variance/alerts", varianceH.Alerts)
mux.HandleFunc("GET /api/v1/variance/reforecast", varianceH.Alerts)
//forecast
mux.HandleFunc("GET /api/v1/forecast/export", forecastH.Export)
mux.HandleFunc("POST /api/v1/forecast/ingest", forecastH.Ingest)
//reports
mux.HandleFunc("GET /api/v1/reports/pnl", reportH.PnL)