homelabby/internal/api/handlers
Mikkel Georgsen b0b6153b24 feat(03-02): InventoryHandler with list+detail endpoints and 7 unit tests
- InventoryNetBoxClient interface (ListDevices + GetDevice) for testability
- ListInventory returns 200 JSON array (limit=200, 502 on NetBox error)
- GetInventoryItem returns 200/404/400/502 based on ID validity and NetBox response
- deviceToResponse maps netbox.Device to InventoryItemResponse (nil PhotoURLs → [])
- 7 TDD tests: empty list, 2-item list, NetBox error, found, not found, invalid ID, server error
2026-04-10 06:14:43 +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(02-03): POST /api/intake handler with orchestrator and NetBox wiring 2026-04-10 05:54:33 +00:00
intake_test.go feat(02-03): POST /api/intake handler with orchestrator and NetBox wiring 2026-04-10 05:54:33 +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