type
GenerateContext
Trusted runtime input for a title, description, image, or URL generator.
Members
| Property | Type | Description |
|---|---|---|
Context | ridu.EndpointContext | Authenticated request context and access-controlled local API. |
Document | map[string]any | Current unsaved admin form snapshot. |
ID | string | Existing document ID, or empty during create. |
Locale | schema.LocaleCode | Selected content locale. |
Collection | *ridu.Collection | Detached collection definition; nil for a global. |
Global | *ridu.Global | Detached global definition; nil for a collection. |
How it works
Exactly one of Collection and Global is non-nil. The endpoint checks authentication and resource capabilities before invoking the callback.
Full signature
type GenerateContext struct {
Context ridu.EndpointContext
Document map[string]any
ID string
Locale schema.LocaleCode
Collection *ridu.Collection
Global *ridu.Global
}