Split source_management.go along its CRUD seams (closes #274)
check / check (push) Waiting to run
check / check (push) Waiting to run
`internal/handlers/source_management.go` had grown to about 2,370 lines holding the webhook, event log, entrypoint and target handlers, so unrelated units had to wait on each other to touch it. It is split, as pure code movement, into files named for what they hold: `webhook_list.go`, `webhook_create.go`, `webhook_detail.go`, `webhook_edit.go`, `webhook_delete.go`, `event_log.go`, `entrypoint.go`, `target_create.go`, `target_delete.go`, `target_toggle.go` and `shared.go`. No function body, signature, comment or behaviour changed. The README's file tree and log-line caveat, and one middleware comment, name the new files. Model: opus-5-5
This commit was merged in pull request #494.
This commit is contained in:
@@ -2840,8 +2840,9 @@ read as more than it is:
|
||||
|
||||
- **Lines carrying an authenticated operator's own input**, which are
|
||||
not truncated at all. `webhook created` logs the submitted `name`
|
||||
verbatim and `target URL blocked by SSRF protection` logs the target
|
||||
host (both `internal/handlers/source_management.go`), as do the
|
||||
verbatim (`internal/handlers/webhook_create.go`) and
|
||||
`target URL blocked by SSRF protection` logs the target host
|
||||
(`internal/handlers/target_create.go`), as do the
|
||||
`target_name` lines in `internal/delivery/engine.go` and
|
||||
`internal/delivery/target_http.go`. The only bound on any of them is
|
||||
the 1 MB form body cap, so a 100 KB `name` writes a single line of
|
||||
@@ -3220,7 +3221,17 @@ webhooker/
|
||||
│ │ ├── index.go # Index page handler
|
||||
│ │ ├── profile.go # User profile handler
|
||||
│ │ ├── settings.go # Read-only Settings page handler
|
||||
│ │ ├── source_management.go # Webhook CRUD handlers
|
||||
│ │ ├── webhook_list.go # Webhook list page
|
||||
│ │ ├── webhook_create.go # Webhook create
|
||||
│ │ ├── webhook_detail.go # Webhook detail page
|
||||
│ │ ├── webhook_edit.go # Webhook edit, archive renaming
|
||||
│ │ ├── webhook_delete.go # Webhook delete, event database and archive writer removal
|
||||
│ │ ├── event_log.go # Event log page: loaders, filters, delivery views
|
||||
│ │ ├── entrypoint.go # Entrypoint create, edit, delete and toggle
|
||||
│ │ ├── target_create.go # Target create, per-type config builders
|
||||
│ │ ├── target_delete.go # Target delete
|
||||
│ │ ├── target_toggle.go # Target toggle
|
||||
│ │ ├── shared.go # Helpers shared by several handlers
|
||||
│ │ └── webhook.go # Webhook receiver handler
|
||||
│ ├── healthcheck/
|
||||
│ │ └── healthcheck.go # Health check service (uptime, version)
|
||||
|
||||
Reference in New Issue
Block a user