method
LocalAPI.FindWithOptions
func (local *LocalAPI) FindWithOptions(
ctx context.Context,
collection,
id string,
options FindOptions,
) (store.Document, error)Read one document with projection, population, draft, trash, and locale controls.
Example
post, err := app.Local().FindWithOptions(
ctx,
"posts",
postID,
ridu.FindOptions{
Actor: actor,
Populate: []query.Population{{Path: authorPath, Depth: 1}},
},
)Related types
LocalAPIIn-process content operations that share the REST authorization and lifecycle pipeline.
FindOptionsProjection, population, authorization, draft, trash, and locale controls for one read.
DocumentA stored document with status and version metadata.