type

Document

A stored document with status and version metadata.

Properties

PropertyTypeDescription
IDstringDocument identity within its collection.
CreatedAttime.TimeCreation timestamp.
UpdatedAttime.TimeLast mutation timestamp.
DeletedAt*time.TimeTrash timestamp, when deleted.
StatusStatusDraft or published status.
RevisionintOptimistic version revision.
PublishedRevisionintPublishedRevision is the revision of the currently visible published head, or zero when the document has never been published or was unpublished. It is not the optimistic-concurrency revision for working content; Revision remains that token on ordinary authoring reads.
HasDraftChangesboolHasDraftChanges is true only on authoring reads when working content has changed since the published head. Published-only reads never disclose it.
ValuesValuesApplication field values.
LocalizationSourcesmap[string]schema.LocaleCodeLocale that supplied each projected localized field.

Full signature

type Document struct { ID string CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time Status Status Revision int // PublishedRevision is the revision of the currently visible published // head, or zero when the document has never been published or was // unpublished. It is not the optimistic-concurrency revision for working // content; Revision remains that token on ordinary authoring reads. PublishedRevision int // HasDraftChanges is true only on authoring reads when working content has // changed since the published head. Published-only reads never disclose it. HasDraftChanges bool Values Values // LocalizationSources records the locale that supplied each projected // localized field path. It is response metadata and is never persisted. LocalizationSources map[string]schema.LocaleCode }

Source store/store.go:35

Related guides