method

LocalAPI.List

List authorized documents with filtering, pagination, projection, sorting, and population.

Example

go
page, err := app.Local().List(ctx, "posts", ridu.ListOptions{
  Where: query.Equal("status", "published"),
  Page:  1,
  Limit: 20,
  Actor: actor,
})

Arguments

ArgumentTypeDescription
ctxcontext.ContextRequest context.
collectionstringAuthored collection slug.
optionsListOptionsQuery and response options.

Returns

One authorized page and total count, or an operation error.

(store.Page, error)

Full signature

func (local *LocalAPI) List( ctx context.Context, collection string, options ListOptions, ) (store.Page, error)

Source core/local.go:345

Related types

  • LocalAPI

    In-process content operations that share the REST authorization and lifecycle pipeline.

  • ListOptions

    Filtering, pagination, projection, population, authorization, and locale controls for a list read.

  • Page

    A paginated result and total count.