Documentation
¶
Overview ¶
Package v0 provides the REST API handlers for MCP Registry access.
Index ¶
Constants ¶
const ( // FormatToolhive is the toolhive format for registry responses // Deprecated: Use API v0.1 instead FormatToolhive = "toolhive" // FormatUpstream is the upstream MCP registry format // Deprecated: Use API v0.1 instead FormatUpstream = "upstream" )
Variables ¶
This section is empty.
Functions ¶
func HealthRouter ¶
func HealthRouter(svc service.RegistryService) http.Handler
HealthRouter creates a router for health check endpoints
Types ¶
type EnvVarDetail ¶
type EnvVarDetail struct {
Name string `json:"name"`
Description string `json:"description"`
Required bool `json:"required"`
Default string `json:"default,omitempty"`
Secret bool `json:"secret,omitempty"`
}
EnvVarDetail represents detailed environment variable information Deprecated: Use API v0.1 instead
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
ErrorResponse represents a standardized error response Deprecated: Use API v0.1 instead
type ListServersResponse ¶
type ListServersResponse struct {
Servers []ServerSummaryResponse `json:"servers"`
Total int `json:"total"`
}
ListServersResponse represents the servers list response Deprecated: Use API v0.1 instead
type RegistryInfoResponse ¶
type RegistryInfoResponse struct {
Version string `json:"version"`
LastUpdated string `json:"last_updated"`
Source string `json:"source"`
TotalServers int `json:"total_servers"`
}
RegistryInfoResponse represents the registry information response Deprecated: Use API v0.1 instead
type Routes ¶
type Routes struct {
// contains filtered or unexported fields
}
Routes defines the routes for the registry API with dependency injection Deprecated: Use API v0.1 instead
func NewRoutes ¶
func NewRoutes(svc service.RegistryService) *Routes
NewRoutes creates a new Routes instance with the provided service Deprecated: Use API v0.1 instead
type ServerDetailResponse ¶
type ServerDetailResponse struct {
Name string `json:"name"`
Description string `json:"description"`
Tier string `json:"tier"`
Status string `json:"status"`
Transport string `json:"transport"`
Tools []string `json:"tools"`
EnvVars []EnvVarDetail `json:"env_vars,omitempty"`
Permissions map[string]interface{} `json:"permissions,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
RepositoryURL string `json:"repository_url,omitempty"`
Tags []string `json:"tags,omitempty"`
Args []string `json:"args,omitempty"`
Volumes map[string]interface{} `json:"volumes,omitempty"`
Image string `json:"image,omitempty"`
}
ServerDetailResponse represents a server in detail API responses (full view) Deprecated: Use API v0.1 instead
func NewServerDetailResponseForTesting ¶
func NewServerDetailResponseForTesting(server toolhivetypes.ServerMetadata) ServerDetailResponse
NewServerDetailResponseForTesting creates a ServerDetailResponse for testing Deprecated: Use API v0.1 instead
type ServerSummaryResponse ¶
type ServerSummaryResponse struct {
Name string `json:"name"`
Description string `json:"description"`
Tier string `json:"tier"`
Status string `json:"status"`
Transport string `json:"transport"`
ToolsCount int `json:"tools_count"`
}
ServerSummaryResponse represents a server in list API responses (summary view) Deprecated: Use API v0.1 instead
func NewServerSummaryResponseForTesting ¶
func NewServerSummaryResponseForTesting(server toolhivetypes.ServerMetadata) ServerSummaryResponse
NewServerSummaryResponseForTesting creates a ServerSummaryResponse for testing Deprecated: Use API v0.1 instead