package service import ( "context" "github.com/modelcontextprotocol/registry/internal/database" apiv0 "github.com/modelcontextprotocol/registry/pkg/api/v0" ) // RegistryService defines the interface for registry operations type RegistryService interface { // ListServers retrieve all servers with optional filtering ListServers(ctx context.Context, filter *database.ServerFilter, cursor string, limit int) ([]*apiv0.ServerResponse, string, error) // GetServerByName retrieve latest version of a server by server name GetServerByName(ctx context.Context, serverName string) (*apiv0.ServerResponse, error) // GetServerByNameAndVersion retrieve specific version of a server by server name and version GetServerByNameAndVersion(ctx context.Context, serverName string, version string) (*apiv0.ServerResponse, error) // GetAllVersionsByServerName retrieve all versions of a server by server name GetAllVersionsByServerName(ctx context.Context, serverName string) ([]*apiv0.ServerResponse, error) // CreateServer creates a new server version CreateServer(ctx context.Context, req *apiv0.ServerJSON) (*apiv0.ServerResponse, error) // UpdateServer updates an existing server and optionally its status UpdateServer(ctx context.Context, serverName, version string, req *apiv0.ServerJSON, newStatus *string) (*apiv0.ServerResponse, error) }