method
AdminLoadContext.List
Read a filtered page of documents as the current admin user.
Example
posts, err := ctx.List("posts", ridu.ListOptions{Limit: 20})Arguments
| Argument | Type | Description |
|---|---|---|
collection | string | Collection slug to read. |
options | ListOptions | Filters, sort, page size, and population settings. Identity and locale come from the request. |
Returns
A page of accessible documents and its matching total, or the read error.
(store.Page, error)How it works
Uses the normal content operation with the request's permissions, field redaction, hooks, and content locale. Return the error from your loader so the admin can offer retry.
Full signature
func (ctx AdminLoadContext) List(
collection string,
options ListOptions,
) (store.Page, error)Related types
AdminLoadContextRead content for the signed-in user while a Go admin loader runs.
ListOptionsFiltering, pagination, projection, population, authorization, and locale controls for a list read.
PageA paginated result and total count.