Documentation
¶
Overview ¶
Package api provides the REST API server for MCP Registry access.
Package api provides common API types and responses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggingMiddleware ¶
LoggingMiddleware logs HTTP requests
func NewServer ¶
func NewServer(svc service.RegistryService, opts ...ServerOption) *chi.Mux
NewServer creates and configures the HTTP router with the given service and options
Types ¶
type HealthResponse ¶ added in v0.4.1
type HealthResponse struct {
Status string `json:"status" example:"healthy"`
}
HealthResponse represents the health check response
type ReadinessResponse ¶ added in v0.4.1
type ReadinessResponse struct {
Status string `json:"status" example:"ready"`
}
ReadinessResponse represents the readiness check response
type ServerOption ¶
type ServerOption func(*serverConfig)
ServerOption configures the registry API server
func WithAuthInfoHandler ¶ added in v0.3.0
func WithAuthInfoHandler(handler http.Handler) ServerOption
WithAuthInfoHandler sets the auth info handler to be mounted at /.well-known/oauth-protected-resource
func WithMiddlewares ¶
func WithMiddlewares(mw ...func(http.Handler) http.Handler) ServerOption
WithMiddlewares adds middleware to the server
type VersionResponse ¶ added in v0.4.1
type VersionResponse struct {
Version string `json:"version" example:"v0.1.0"`
Commit string `json:"commit" example:"abc123def"`
BuildDate string `json:"build_date" example:"2025-01-15T10:30:00Z"`
GoVersion string `json:"go_version" example:"go1.21.5"`
Platform string `json:"platform" example:"linux/amd64"`
}
VersionResponse represents the version information response
Directories
¶
| Path | Synopsis |
|---|---|
|
Package common provides shared HTTP utility functions for API handlers.
|
Package common provides shared HTTP utility functions for API handlers. |
|
extension
|
|
|
v0
Package v0 provides extension API v0 endpoints for server management.
|
Package v0 provides extension API v0 endpoints for server management. |
|
registry
|
|
|
v01
Package v01 provides registry API v0.1 endpoints for MCP server discovery.
|
Package v01 provides registry API v0.1 endpoints for MCP server discovery. |
Click to show internal directories.
Click to hide internal directories.