homelabby/internal/api/handlers
Mikkel Georgsen 1764c7b06a feat(05-02): add TestHandler with 3 cable-test endpoints + router wiring
- TestHandler: POST /api/test/cable, GET /api/test/events, GET /api/test/recent
- POST /api/test/cable: DisallowUnknownFields (T-05-03), creates NetBox cable,
  auto-prints with 1s rate limit (T-05-05), prepends to 20-item ring buffer
- GET /api/test/events: SSE, 30s keepalive, exits on context cancel (T-05-04)
- GET /api/test/recent: thread-safe ring buffer, returns [] when empty
- AttachStream() wires StreamingTesterDriver channel to SSE broadcaster
- Router: three /api/test/* routes added to NewRouter signature
- main.go: constructs TestHandler, wires USB Manager event loop stub
- All handler tests pass race-clean (7 test cases)
2026-04-10 07:15:30 +00:00
..
health.go feat(01-foundation-01): Go module init, chi server, go:embed SPA scaffold 2026-04-10 01:17:03 +00:00
health_test.go feat(01-foundation-01): Go module init, chi server, go:embed SPA scaffold 2026-04-10 01:17:03 +00:00
intake.go feat(04-04): integrate auto-print into intake handler 2026-04-10 06:57:27 +00:00
intake_test.go feat(04-04): integrate auto-print into intake handler 2026-04-10 06:57:27 +00:00
inventory.go feat(03-02): InventoryHandler with list+detail endpoints and 7 unit tests 2026-04-10 06:14:43 +00:00
inventory_test.go feat(03-02): InventoryHandler with list+detail endpoints and 7 unit tests 2026-04-10 06:14:43 +00:00
label.go feat(04-03): LabelHandler, USBEventsHandler, router wiring, main.go USB+printer init 2026-04-10 06:52:52 +00:00
label_test.go test(04-03): add failing handler tests for label print and USB SSE (TDD RED) 2026-04-10 06:50:51 +00:00
test.go feat(05-02): add TestHandler with 3 cable-test endpoints + router wiring 2026-04-10 07:15:30 +00:00
test_test.go feat(05-02): add TestHandler with 3 cable-test endpoints + router wiring 2026-04-10 07:15:30 +00:00
usb_events.go feat(04-03): LabelHandler, USBEventsHandler, router wiring, main.go USB+printer init 2026-04-10 06:52:52 +00:00