method

LocalAPI.List

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

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

Source core/local.go:325

@param ctx
Request context.
@param collection
Authored collection slug.
@param options
Query and response options.
@returns
One authorized page and total count, or an operation error.

Example

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

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.