interface
Reader
Reader looks up a known document for a field rule, validator, default or hook. Reads enforce the callback's actor and ordinary authorization, use its exact locale without fallback, and reuse its active transaction. Passing another context can add cancellation but cannot discard the original cancellation or transaction. Use a resource hook and LocalAPI when application work needs nested writes; field callbacks deliberately receive only the read capability they need. During live validation and its authorization checks, reads return stored values without lifecycle hooks, defaults, or computed output.
Properties
| Property | Type | Description |
|---|---|---|
FindByID | func(context.Context, | The FindByID value. |
Full signature
type Reader interface {
FindByID(context.Context, schema.CollectionSlug, ID) (store.Document, error)
}