type
Global
type Global struct {
// Slug is the URL-safe global name used by APIs and the admin.
Slug schema.CollectionSlug
// Label overrides the author-facing name shown in navigation and headings.
Label string
// LabelTranslations overrides Label for configured admin interface languages.
LabelTranslations map[string]string
// Admin is serializable presentation metadata consumed by the framework admin.
Admin GlobalAdmin
// Fields defines the global's stored values and admin presentation.
Fields []field.Definition
// Versions enables revisions for this global.
Versions bool
// VersionConfig customizes drafts, retention, and autosave behavior.
VersionConfig VersionConfig
// Access defines read and update authorization.
Access GlobalAccess
// FieldAccess maps field paths to field-level read and update authorization.
FieldAccess map[string]FieldAccess
// FieldHooks maps field paths to lifecycle hooks scoped to those values.
FieldHooks map[string]CollectionHooks
// Hooks defines global-wide lifecycle behavior.
Hooks CollectionHooks
// Computed resolves virtual field values after an operation has produced the singleton.
Computed map[string]Computed
// Endpoints declares custom HTTP endpoints below /api/globals/<slug>.
// They run before matching built-in global routes for the same method.
Endpoints []Endpoint
}Executable authoring configuration for one singleton document.
Slugschema.CollectionSlug- URL-safe identity used by APIs and the admin.
Labelstring- Overrides the author-facing singleton name.
LabelTranslationsmap[string]string- Translated singleton labels.
AdminGlobalAdmin- Configures singleton presentation.
Fields[]field.Definition- Declares stored values and admin presentation.
Versionsbool- Enables revision history.
VersionConfigVersionConfig- Customizes drafts, retention, and autosave.
AccessGlobalAccess- Defines read and update authorization.
FieldAccessmap[string]FieldAccess- Defines field-path read and update authorization.
FieldHooksmap[string]CollectionHooks- Defines lifecycle hooks scoped to field paths.
HooksCollectionHooks- Defines global-wide lifecycle behavior.
Computedmap[string]Computed- Resolves virtual fields after an operation produces the singleton.
Endpoints[]Endpoint- Declares global-scoped custom HTTP endpoints.