type
PluginEndpointContext
type PluginEndpointContext struct {
// Writer receives the endpoint response.
Writer http.ResponseWriter
// Request is the original namespaced HTTP request.
Request *http.Request
// ClientIP is the direct or trusted-forwarded client address resolved by
// the framework HTTP boundary. Authentication transports should use this
// value instead of interpreting forwarding headers independently.
ClientIP string
// 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 other APIs.
Local *LocalAPI
// AdmitAuthAttempt applies the application's distributed IP and identity
// admission policy. Authentication transports must call it before work that
// can be amplified by aliases or repeated requests.
AdmitAuthAttempt func(context.Context, string, string) error
// ReportError records a stable transport error code and sends trusted error
// detail to HandlerOptions.RequestError without exposing it to the client.
// Plugins that implement their own error envelopes should call this for
// internal failures. Passing nil records only Code in request observations.
ReportError func(error, string)
}Authenticated HTTP and LocalAPI context for a plugin endpoint.
Related types
DocumentA stored document with status and version metadata.
CollectionSlugA validated collection or global slug.
LocalAPIIn-process content operations that share the REST authorization and lifecycle pipeline.