8c1e593686
- Introduced a new customer management domain, including entities, services, handlers, and forms for customer operations. - Added JWT-based user authorization settings in the configuration file for both user and customer management. - Updated API endpoints to reflect the new structure, including changes to health check and user management routes. - Enhanced Swagger documentation to include new customer-related endpoints and authorization details. - Refactored the Makefile to include a target for generating API documentation. - Removed obsolete documentation files to streamline the project structure.
31 lines
616 B
Go
31 lines
616 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
"time"
|
|
|
|
"github.com/labstack/echo/v4"
|
|
)
|
|
|
|
// @Summary Health check
|
|
// @Description Get server health status
|
|
// @Tags Health
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Success 200 {object} HealthResponse
|
|
// @Router /admin/v1/health [get]
|
|
func healthHandler(c echo.Context) error {
|
|
return c.JSON(http.StatusOK, HealthResponse{
|
|
Status: "healthy",
|
|
Time: time.Now().Unix(),
|
|
Version: "1.0.0",
|
|
})
|
|
}
|
|
|
|
// HealthResponse represents the health check response
|
|
type HealthResponse struct {
|
|
Status string `json:"status"`
|
|
Time int64 `json:"time"`
|
|
Version string `json:"version"`
|
|
}
|