type
EndpointContext
type EndpointContext struct {
Writer http.ResponseWriter
Request *http.Request
// RequestID is the framework request ID also returned in X-Request-ID.
RequestID string
// ClientIP is resolved through the configured trusted-proxy policy.
ClientIP string
// RouteParams contains decoded named path parameters.
RouteParams map[string]string
// Collection identifies the owning collection endpoint, when applicable.
Collection schema.CollectionSlug
// Global identifies the owning global endpoint, when applicable.
Global schema.CollectionSlug
// Actor is the authenticated user, or nil for an anonymous request.
Actor *store.Document
// ActorCollection identifies the auth collection that owns Actor.
ActorCollection schema.CollectionSlug
// Local enters the same access-controlled operation engine as REST and the
// generated SDK.
Local *LocalAPI
// AdmitAuthAttempt applies the distributed authentication-attempt policy for
// endpoints implementing an authentication flow.
AdmitAuthAttempt func(context.Context, string, string) error
// ReportError records a stable code and sends trusted detail to
// HandlerOptions.RequestError without exposing it to the client.
ReportError func(error, string)
}Raw HTTP, route parameters, verified actor identity, and LocalAPI supplied to a custom endpoint.
Related types
CollectionExecutable authoring configuration for one document collection.
CollectionSlugA validated collection or global slug.
GlobalExecutable authoring configuration for one singleton document.
DocumentA stored document with status and version metadata.
LocalAPIIn-process content operations that share the REST authorization and lifecycle pipeline.