type
AdminLoadContext
Read content for the signed-in user while a Go admin loader runs.
Example
post, err := ctx.Find(
ctx.RouteParams["collection"],
ctx.RouteParams["document"],
ridu.FindOptions{},
)
if err != nil {
return SummaryData{}, err
}
title, _ := post.Values["title"].StringValue()Context values
| Property | Type | Description |
|---|---|---|
Context | context.Context | Request cancellation context. Pass it to external services or other cancellable reads. |
Pathname | string | Current page path without the admin base path, such as /collections/posts/123. |
RouteParams | map[string]string | Collection, document, or global identifiers for a built-in route. A literal custom route has no route parameters. |
How it works
Use List, Find, and Global for content reads; they bind the current actor and request locale with the application's configured fallback chain. Actor, ActorCollection, Locale, FallbackLocales, DisableFallback, and AllLocales options cannot override this policy.
Use Actor and ActorCollection when your external service needs application-specific access checks. URL parameters identify requested data; they are not permission grants.
Full signature
type AdminLoadContext struct {
Context context.Context
// Pathname is the normalized router-root path, without the /admin basename.
Pathname string
// RouteParams contains decoded core collection, document or global selectors.
// These are request inputs, not authorization. Custom routes are literal paths.
RouteParams map[string]string
// contains filtered or unexported fields
}Methods
AdminLoadContext.Actor()Actor returns a detached authenticated identity for application policy checks.
AdminLoadContext.ActorCollection()Public method AdminLoadContext.ActorCollection from github.com/riducms/ridu/core.
AdminLoadContext.Find()Read one saved document as the current admin user.
AdminLoadContext.Global()Read a global's saved values as the current admin user.
AdminLoadContext.List()Read a filtered page of documents as the current admin user.
AdminLoadContext.Locale()Public method AdminLoadContext.Locale from github.com/riducms/ridu/core.
AdminLoadContext.Manifest()Read the application's immutable canonical schema while an admin loader runs.