Refactor server package: split handlers and routes into separate files

- Move all handler functions to handlers.go
- Move setupRoutes to routes.go
- Clean up server.go to only contain core server logic
- Add missing GetASDetails and GetPrefixDetails to mockStore for tests
- Fix linter errors (magic numbers, unused parameters, blank lines)
This commit is contained in:
2025-07-28 04:00:12 +02:00
parent 2fc24bb937
commit 27ae80ea2e
6 changed files with 636 additions and 387 deletions

View File

@@ -47,6 +47,10 @@ type Store interface {
// IP lookup operations
GetASInfoForIP(ip string) (*ASInfo, error)
// AS and prefix detail operations
GetASDetails(asn int) (*ASN, []LiveRoute, error)
GetPrefixDetails(prefix string) ([]LiveRoute, error)
// Lifecycle
Close() error
}