add initial application structure with configuration, logging, and health check endpoints
This commit is contained in:
22
internal/controller/user_controller.go
Normal file
22
internal/controller/user_controller.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
|
||||
"epic-ent/internal/service"
|
||||
)
|
||||
|
||||
type UserController struct {
|
||||
svc *service.HealthService
|
||||
}
|
||||
|
||||
func NewUserController(svc *service.HealthService) *HealthController {
|
||||
return &HealthController{svc: svc}
|
||||
}
|
||||
|
||||
func (h *UserController) Health(c echo.Context) error {
|
||||
//status := h.svc.Check()
|
||||
return c.JSON(http.StatusOK, "你好")
|
||||
}
|
||||
Reference in New Issue
Block a user