lab2: postgres, sessions, redis, persistence, stale read
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-10-09 21:30:36 +03:00
parent 65003b6119
commit d8842a3de4
54 changed files with 3205 additions and 19 deletions
+25
View File
@@ -0,0 +1,25 @@
package http
import (
"net/http"
"github.com/charawein/mtusi2026lab2/internal/transport/httputil"
)
type HealthHandler struct{}
func NewHealthHandler() *HealthHandler {
return &HealthHandler{}
}
func (h *HealthHandler) Live(w http.ResponseWriter, r *http.Request) {
httputil.WriteJSON(w, r, http.StatusOK, healthResponse{Status: "ok"})
}
func (h *HealthHandler) Ready(w http.ResponseWriter, r *http.Request) {
httputil.WriteJSON(w, r, http.StatusOK, healthResponse{Status: "ok"})
}
type healthResponse struct {
Status string `json:"status"`
}