Documentation
¶
Overview ¶
Package server provides the HTTP API server for defSource. It exposes endpoints for library search, documentation query, entity listing, and health checks. All handlers are wired through the withMiddleware chain defined in middleware.go.
Package server provides the HTTP API server for defSource. Use New to construct an *http.Server wired to a defSource client, then start it with ListenAndServe. The server applies the withMiddleware chain (logging, CORS, security headers, panic recovery) to all routes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates an HTTP server wired to the defSource client. corsOrigin is used verbatim as the Access-Control-Allow-Origin response header. All routes are wrapped with the full middleware chain: logging (outermost), CORS, security headers, and panic recovery (innermost). See middleware.go for the complete execution-order description.
Types ¶
This section is empty.