feat: initial commit

This commit is contained in:
2025-03-31 16:17:35 +01:00
commit 6719f8a61a
91 changed files with 7119 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
package main
import (
"net/http"
)
// HealthCheck godoc
//
// @Summary Health Check
// @Description Health Check
// @Tags ops
// @Success 204 {string} string "ok"
// @Failure 500 {object} error "Internal Server Error"
// @Router /health [get]
func (api *api) healthCheckHandler(w http.ResponseWriter, r *http.Request) {
data := map[string]string{
"status": "ok",
"env": api.config.env,
"version": version,
}
if err := api.jsonResponse(w, http.StatusOK, data); err != nil {
api.internalServerError(w, r, err)
}
}