type
App
type App struct {
manifest schema.Manifest
local *LocalAPI
auth store.AuthStore
authMaintenance store.AuthMaintenanceStore
authByID map[schema.StableID]schema.Collection
authBySlug map[string]schema.Collection
authOrder []schema.Collection
authConfigBySlug map[string]AuthConfig
authCreatePolicySet map[string]bool
dummyPasswordHashes map[string][]byte
passwordWork *passwordWorkLimiter
bySlug map[string]schema.Collection
globalsBySlug map[string]schema.Global
uploads uploads.Manager
tasks store.TaskStore
taskRegistry map[string]taskRuntime
health store.HealthStore
readiness store.ReadinessStore
migrationReadiness store.MigrationReadinessStore
migrationHistoryDigest string
storageHealth storage.HealthBackend
readinessAdmission chan struct{}
uploadCleanupAdmission chan struct{}
uploadCleanupTimeout time.Duration
draining atomic.Bool
preferences store.PreferenceStore
documentLocks store.DocumentLockStore
documentStore store.Store
previewTokens *previewTokenRegistry
adminUserCollection schema.StableID
pluginEndpoints []runtimePluginEndpoint
customEndpoints []runtimeEndpoint
pluginTransports []runtimePluginTransport
availableLocales LocaleAvailability
}A resolved application bound to operation services.
Manifestfunc() schema.Manifest- Return the immutable resolved schema.
Handlerfunc(HandlerOptions) http.Handler- Build the REST API, admin, plugin routes, health, and readiness handler.
App owns initialized runtime services; its fields are intentionally private. Construct it with New, or let Execute own the ordinary production lifecycle.
Methods
App.Manifest()Return the immutable resolved schema.
App.Local()Return the in-process content API.
App.Handler()Build the REST API, admin, plugin routes, health, and readiness handler.
App.AuthInitialized()Report whether an auth collection has any active account.
App.AuthBootstrapAvailable()Report whether one-time anonymous setup is available for the configured admin collection.
App.CreateAuthUser()Create a content document and private credential atomically.
App.Login()Authenticate one collection identity with a password.
App.Session()Resolve one raw session token and current user.
App.RotateSession()Atomically replace a valid bearer session.
App.Sessions()List safe active-session metadata for the bearer user.
App.RevokeSession()Revoke one session belonging to the bearer user.
App.Logout()Delete the presented session.
App.LogoutAll()Revoke every session for the presented identity.
App.ChangePassword()Verify the current password, replace it, and revoke all sessions and API keys.
App.RequestPasswordReset()Issue and send a single-use reset token when configured.
App.ResetPassword()Consume a single-use reset token and revoke credentials.
App.RequestVerification()Issue and send a new email-verification token.
App.VerifyEmail()Consume a single-use email-verification token.
App.CreateAPIKey()Mint a revocable API bearer secret for a current session.
App.AuthenticateAPIKeyIdentity()Resolve an API key to its exact auth identity.
App.AuthenticateExternalIdentity()Run compiled external strategies in declaration order.
App.Upload()Validate, store, and create an upload document atomically.
App.UploadFromURL()Safely fetch and store a public HTTP(S) asset.
App.OpenUploadWithOptions()Authorize a document-backed object read.
App.UpdateUploadImage()Regenerate configured variants around a focal point or crop.
App.ReconcileUploads()Report old unreferenced application-owned objects without deleting them.
App.SchedulePublish()Queue a revision-fenced future publish.
App.ScheduledPublishes()List scheduled publishes for one authorized document.
App.CancelScheduledPublish()Dismiss one scheduled publish for an authorized document.
App.RunScheduledPublishes()Claim and run a bounded publish batch.
App.DocumentLock()Read one document lock after read authorization.
App.AcquireDocumentLock()Acquire, refresh, or explicitly take over an authoring lock.
App.CreateCollectionPreviewToken()Mint a token after read authorization.
App.FindCollectionPreview()Read the exact token-scoped draft without a session.
App.Preference()Read one opaque user-owned preference.
App.SetPreference()Validate and persist a bounded preference value.
App.DeletePreference()Delete one preference owned by an exact authenticated identity.
App.ResetPreferences()Delete every preference owned by an exact authenticated identity.
App.APIKeys()List safe active API-key metadata for the current session identity.
App.RevokeAPIKey()Revoke one API key belonging to the current session identity.
App.AuthenticateAPIKey()Resolve a bearer API key to its current user without creating a browser session.
App.PruneExpiredAuth()Remove one bounded batch of expired sessions and API keys.
App.ReleaseDocumentLock()Release only the exact authenticated identity’s document lease.
App.CreateGlobalPreviewToken()Mint a short-lived preview token for one draft global.
App.FindGlobalPreview()Read the exact token-scoped draft global without a session.
App.RevokePreviewToken()Revoke a preview capability owned by the exact authenticated identity.
App.RunTasks()Claim and execute one bounded durable-task batch.
App.CreateAuthUserWithOptions()Create an auth document and credential with exact identity and response-selection controls.
App.CreateAuthUserForTransport()Apply the safe anonymous first-user default used by framework transports.
App.CreateAuthUserForTransportWithOptions()Use the transport bootstrap policy with exact mutation options.
App.SetPassword()Validate and replace a local password, then revoke existing sessions and API keys.
App.LoginWithOptions()Authenticate and record safe client metadata on the resulting session.
App.AuthenticateExternal()Run configured request strategies and return the recognized actor.
App.ForceUnlock()Clear an account lock for an exact authenticated identity.
App.UnlockAuthUser()Find an account by configured identity and clear its login lock.
App.Duplicate()Duplicate an authorized document and independently copy upload objects.
App.DuplicateForIdentity()Duplicate for one exact authenticated collection identity.
App.DuplicateWithOptions()Duplicate with exact actor identity and response selection.
App.UploadForIdentity()Store a file for one exact authenticated collection identity.
App.UploadFromURLForIdentity()Fetch and store a remote file for one exact authenticated identity.
App.UpdateUploadImageForIdentity()Regenerate image variants for one exact authenticated identity.
App.OpenUpload()Open an object after proving it belongs to an access-visible upload document.
App.OpenUploadForIdentity()Open an upload through one exact authenticated collection identity.
App.CleanupUploads()Delete orphan candidates reported by upload reconciliation.