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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user