chore: initial import

This commit is contained in:
phamnazage-jpg
2026-05-12 17:47:32 +08:00
commit fc54ba84b2
104 changed files with 11575 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
package handler
import (
"net/http"
"github.com/company/ai-ops/pkg/response"
)
// HealingHandler 是自愈管理 HTTP 处理器
type HealingHandler struct{}
func NewHealingHandler() *HealingHandler {
return &HealingHandler{}
}
func (h *HealingHandler) RegisterRoutes(mux *http.ServeMux) {
mux.HandleFunc("GET /api/v1/ai-ops/healings", h.ListHealings)
mux.HandleFunc("GET /api/v1/ai-ops/healings/{id}", h.GetHealing)
}
func (h *HealingHandler) ListHealings(w http.ResponseWriter, r *http.Request) {
// TODO: 实现列表查询
response.Success(w, map[string]any{"items": []any{}, "total": 0})
}
func (h *HealingHandler) GetHealing(w http.ResponseWriter, r *http.Request) {
id := r.PathValue("id")
response.Success(w, map[string]any{"id": id, "status": "pending"})
}