type
Endpoint
One application-authored method and path handler mounted at root, collection, or global scope.
Properties
| Property | Type | Description |
|---|---|---|
Method | string | CONNECT, DELETE, GET, HEAD, OPTIONS, PATCH, POST, or PUT. |
Path | string | A leading-slash path with optional complete :parameter segments. |
Summary | string | Optional generated OpenAPI operation summary. |
MaxBodyBytes | int64 | Raw body bound; zero inherits HandlerOptions and a negative value opts trusted streaming out. |
Handler | EndpointHandler | Trusted compiled application handler code. |
How it works
Root endpoints mount below /api. Collection and global endpoints mount below their resource route and run before a matching built-in route for the same method.
Custom endpoints are anonymous by default. Handler must enforce endpoint-specific authorization.
Full signature
type Endpoint struct {
// Method is one supported HTTP method. Matching is case-insensitive during
// config resolution and the manifest stores its uppercase form.
Method string
// Path follows the registering provider: application/resource paths begin with /
// and support :parameters, plugin paths are exact and relative, and transport
// paths are exact allowed absolute protocol routes.
Path string
// Summary appears in the generated OpenAPI operation. When empty, Ridu
// supplies a deterministic generic summary.
Summary string
// MaxBodyBytes bounds the raw request body before Handler receives it. Zero
// inherits HandlerOptions.MaxBodyBytes; a negative value opts trusted
// streaming code out of that bound.
MaxBodyBytes int64
// Handler is trusted compiled application code and is never serialized.
Handler EndpointHandler
}