Module

core

github.com/riducms/ridu/core — Application settings and server APIs, also available from the root ridu package.

Types 27

  • type core.CollectionHooks

    CollectionHooks configures resource-level callbacks through Collection.Hooks or Global.Hooks. Use BeforeChange to change values before a save, AfterRead to change a response without changing storage, and AfterCommit for effects that must run only after a successful commit. Each list runs in declaration order. Resource hooks run before field hooks in the same phase, except AfterCommit, where field hooks run first. Globals do not support BeforeDuplicate, BeforeDelete, or AfterDelete.

  • type core.HookContext

    HookContext supplies the request, values, and local API to a collection or global hook. Change entries in Data before saving, or values in Document to change the response after saving. A Hook returns only an error.

  • type core.PluginDescriptor

    PluginDescriptor is deterministic public metadata for one compiled plugin. It is copied into the canonical manifest so generators, migration planning, the admin build, and compatibility tooling all inspect the same declaration. Executable hooks, handlers, validators, and secrets never belong here.

  • type core.AdminConfig

    Application-level configuration for the framework-owned admin.

  • type core.AdminLocalizationConfig

    Admin interface languages and editor timezone choices.

  • type core.AdminLanguage

    One statically bundled admin interface language.

  • type core.AdminTimeZone

    One timezone offered by the admin interface.

  • type core.CollectionLabels

    Author-facing singular and plural collection names.

  • type core.CollectionIndex

    One ordered compound database index.

  • type core.GlobalAdmin

    Serializable presentation metadata for a global.

  • type core.Config

    Executable application-owned Ridu configuration.

  • type core.LocalizationConfig

    Application content-locale configuration.

  • type core.LocaleAvailability

    Dynamically limit content locales shown to one author.

  • type core.LocaleAvailabilityContext

    Request input for dynamic admin locale visibility.

  • type core.Locale

    One content locale and its ordered fallback chain.

  • type core.Collection

    Collection defines one document collection in authoring configuration.

  • type core.CollectionAdmin

    Serializable collection presentation metadata.

  • type core.Global

    Global defines one singleton document in authoring configuration.

  • type core.VersionConfig

    Revision and draft behavior for a versioned resource.

  • type core.AdminLoadContext

    Read content for the signed-in user while a Go admin loader runs.

  • type core.AdminLoaderDefinition

    A Go admin loader ready to register in your application's Admin.Loaders.

  • type core.BulkOptions

    BulkOptions controls the actor and localization of an atomic batch or empty-trash operation. Bulk actions do not consume per-document revisions, population, draft status, or caller IDs.

  • type core.FieldGraphContext

    FieldGraphContext identifies the resource a graph plugin is editing. Resource transforms complete first; graph transforms then run once in Plugins order. Resource hooks, endpoints and domain capabilities retain their own contracts.

  • type core.PublicationScheduleOptions

    PublicationScheduleOptions controls revision fencing and the saved display timezone. TimeZone is optional; it never changes the instant supplied in runAt.

  • type core.TypedReadOptions

    TypedReadOptions controls population/projection without changing the generated definition's single-locale or all-locales output shape.

  • type core.UploadGrant

    UploadGrant is a short-lived delivery URL for one upload object. The URL authorizes that object without carrying the session token.

  • type core.UploadGrantRequest

    UploadGrantRequest names one upload document and an optional configured image size. An empty Size selects the original object.

Runtime 41

Application 6

Local API 7

Local API options 9

Authentication 47

Uploads 18

Publishing 4

Document locks 5

Live preview 8

Preferences 4

Generated Go API 21

Access 9

Hooks 4

Interfaces 5

  • interface core.Plugin

    The minimum compiled backend plugin contract.

  • interface core.DescriptorProvider

    Opt into versioned generation, migration, and compatibility tooling.

  • interface core.TaskDefinition

    Non-generic compiled task boundary stored in Config.Tasks.

  • interface core.FieldGraphTransformer

    FieldGraphTransformer edits immutable fields through public graph operations. The input and result are snapshotted. Plugins should return deterministic edits; closure captures and other plugin-owned external state remain their responsibility. Duplicate plugin keys are rejected before any transform runs.

  • interface core.FieldGraphValidator

    FieldGraphValidator checks a resource's final immutable field configuration after every graph transformer has completed. It cannot publish graph edits. Use this for plugin-owned schema and host settings, not document validation; runtime value validators belong to the field or plugin value contract.

Capabilities 10

Custom endpoints 3

Descriptors 9

Constants 26

Methods 97

Functions 4

  • core.NewAdminLoader()

    Define a Go read function whose result is supplied to an admin component.

  • core.NewTypedAllLocalesCollection()

    NewTypedAllLocalesCollection constructs an all-locales generated read definition.

  • core.NewTypedAllLocalesGlobal()

    NewTypedAllLocalesGlobal constructs an all-locales generated global definition.

  • core.Reject()

    Reject stops an operation from a collection, global, or field hook with a message for the person who made the request. The admin shows the message, and REST, the SDK, and the Local API return it as a "rejected" error (HTTP 422). Any other error from a hook is reported as an internal failure whose message stays on the server.