update to support postgresql and add godocs
Some checks failed
continuous-integration/drone Build is passing
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / End-to-End (push) Has been cancelled
CI / Publish Docker (push) Has been cancelled

This commit is contained in:
2026-01-13 17:05:14 +11:00
parent afec4aacb0
commit ea1eeb5c21
37 changed files with 618 additions and 38 deletions

View File

@@ -8,6 +8,14 @@ import (
"vctp/internal/report"
)
// InventoryReportDownload returns the inventory report as an XLSX download.
// @Summary Download inventory report
// @Description Generates an inventory XLSX report and returns it as a file download.
// @Tags reports
// @Produce application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
// @Success 200 {file} file "Inventory XLSX report"
// @Failure 500 {object} map[string]string "Report generation failed"
// @Router /api/report/inventory [get]
func (h *Handler) InventoryReportDownload(w http.ResponseWriter, r *http.Request) {
ctx := context.Background()
@@ -34,6 +42,14 @@ func (h *Handler) InventoryReportDownload(w http.ResponseWriter, r *http.Request
w.Write(reportData)
}
// UpdateReportDownload returns the updates report as an XLSX download.
// @Summary Download updates report
// @Description Generates an updates XLSX report and returns it as a file download.
// @Tags reports
// @Produce application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
// @Success 200 {file} file "Updates XLSX report"
// @Failure 500 {object} map[string]string "Report generation failed"
// @Router /api/report/updates [get]
func (h *Handler) UpdateReportDownload(w http.ResponseWriter, r *http.Request) {
ctx := context.Background()