refactor: rename Processor to Webhook and Webhook to Entrypoint

The top-level entity that groups entrypoints and targets is now called
Webhook (was Processor). The inbound URL endpoint entity is now called
Entrypoint (was Webhook). This rename affects database models, handler
comments, routes, and README documentation.

closes #12
This commit is contained in:
clawbot
2026-03-01 15:44:22 -08:00
committed by user
parent b5cf4c3d2f
commit 7bbe47b943
10 changed files with 63 additions and 63 deletions

View File

@@ -6,19 +6,19 @@ import (
"github.com/go-chi/chi"
)
// HandleWebhook handles incoming webhook requests
// HandleWebhook handles incoming webhook requests at entrypoint URLs
func (h *Handlers) HandleWebhook() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
// Get webhook UUID from URL
webhookUUID := chi.URLParam(r, "uuid")
if webhookUUID == "" {
// Get entrypoint UUID from URL
entrypointUUID := chi.URLParam(r, "uuid")
if entrypointUUID == "" {
http.NotFound(w, r)
return
}
// Log the incoming webhook request
h.log.Info("webhook request received",
"uuid", webhookUUID,
"entrypoint_uuid", entrypointUUID,
"method", r.Method,
"remote_addr", r.RemoteAddr,
"user_agent", r.UserAgent(),
@@ -32,7 +32,7 @@ func (h *Handlers) HandleWebhook() http.HandlerFunc {
}
// TODO: Implement webhook handling logic
// For now, return "unimplemented" for all webhook POST requests
// Look up entrypoint by UUID, find parent webhook, fan out to targets
w.WriteHeader(http.StatusNotFound)
_, err := w.Write([]byte("unimplemented"))
if err != nil {