Module
ridu
github.com/riducms/ridu — The ergonomic application facade for config, startup, and access decisions.
Functions 6
ridu.New()Create an application from config and a document store.
ridu.Resolve()Resolve executable config into a deterministic schema manifest.
ridu.Execute()Run the API, admin, jobs, and shutdown lifecycle.
ridu.Allow()Allow an access-controlled operation.
ridu.Deny()Deny an access-controlled operation.
ridu.Where()Constrain access to documents matching a query expression.
Types 3
type ridu.ConfigThe complete author-owned application definition.
type ridu.CollectionA repeatable model with fields, access, hooks, and capabilities.
type ridu.GlobalA singleton model exposed through the same operation engine.
Configuration 18
type ridu.LocalizationConfigContent locales, fallback behavior, and optional request-scoped admin availability.
type ridu.LocaleOne content locale and its ordered fallback chain.
type ridu.CollectionAdminSerializable collection presentation and editorial organization.
type ridu.LivePreviewConfigA frontend URL template and named authoring viewports.
type ridu.AuthConfigPolicy for an auth-enabled collection.
type ridu.UploadConfigValidation, privacy, and image-variant policy for an upload collection.
type ridu.VersionConfigDrafts, snapshot retention, and autosave policy.
type ridu.ComputedResolve a virtual output field after an operation produces a document.
type ridu.AdminConfigSelect the auth collection trusted to enter the framework admin.
type ridu.AdminLocalizationConfigConfigure admin interface languages and editor timezone choices.
type ridu.AdminLanguageOne statically bundled admin interface language.
type ridu.AdminTimeZoneOne timezone offered to editors.
type ridu.CollectionLabelsSingular and plural author-facing collection labels.
type ridu.CollectionIndexOne ordered compound index; Unique enforces tuple uniqueness.
type ridu.GlobalAdminSerializable singleton presentation metadata.
type ridu.DocumentLockConfigExpiration policy for coordinated authoring locks.
type ridu.ComputedContextTrusted document, actor, locale, operation, and LocalAPI inputs for a virtual resolver.
type ridu.PreviewBreakpointOne named live-preview viewport.
Runtime setup 12
type ridu.HandlerOptionsHTTP security, size bounds, observers, and trusted-proxy policy.
ridu.WithStore()Provide the singular document-store adapter through the Execute lifecycle.
ridu.WithProjectMigrations()Register the selected adapter’s compiled migration driver for project commands.
ridu.WithAddress()Configure the HTTP listen address independently from the store adapter.
ridu.WithUploadStorage()Provide object storage through the Execute lifecycle.
ridu.WithHandlerOptions()Configure the generated HTTP handler used by Execute.
ridu.WithServerOptions()Configure production socket and graceful-drain bounds.
type ridu.ServerOptionsSocket timeouts, graceful drain, and readiness admission.
type ridu.StoreFactoryA lazy, lifecycle-owned document-store constructor.
type ridu.StorageFactoryA lazy, lifecycle-owned object-storage constructor.
type ridu.ReadinessCheckA bounded repeatable custom readiness dependency check.
type ridu.ExecuteOptionOne opaque runtime option accepted by Execute.
Local API 14
type ridu.FindOptionsProjection, population, actor, draft, trash, and locale controls for one read.
type ridu.ListOptionsFilter, page, sort, projection, population, actor, draft, trash, and locale list controls.
type ridu.DistinctOptionsField, filter, page, actor, draft, trash, and locale controls for a unique-value read.
type ridu.ListWindowOptionsBounded unique-index range, projection, actor, and locale controls.
type ridu.MutationOptionsActor, revision, draft, response, and locale controls for one write.
type ridu.LocaleOptionsLocale selection for concise single-document calls.
type ridu.CapabilityOptionsProposed data, actor, trash, and locale input for side-effect-free access evaluation.
type ridu.AccessCapabilitiesEvaluated operation and field permission booleans.
type ridu.ImportOptionsTrusted migration identity, status, and source timestamps.
type ridu.OperationErrorThe stable code, HTTP status, message, validation issues, cause, and commit-state error returned across operation boundaries.
type ridu.LocalAPIIn-process content operations over the shared operation engine.
type ridu.OperationCapabilitiesEvaluated boolean permissions for resource operations.
type ridu.FieldCapabilitiesEvaluated read/create/update booleans for one field path.
type ridu.JoinMutationResultRefreshed source document plus applied inverse-relation delta counts.
Authentication 20
type ridu.PasswordPolicyLength, byte, bcrypt, and common-password policy for local credentials.
type ridu.PasswordResetConfigToken lifetime and trusted notification callback for password recovery.
type ridu.VerifyEmailConfigToken lifetime and trusted notification callback for email verification.
type ridu.AuthAccessRules for login, sessions, recovery, API keys, and external authentication.
type ridu.AuthContextExact actor, operation, request, and LocalAPI state for an auth rule or hook.
type ridu.AuthHooksCompiled authentication lifecycle observers.
type ridu.AuthStrategyOne compiled external request-authentication strategy.
type ridu.AuthIdentityAn exact auth collection plus actor document.
type ridu.AuthSessionA new bearer session, safe ID, typed user, and expiry.
type ridu.AuthSessionInfoSafe session/device metadata without the bearer secret.
type ridu.APIKeyA newly minted API key including its one-time secret.
type ridu.APIKeyInfoSafe metadata for listing an existing API key.
type ridu.LoginOptionsClient IP and user-agent metadata recorded with a session.
type ridu.AuthAccessRuleAllow or deny one non-CRUD authentication operation.
type ridu.AuthHookObserve or reject one authentication lifecycle phase.
type ridu.AuthOperationLogin, logout, refresh, recovery, verification, API-key, or external-auth operation.
type ridu.AuthStrategyContextNormalized headers and target collection for an external strategy.
type ridu.AuthStrategyResultWhether an external strategy recognized and authenticated a request.
type ridu.PasswordResetNotificationTrusted password-reset delivery payload including the raw one-time token.
type ridu.VerifyEmailNotificationTrusted email-verification delivery payload including the raw one-time token.
Uploads 3
type ridu.ImageSizeOne named derived image variant and fit policy.
type ridu.UploadInputStreamed file bytes, application metadata, identity, and locale.
type ridu.ReconcileResultScanned, candidate, and deleted counts from upload reconciliation.
Durable tasks 24
ridu.NewTask()Define a compiled typed durable task.
type ridu.TypedTaskA registered typed handle for durable admission, status, and cancellation.
ridu.TaskQueue()Select the queue used by a typed task.
ridu.TaskRetries()Persist retry count, delay, maximum delay, and backoff policy.
ridu.TaskTimeout()Bound one handler attempt.
ridu.TaskRetention()Keep terminal task status/output for a bounded duration.
ridu.TaskAdmissionReconciler()Repair durable domain records that missed task admission.
ridu.RetryTask()Return a retryable handler failure using configured backoff.
ridu.RetryTaskAfter()Return a retryable handler failure with an explicit delay.
ridu.AbortTask()Return a terminal handler failure.
type ridu.TaskContextCancellation, task identity, attempt number, and application access for one handler.
type ridu.TaskEnqueueOptionsRun time, queue, concurrency key, target, and requester for admission.
type ridu.TaskReceiptA typed stable handle returned by durable admission.
type ridu.TaskResultTyped task status, attempts, failure, timestamps, and optional output.
type ridu.TaskErrorA stable typed durable-task failure.
type ridu.TaskBackoffFixed, linear, or exponential durable retry schedule.
type ridu.TaskDefinitionNon-generic compiled task boundary stored in Config.Tasks.
type ridu.TaskErrorCodeStable framework task failure category.
type ridu.TaskOptionOne typed task policy option.
type ridu.TaskReconcilerBounded recovery scan for a durable task admission gap.
type ridu.TaskRunSummaryClaimed, succeeded, failed, and released counts for a worker cycle.
constant ridu.MaxTaskPayloadBytesThe maximum encoded JSON size accepted for durable task input or output.
type ridu.TaskHandlerA compiled typed durable task function.
type ridu.TaskStateQueued, running, succeeded, failed, or canceled durable state.
Access 9
type ridu.AccessDecisionAn allow, deny, or atomic document-filter decision.
type ridu.AccessRuleAuthorize one operation with actor and transaction context.
type ridu.AccessContextActor, target, locale, data, and nested API supplied to an access rule.
type ridu.CollectionAccessAccess rules for collection admin, create, read, update, delete, and unlock operations.
type ridu.GlobalAccessAllow-or-deny rules for global reads, versions, and updates.
type ridu.FieldAccessIndependent create, read, and update rules for one authored field.
type ridu.FieldAccessRuleAuthorize or redact one authored field value.
type ridu.FieldAccessContextOperation, actor, path, value, siblings, and locale supplied to a field rule.
type ridu.AccessDecisionKindAllow, deny, or filtered-decision discriminant.
Hooks 5
type ridu.HookContextThe request, document, actor, locale, and transaction state available to a hook.
type ridu.HookA deterministic lifecycle callback.
type ridu.CollectionHooksOrdered lifecycle callbacks for one collection.
type ridu.AfterCommitDispatcherDeliver a hook effect after its document transaction commits.
type ridu.AfterCommitEffectIdentity and executable work for one committed lifecycle effect.
Custom endpoints 3
type ridu.EndpointOne application-authored method and path handler mounted at root, collection, or global scope.
type ridu.EndpointContextRaw HTTP, route parameters, actor identity, and LocalAPI supplied to a custom endpoint.
type ridu.EndpointHandlerTrusted compiled custom endpoint handler.
Plugins 29
type ridu.PluginThe minimum stable-key contract for trusted compiled backend extensions.
type ridu.PluginDescriptorVersioned public generation, migration, and admin metadata.
type ridu.DescriptorProviderA plugin providing versioned public metadata.
type ridu.GenerationProviderA plugin contributing deterministic files from executable configuration.
type ridu.PluginGenerationContextImmutable manifest input for compiled plugin generation.
type ridu.PluginGeneratedArtifactA deterministic plugin-scoped generated file.
type ridu.ConfigTransformerA plugin transforming defensive config copies before final resolution.
type ridu.HookProviderA plugin contributing ordered collection or field hooks.
type ridu.FieldValidatorProviderA plugin validating its custom field values.
type ridu.EndpointProviderA plugin contributing namespaced REST endpoints.
type ridu.TransportProviderA plugin binding an application-level protocol transport.
type ridu.AdminPluginMetadataStatic package/export pairing for a plugin admin half.
type ridu.RiduCompatibilityHalf-open framework version range supported by a plugin.
type ridu.PluginFieldTypeGenerated Go, TypeScript, where, and OpenAPI mapping for a plugin field.
type ridu.PluginDatabaseAdapterPostgreSQL or SQLite identity for exceptional private plugin schema.
type ridu.PluginDatabaseContributionOne explicitly adapter-scoped private plugin migration bundle.
type ridu.PluginMigrationOne immutable contiguous reversible plugin database transition.
type ridu.PluginHookContributionOrdered collection or field hooks contributed by a plugin.
type ridu.PluginFieldValidationContextResolved field, concrete runtime path, and candidate value for validation.
type ridu.PluginFieldValidatorReturn path-aware issues for one plugin-owned value.
type ridu.PluginEndpointOne exact method-specific namespaced REST endpoint.
type ridu.PluginEndpointContextHTTP, exact actor identity, LocalAPI, rate-admission, and diagnostic helpers.
type ridu.PluginEndpointHandlerTrusted compiled namespaced endpoint handler.
type ridu.PluginTransportOne absolute application-level protocol route.
type ridu.PluginTransportContextImmutable manifest and initialized public APIs supplied during protocol binding.
constant ridu.PluginAPIVersionThe compiled backend plugin API version required by PluginDescriptor.
constant ridu.AdminPluginAPIVersionThe statically bundled admin-plugin API version required by AdminPluginMetadata.
constant ridu.PluginDatabaseAdapterPostgresSelect PostgreSQL-specific private plugin schema.
constant ridu.PluginDatabaseAdapterSQLiteSelect SQLite-specific private plugin schema.
Observability 3
type ridu.AuditEventSecurity-relevant application event metadata.
type ridu.RequestObservationCompleted request timing, route, response size, error code, and status metadata.
type ridu.RequestErrorEventTrusted internal diagnostic detail hidden from public HTTP responses.
Application contracts 1
type ridu.AppA resolved application bound to its document and optional service stores.
Runtime 2
type ridu.OperationThe lifecycle operation currently being authorized or handled.
constant ridu.FrameworkVersionThe semantic Ridu framework version used by project and CLI compatibility checks.
Constants 36
constant ridu.AccessAllowconstant ridu.AccessDenyconstant ridu.AccessWhereconstant ridu.AuthOperationAPIKeyconstant ridu.AuthOperationEmailVerificationconstant ridu.AuthOperationExternalStrategyconstant ridu.AuthOperationLoginconstant ridu.AuthOperationLogoutconstant ridu.AuthOperationPasswordResetconstant ridu.AuthOperationRefreshconstant ridu.OperationAdminconstant ridu.OperationCreateconstant ridu.OperationDeleteconstant ridu.OperationDeletePermanentconstant ridu.OperationDuplicateconstant ridu.OperationPublishconstant ridu.OperationReadconstant ridu.OperationReadVersionsconstant ridu.OperationRestoreDeletedconstant ridu.OperationUnpublishconstant ridu.OperationUpdateconstant ridu.TaskBackoffExponentialconstant ridu.TaskBackoffFixedconstant ridu.TaskBackoffLinearconstant ridu.TaskErrorInvalidInputconstant ridu.TaskErrorInvalidOutputconstant ridu.TaskErrorLeaseLostconstant ridu.TaskErrorNotFoundconstant ridu.TaskErrorNotRegisteredconstant ridu.TaskErrorStoreFailedconstant ridu.TaskErrorUnavailableconstant ridu.TaskStateCanceledconstant ridu.TaskStateFailedconstant ridu.TaskStateQueuedconstant ridu.TaskStateRunningconstant ridu.TaskStateSucceeded