type

BoundTypedGlobal

Typed singleton methods for reads, working drafts, publication, restoration, and discard.

Properties

PropertyTypeDescription
Find(ctx, options)(Document, error)Read one locale with optional population, projection and exact actor identity.
Update(ctx, input, options)(Document, error)Initialize or update working singleton values from the strict Update model. Published versioned content fails with publish_required unless the update has draft intent; use PublishChanges to edit and publish it.
SaveDraft(ctx, input, options)(Document, error)Stage incomplete working values from the generated Draft model without changing live content.
DiscardDraft(ctx, options)(Document, error)Reset pending working values to the live singleton under an expected-revision fence.
Publish(ctx, options)(Document, error)Validate the complete working singleton and promote it to live content.
PublishChanges(ctx, input, options)(Document, error)Apply a strict partial update from the Update model and publish the result in one operation.
Unpublish(ctx, options)(Document, error)Remove the live snapshot while retaining working content as draft.
Restore(ctx, revision, options)(Document, error)Restore a retained snapshot with its historical publication state: published snapshots become live; draft snapshots remain unpublished.
RestoreAsDraft(ctx, revision, options)(Document, error)Stage a retained snapshot in working content without unpublishing the existing live snapshot.

How it works

Generated wrappers keep singleton methods discoverable without changing LocalAPI semantics or authorization. TypedMutationOptions.ExpectedRevision fences concurrent writes; publication validates the full working candidate.

Full signature

type BoundTypedGlobal[Document, Update, Draft any] struct { // contains filtered or unexported fields }

Source core/typed_global.go:27

Methods