## Summary - Adds `updated_since`, `search`, and `version` query parameters to `GET /v0/servers` - Enables incremental synchronization via RFC3339 timestamp filtering - Provides simple substring search on server names - Supports latest version filtering with `version=latest` This implementation provides the core filtering capabilities needed for efficient registry synchronization and improved server discovery. Fixes #291 Fixes #135
18 lines
681 B
Go
18 lines
681 B
Go
package service
|
|
|
|
import (
|
|
"github.com/modelcontextprotocol/registry/internal/database"
|
|
apiv0 "github.com/modelcontextprotocol/registry/pkg/api/v0"
|
|
)
|
|
|
|
// RegistryService defines the interface for registry operations
|
|
type RegistryService interface {
|
|
// Retrieve all servers with optional filtering
|
|
List(filter *database.ServerFilter, cursor string, limit int) ([]apiv0.ServerJSON, string, error)
|
|
// Retrieve a single server by registry metadata ID
|
|
GetByID(id string) (*apiv0.ServerJSON, error)
|
|
// Publish a server
|
|
Publish(req apiv0.ServerJSON) (*apiv0.ServerJSON, error)
|
|
// Update an existing server
|
|
EditServer(id string, req apiv0.ServerJSON) (*apiv0.ServerJSON, error)
|
|
}
|