type
Store
A replica-set implementation of Ridu’s document, snapshot, auth, preference, task, lock, upload, readiness, and migration contracts.
Implemented capabilities
| Property | Type | Description |
|---|---|---|
store.Store | document transactions | Begins majority-committed snapshot-isolated write transactions. |
store.SnapshotStore | stable snapshots | Begins stable read-only adapter snapshots. |
store.HealthStore | connectivity | Checks the writable replica-set primary. |
store.ReadinessStore | runtime readiness | Checks manifest-ledger and managed-index readiness. |
store.MigrationReadinessStore | exact executable history | Checks the complete ledger against the release-binary fingerprint. |
store.PreferenceStore | preferences | Persists per-user settings. |
store.DocumentLockStore | document locks | Coordinates authoring leases. |
store.AuthStore | authentication | Persists credentials, sessions, tokens, API keys, and rate limits. |
store.AuthMaintenanceStore | auth maintenance | Prunes expired auth records in bounded batches. |
store.AuthUnlockStore | account unlocks | Clears authorized persisted lockout state. |
store.TaskStore | durable tasks | Persists and leases durable work. |
store.UploadObjectLocker | upload coordination | Coordinates upload object changes across processes. |
How it works
Use the application and Local API for content operations; the adapter exposes no raw BSON filter, database handle, ObjectID contract, or second Mongo-specific content API.
Transactions add auth/bootstrap/unlock, versions, distinct, windows, upload-reference lookup, and transaction-level upload locking to store.Transaction.
Production support is limited to generated starter and blank applications on Linux x86-64 with MongoDB Community 8.2.9, SCRAM-SHA-256, verified TLS, and a writable three-member replica set. Atlas, DocumentDB, Cosmos DB, standalone or sharded deployments, and other versions, topologies, and platforms are not supported.
Full signature
type Store struct {
// contains filtered or unexported fields
}Methods
Store.Close()Idempotently stop adapter work and release the MongoDB client within an internal bound.
Store.Ping()Check that the replica set can serve a primary read.
Store.Ready()Prove manifest-ledger and complete managed-index readiness for development and diagnostics.
Store.ReadyWithMigrationHistory()Prove exact executable history, manifest, completed step state, and managed-index readiness.
Store.Begin()Begin a majority-committed snapshot-isolated write transaction.
Store.BeginSnapshot()Begin a stable snapshot in read-only adapter mode.
Store.VerifyIndexes()Non-mutatingly verify the complete managed index plan and authorize this Store instance.
Store.ApplyArtifacts()Validate complete immutable history, take the fenced lease, and apply pending work.
Store.ApplyArtifactsWithOptions()Apply pending physical and semantic steps with explicit maintenance and bounded coordination.
Store.ArtifactStatus()Validate immutable history and report durable artifact, phase, and step progress.
Store.ArtifactPlan()Return the same strict state with deterministic phase and step topology.
Store.AcquireDocumentLock()Public method Store.AcquireDocumentLock from github.com/riducms/ridu/adapters/mongodb.
Store.AllowAuthAttempt()Public method Store.AllowAuthAttempt from github.com/riducms/ridu/adapters/mongodb.
Store.CancelTask()Public method Store.CancelTask from github.com/riducms/ridu/adapters/mongodb.
Store.ChangePasswordHash()Public method Store.ChangePasswordHash from github.com/riducms/ridu/adapters/mongodb.
Store.ClaimTasks()Public method Store.ClaimTasks from github.com/riducms/ridu/adapters/mongodb.
Store.CompleteTask()Public method Store.CompleteTask from github.com/riducms/ridu/adapters/mongodb.
Store.CreateAPIKey()Public method Store.CreateAPIKey from github.com/riducms/ridu/adapters/mongodb.
Store.CreateAuthToken()Public method Store.CreateAuthToken from github.com/riducms/ridu/adapters/mongodb.
Store.CreateSession()Public method Store.CreateSession from github.com/riducms/ridu/adapters/mongodb.
Store.DeleteAPIKey()Public method Store.DeleteAPIKey from github.com/riducms/ridu/adapters/mongodb.
Store.DeletePreference()Public method Store.DeletePreference from github.com/riducms/ridu/adapters/mongodb.
Store.DeletePreferences()Public method Store.DeletePreferences from github.com/riducms/ridu/adapters/mongodb.
Store.DeleteSession()Public method Store.DeleteSession from github.com/riducms/ridu/adapters/mongodb.
Store.DeleteUserSession()Public method Store.DeleteUserSession from github.com/riducms/ridu/adapters/mongodb.
Store.DeleteUserSessions()Public method Store.DeleteUserSessions from github.com/riducms/ridu/adapters/mongodb.
Store.DismissTaskForTarget()Public method Store.DismissTaskForTarget from github.com/riducms/ridu/adapters/mongodb.
Store.EnqueueTask()Public method Store.EnqueueTask from github.com/riducms/ridu/adapters/mongodb.
Store.FailTask()Public method Store.FailTask from github.com/riducms/ridu/adapters/mongodb.
Store.FindAPIKey()Public method Store.FindAPIKey from github.com/riducms/ridu/adapters/mongodb.
Store.FindAuthCredential()Public method Store.FindAuthCredential from github.com/riducms/ridu/adapters/mongodb.
Store.FindDocumentLock()Public method Store.FindDocumentLock from github.com/riducms/ridu/adapters/mongodb.
Store.FindSession()Public method Store.FindSession from github.com/riducms/ridu/adapters/mongodb.
Store.FindTask()Public method Store.FindTask from github.com/riducms/ridu/adapters/mongodb.
Store.ForceUnlock()Public method Store.ForceUnlock from github.com/riducms/ridu/adapters/mongodb.
Store.GetPreference()Public method Store.GetPreference from github.com/riducms/ridu/adapters/mongodb.
Store.HeartbeatTask()Public method Store.HeartbeatTask from github.com/riducms/ridu/adapters/mongodb.
Store.ListAPIKeys()Public method Store.ListAPIKeys from github.com/riducms/ridu/adapters/mongodb.
Store.ListSessions()Public method Store.ListSessions from github.com/riducms/ridu/adapters/mongodb.
Store.ListTasks()Public method Store.ListTasks from github.com/riducms/ridu/adapters/mongodb.
Store.LockUploadObjects()LockUploadObjects acquires one separately committed exact-owner lock set. Acquisition is all-or-none, and rows remain held until release. Graceful shutdown must drain callers before Store.Close; crash-abandoned rows require explicit operator recovery.
Store.PruneExpiredAuth()Public method Store.PruneExpiredAuth from github.com/riducms/ridu/adapters/mongodb.
Store.PruneTasks()Public method Store.PruneTasks from github.com/riducms/ridu/adapters/mongodb.
Store.RecordFailedLogin()Public method Store.RecordFailedLogin from github.com/riducms/ridu/adapters/mongodb.
Store.ReleaseDocumentLock()Public method Store.ReleaseDocumentLock from github.com/riducms/ridu/adapters/mongodb.
Store.ReleaseTask()Public method Store.ReleaseTask from github.com/riducms/ridu/adapters/mongodb.
Store.ResetLoginAttempts()Public method Store.ResetLoginAttempts from github.com/riducms/ridu/adapters/mongodb.
Store.ResetPasswordWithToken()Public method Store.ResetPasswordWithToken from github.com/riducms/ridu/adapters/mongodb.
Store.RotateSession()Public method Store.RotateSession from github.com/riducms/ridu/adapters/mongodb.
Store.SetPasswordHash()Public method Store.SetPasswordHash from github.com/riducms/ridu/adapters/mongodb.
Store.SetPreference()Public method Store.SetPreference from github.com/riducms/ridu/adapters/mongodb.
Store.TouchAPIKey()Public method Store.TouchAPIKey from github.com/riducms/ridu/adapters/mongodb.
Store.UpgradePasswordHash()Public method Store.UpgradePasswordHash from github.com/riducms/ridu/adapters/mongodb.
Store.VerifyEmailWithToken()Public method Store.VerifyEmailWithToken from github.com/riducms/ridu/adapters/mongodb.
Store.AdoptArtifacts()AdoptArtifacts records pending migrations as applied, without running them, through the newest one whose schema the database already has, such as a database ridu dev synchronized. See ridu migrate baseline.
Store.ClearDevelopmentFieldKinds()ClearDevelopmentFieldKinds clears only the reviewed field values from working documents, published heads, and retained snapshots, with references in one transaction. Immutable applied or incomplete migration history requires the reviewed runner.
Store.DevelopmentManifest()DevelopmentManifest returns the database-owned last synchronized schema. Existing indexes or JSON documents do not prove the previous field kinds, so collections without a record are an error; a fresh database has none.
Store.FindSessionByID()Public method Store.FindSessionByID from github.com/riducms/ridu/adapters/mongodb.
Store.HasMigrationHistory()HasMigrationHistory includes partial semantic work, which development recovery must never mutate outside the immutable runner.
Store.ReplaceBaseline()ReplaceBaseline atomically replaces a verified development artifact/step ledger. Content, snapshots, namespaces, and indexes are never changed. Replacement artifacts from the first unrecorded semantic step onward stay pending for ApplyArtifacts.
Store.ReviewDevelopmentFieldKinds()ReviewDevelopmentFieldKinds reads both active heads and every snapshot under one stable database snapshot, counting each logical document once.
Store.ReviewDevelopmentVersions()ReviewDevelopmentVersions counts the documents, trashed ones included, that each resource starting to keep versions between before and after already stores in this database. It changes nothing.
Store.SyncDevelopmentSchema()SyncDevelopmentSchema verifies additive index sync under the migration lease, then records its manifest in a fenced transaction. Failed builds never certify the candidate schema.