Module
store
github.com/riducms/ridu/store — Advanced adapter contracts for transactional documents, auth, preferences, locks, publishing, uploads, and durable tasks.
Interfaces 2
interface store.StoreStarts atomic transactions for operations.
interface store.TransactionAtomic document reads and mutations.
Types 16
type store.RequestCollection schema, predicates, pagination, locale, projection, and lock controls.
type store.CreateRequestValidated values and metadata for one document insertion.
type store.UpdateRequestAn authorized request plus values and an optional publish status.
type store.DocumentA stored document with status and version metadata.
type store.DocumentReferenceCollection and document identity for framework-owned cleanup.
type store.ValuesA map of field names to typed values.
type store.ValueA scalar, object, list, or populated document value.
type store.StatusDraft or published document state.
type store.DeletionModeChoose active, trashed, or all documents in a store request.
type store.LockModeRow-lock strength required by a semantic read.
type store.VersionOne retained version snapshot for a document.
type store.PageA paginated result and total count.
type store.DistinctRequestOne access-filtered unique-value query over a direct field.
type store.DistinctPageAscending unique values with ordinary page metadata.
type store.IndexWindowOne half-open range over a direct unique index.
type store.WindowA count-free bounded range result.
Values 9
type store.ValueKindThe adapter-neutral stored value discriminant.
store.CloneValues()Deep-copy a field value map.
store.CloneDocument()Deep-copy document values and localization metadata.
store.Number()Construct a typed number field value.
store.Boolean()Construct a typed boolean field value.
store.Null()Construct an explicit null field value.
store.Object()Construct a defensively copied nested object value.
store.List()Construct a defensively copied list value.
store.Populated()Wrap a populated relationship document.
Functions 5
store.String()Construct a typed string field value.
store.CanonicalAuthIdentity()Normalize an authentication identity to its adapter-neutral storage and lookup key.
store.ValidateDistinctRequest()Validate the bounded direct-field distinct contract.
store.ListPageBounds()Normalize list paging and calculate safe half-open result bounds.
store.ValidateDocumentID()Validate one canonical adapter-neutral document ID.
Methods 13
Optional store capabilities 15
interface store.SnapshotStoreBegin reads against one stable database snapshot.
interface store.WindowTransactionOptional count-free bounded unique-index range reads.
interface store.DistinctTransactionOptional access-filtered unique-value reads.
interface store.UploadReferenceTransactionFind requested upload keys referenced by current, trashed, or versioned documents.
interface store.UploadObjectLockerSerialize object-key adoption and destructive deletion across processes.
interface store.HealthStoreConnectivity health check.
interface store.ReadinessStoreVerify the database is usable by an exact manifest and internally complete migration state.
interface store.MigrationReadinessStoreVerify the complete applied migration ledger against executable history.
interface store.PreferenceStorePersist opaque per-user application/admin settings.
interface store.DocumentLockStoreAtomically acquire, refresh, take over, and release authoring locks.
type store.PreferenceOne opaque per-user setting.
type store.DocumentLockOne expiring exclusive authoring lease.
type store.FilteredSelectionRequestCaller and access filters for one bounded frozen selection.
type store.FilteredSelectionCanonical ascending IDs and explicit overflow state.
type store.UploadReferenceRequestA bounded object-key reference query across upload schemas.
Authentication adapter contracts 12
interface store.AuthStorePersistence required by auth-enabled collections.
interface store.AuthMaintenanceStoreBounded pruning of expired auth state.
type store.AuthCredentialPrivate password and lockout state associated with one user document.
type store.AuthTokenA persisted one-way digest of a single-use recovery secret.
type store.AuthSessionA persisted opaque session digest and safe metadata.
type store.AuthAPIKeyA persisted API-key digest and safe metadata.
interface store.AuthTransactionCreate private credentials in the owning document transaction.
interface store.AuthBootstrapTransactionSerialize and atomically create the first admin credential.
interface store.AuthUnlockStoreOptional authorized account-lock reset.
interface store.AuthUnlockTransactionReset account lockout in an already-authorized document transaction.
type store.AuthPruneResultExpired session and API-key counts removed by one bounded cycle.
type store.AuthTokenPurposeStable single-use authentication token purpose.
Version adapter contracts 2
type store.VersionRequestAn access-filtered version-history query.
interface store.VersionTransactionSame-transaction snapshot persistence and access-filtered history reads.
Publishing adapter contracts 1
type store.ScheduledPublishAdapter-neutral revision-fenced future publish record.
Task adapter contracts 7
type store.TaskAdapter-neutral durable task data.
interface store.TaskStoreGeneral-purpose durable queue persistence.
type store.TaskStatePersisted task lifecycle.
type store.TaskBackoffPersisted deterministic retry schedule.
type store.TaskClaimA bounded SKIP LOCKED claim filter and lease.
type store.TaskListBounded local task inspection filter.
type store.TaskFailureOne lease-fenced attempt failure and optional retry delay.
Reference integrity 3
type store.ReferenceDeleteRequestOne permanent-delete reconciliation request.
type store.DeleteRestrictedErrorDeterministic schema constraints preventing permanent deletion.
type store.ReferenceConstraintThe schema owner and field that restrict a hard delete.
Safety bounds 28
type store.PopulationBudgetA shared recursive population materialization budget.
constant store.MaxListWindowDocumentsThe maximum documents returned by one bounded unique-index window.
constant store.MaxUploadReferenceCandidatesThe maximum object-key set accepted by one upload-reference query.
constant store.MaxPopulationMaterializedDocumentsThe default maximum number of nested documents materialized by one populated response.
constant store.MaxAuthPruneBatchThe maximum expired-session or API-key maintenance batch.
constant store.MaxTaskPayloadBytesThe maximum encoded JSON size for durable task input or output.
constant store.MaxTaskErrorBytesThe maximum persisted UTF-8 task failure message size.
constant store.MaxTaskBatchThe maximum task claim, list, prune, queue-filter, or slug-filter batch.
constant store.MaxTaskAttemptsThe maximum configured durable task attempt count.
constant store.MaxTaskConcurrencyKeyBytesThe maximum UTF-8 byte length of a durable task concurrency key.
constant store.MaxTaskReferenceIDBytesThe maximum UTF-8 byte length of each collection or document ID in a task reference.
constant store.MaxTaskRetryDelayThe maximum durable task retry delay.
constant store.MaxTaskTimeoutThe maximum configured durable task handler timeout.
constant store.MinTaskRetentionThe minimum retention period for a terminal durable task record.
constant store.MaxTaskRetentionThe maximum retention period for a terminal durable task record.
constant store.MaxTaskLeaseDurationThe maximum lease duration for one claimed durable task.
store.NewPopulationBudget()Create a concurrency-safe recursive population budget.
store.ValidateAuthPruneBatch()Validate a maintenance batch from 1 through 500.
store.ValidateListWindowRequest()Validate one bounded unique-index range request.
store.ValidateTaskAdmission()Validate a complete durable task before admission.
store.ValidateTaskPayload()Validate a bounded non-empty JSON task payload.
store.ValidateTaskClaim()Validate one worker lease request.
store.ValidateTaskList()Validate one task-list query.
store.ValidateTaskReference()Validate a lifecycle-safe document reference.
store.ValidateTaskBatch()Validate a prune or adapter batch bound.
store.ValidateTaskLeaseDuration()Validate an operationally bounded task lease.
store.ValidateTaskFailure()Validate persisted failure and retry metadata.
store.ValidateTaskRelease()Validate worker lease-release delay and failure metadata.
Errors 1
type store.Store errorsStable adapter error sentinels.
Constants 26
constant store.AuthTokenPasswordResetPublic constant AuthTokenPasswordReset from github.com/riducms/ridu/store.
constant store.AuthTokenVerifyEmailPublic constant AuthTokenVerifyEmail from github.com/riducms/ridu/store.
constant store.DeletionActivePublic constant DeletionActive from github.com/riducms/ridu/store.
constant store.DeletionAllPublic constant DeletionAll from github.com/riducms/ridu/store.
constant store.DeletionTrashPublic constant DeletionTrash from github.com/riducms/ridu/store.
constant store.LockMutationPublic constant LockMutation from github.com/riducms/ridu/store.
constant store.LockNonePublic constant LockNone from github.com/riducms/ridu/store.
constant store.LockReferencePublic constant LockReference from github.com/riducms/ridu/store.
constant store.MaxDocumentIDBytesMaxDocumentIDBytes keeps canonical IDs representable anywhere Ridu persists a document reference, including scheduled publishing and auth-owned tasks.
constant store.StatusDraftPublic constant StatusDraft from github.com/riducms/ridu/store.
constant store.StatusPublishedPublic constant StatusPublished from github.com/riducms/ridu/store.
constant store.TaskBackoffExponentialPublic constant TaskBackoffExponential from github.com/riducms/ridu/store.
constant store.TaskBackoffFixedPublic constant TaskBackoffFixed from github.com/riducms/ridu/store.
constant store.TaskBackoffLinearPublic constant TaskBackoffLinear from github.com/riducms/ridu/store.
constant store.TaskStateCanceledPublic constant TaskStateCanceled from github.com/riducms/ridu/store.
constant store.TaskStateFailedPublic constant TaskStateFailed from github.com/riducms/ridu/store.
constant store.TaskStateQueuedPublic constant TaskStateQueued from github.com/riducms/ridu/store.
constant store.TaskStateRunningPublic constant TaskStateRunning from github.com/riducms/ridu/store.
constant store.TaskStateSucceededPublic constant TaskStateSucceeded from github.com/riducms/ridu/store.
constant store.ValueBooleanPublic constant ValueBoolean from github.com/riducms/ridu/store.
constant store.ValueDocumentPublic constant ValueDocument from github.com/riducms/ridu/store.
constant store.ValueListPublic constant ValueList from github.com/riducms/ridu/store.
constant store.ValueNullPublic constant ValueNull from github.com/riducms/ridu/store.
constant store.ValueNumberPublic constant ValueNumber from github.com/riducms/ridu/store.
constant store.ValueObjectPublic constant ValueObject from github.com/riducms/ridu/store.
constant store.ValueStringPublic constant ValueString from github.com/riducms/ridu/store.
Variables 6
variable store.ErrAuthInitializedPublic variable ErrAuthInitialized from github.com/riducms/ridu/store.
variable store.ErrConflictPublic variable ErrConflict from github.com/riducms/ridu/store.
variable store.ErrDeleteRestrictedPublic variable ErrDeleteRestricted from github.com/riducms/ridu/store.
variable store.ErrNotFoundPublic variable ErrNotFound from github.com/riducms/ridu/store.
variable store.ErrPopulationLimitPublic variable ErrPopulationLimit from github.com/riducms/ridu/store.
variable store.ErrTaskLeaseLostPublic variable ErrTaskLeaseLost from github.com/riducms/ridu/store.