Work in progress . This commit adds the core registry service implementation with methods to: - Retrieve all registry entries - List entries with cursor-based pagination - Fetch specific server details by ID
19 lines
470 B
Go
19 lines
470 B
Go
// Package router contains API routing logic
|
|
package router
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/modelcontextprotocol/registry/internal/config"
|
|
"github.com/modelcontextprotocol/registry/internal/service"
|
|
)
|
|
|
|
// New creates a new router with all API versions registered
|
|
func New(cfg *config.Config, registry service.RegistryService) *http.ServeMux {
|
|
mux := http.NewServeMux()
|
|
|
|
// Register routes for all API versions
|
|
RegisterV0Routes(mux, cfg, registry)
|
|
|
|
return mux
|
|
}
|