Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Start ¶
Start configures logging, recovery, CORS and server timeouts on e and serves on port. It always sets a 10s read-header timeout and a 120s idle timeout.
Without WithAllowedOrigins every origin is allowed, and without WithBodyLimit request bodies are unbounded, so production callers should pass both.
Types ¶
type Option ¶ added in v1.16.0
type Option func(*config)
Option configures Start.
func WithAllowedOrigins ¶ added in v1.16.0
WithAllowedOrigins restricts CORS to the given origins. Without it, or with no origins, every origin is allowed.
func WithBodyLimit ¶ added in v1.16.0
WithBodyLimit caps request bodies using echo's BodyLimit middleware, e.g. "10M". Larger bodies get 413. An invalid limit panics when the server is configured. Without it bodies are unbounded.
func WithIdleTimeout ¶ added in v1.16.0
WithIdleTimeout overrides the default 120s keep-alive idle timeout.
func WithReadHeaderTimeout ¶ added in v1.16.0
WithReadHeaderTimeout overrides the default 10s read-header timeout.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package generator derives an OpenAPI 3.0 document from the source of an Echo application built on compose's rest handlers.
|
Package generator derives an OpenAPI 3.0 document from the source of an Echo application built on compose's rest handlers. |
|
Package reference renders an OpenAPI 3.x document as a self-hosted API reference page: an alternative to Scalar and Redoc that ships inside the backend, with no CDN assets.
|
Package reference renders an OpenAPI 3.x document as a self-hosted API reference page: an alternative to Scalar and Redoc that ships inside the backend, with no CDN assets. |