Module
schema
github.com/riducms/ridu/schema — Inspect Ridu's resolved collections and fields, and work with resource, field, and locale identifiers.
Functions 32
schema.NewManifest()schema.Parse()schema.ParseHistorical()schema.IsSupportedEndpointMethod()schema.IsValidEndpointPath()schema.BindBlockReferences()schema.BlockTemplate()schema.CascadeReferenceIssues()schema.ChildFields()schema.ClearDescendantLocalization()schema.DefinitionChildFields()schema.DescendantTraits()schema.EachDefinitionChildList()schema.EmbeddedBlocks()schema.EmbeddedDefinitionBlocks()schema.EmbeddedTypeFields()schema.EqualFields()schema.FieldAtPath()schema.IsValidBlockTypeName()schema.IsValidTimeZoneID()schema.ListTraits()schema.NewBlockDefinitions()schema.PlacementFieldID()schema.ReferenceCase()schema.ReferenceTypes()schema.ValidateAdminLoaders()schema.ValidateEmbeddedMetadata()schema.ValidateEmbeddedTrees()schema.ValidateFieldEditor()schema.ValidateFieldEditors()schema.WalkDefinitionFields()schema.WalkPlacements()
Types 19
type schema.ManifestAn immutable versioned schema contract.
type schema.DateFieldDateField describes how a stored date string is authored and presented.
type schema.PluginPlugin records one compiled plugin that participated in config resolution. A plugin's package version and Ridu compatibility range are checked when config is resolved but are not schema, so upgrading a plugin is never a data-model change.
type schema.StableIDA deterministic identifier for schema evolution.
type schema.CollectionSlugA validated collection or global slug.
type schema.LocaleCodeA validated locale identity used by operations, manifests, and storage.
type schema.AdminDataTypeAdminDataType is the JSON subset supported by typed admin loaders. Inputs are objects of scalar query parameters; outputs may contain nested objects and arrays. Optional marks an omitted object property, Nullable a JSON null.
type schema.AdminLoaderAdminLoader describes a compiled, authenticated admin read. Executable code remains in core; these JSON shapes drive generated browser contracts.
type schema.BlockAdminBlockAdmin contains presentation metadata derived from direct block children.
type schema.BlockDefinitionsBlockDefinitions holds the block definitions of one schema and the definition views shared by all of their placements. A builder may add definitions while it resolves configuration; views are created on first use.
type schema.BlockLabelsBlockLabels contains resolved author-facing names and admin language overrides.
type schema.DateFormatDateFormat identifies the accepted date string contract across APIs and admin.
type schema.EmbeddedTreeEmbeddedTree locates a structural node or node list through literal properties. Only Children is recursively traversed; case payloads use ordinary schemas.
type schema.EmbeddedTreeCaseEmbeddedTreeCase declares schema-owned payloads for one structural node tag. Like a Blocks field, it selects block definitions by slug; an empty selection reserves the envelope while admitting no payloads.
type schema.FieldEditorFieldEditor selects an application-local value editor. Config is public JSON.
type schema.FieldListSetFieldListSet records field lists a definition traversal has entered. A shared definition passes the same slice wherever it is placed, so a traversal that enters each list once does work proportional to definitions.
type schema.FieldTraitsFieldTraits summarizes the fields of a list or beneath a field, so a value traversal can skip a subtree whose schema cannot need it.
type schema.PrimitiveListFieldPrimitiveListField constrains the number of values in one ordered text or number list. Items have no stored identity or nested field definitions. TextField and NumberField hold the corresponding per-item constraints.
type schema.ScalarLiteralScalarLiteral stores a canonical string, finite number, or boolean operand for visibility conditions and relationship filters.
Manifest model 18
type schema.SnapshotThe serializable application and content schema.
type schema.VersionThe manifest wire-format version.
constant schema.CurrentVersionThe schema-manifest format version produced and accepted by this build.
type schema.ApplicationResolved application metadata safe for tooling and the admin.
type schema.EndpointDeterministic public metadata for one application-authored custom endpoint.
type schema.AdminLocalizationSettingsDeterministic admin interface language and timezone configuration.
type schema.AdminLanguageOne statically bundled admin interface language.
type schema.AdminTimeZoneOne browser-safe timezone offered to editors.
type schema.LocalizationSettingsDeterministic content-locale configuration.
type schema.CollectionThe resolved contract for a collection.
type schema.FieldThe resolved contract for one field.
type schema.FieldTypeThe resolved field discriminator shared with generated contracts.
type schema.CapabilitiesResolved feature flags for one collection or global.
type schema.AdminSettingsThe durable ID and current slug of the auth collection trusted by the admin.
type schema.LocaleOne resolved locale in deterministic authoring order.
type schema.CollectionAdminResolved collection presentation, hierarchy, and live-preview metadata.
type schema.CollectionLabelsNormalized singular and plural labels.
type schema.GlobalThe resolved singleton schema alias.
Capability settings 8
type schema.AuthSettingsPublic resolved authentication policy.
type schema.UploadSettingsResolved media validation and delivery policy.
type schema.VersionSettingsResolved drafts, snapshot retention, and autosave policy.
type schema.DocumentLockSettingsResolved authoring lock lease.
type schema.CollectionIndexAn ordered compound index over supported field paths.
type schema.LivePreviewA serializable preview URL template and viewports.
type schema.PreviewBreakpointOne named live-preview viewport.
type schema.ImageSizeOne named derived upload image variant.
Field details 32
type schema.FieldAdmintype schema.FieldAdminComponenttype schema.FieldCategorytype schema.FieldRowtype schema.FieldCollapsibletype schema.FieldTabGrouptype schema.FieldConditiontype schema.FieldConditionKindtype schema.FieldConditionScopetype schema.FieldConditionOperatortype schema.FieldConditionPredicatetype schema.TextFieldtype schema.SlugFieldtype schema.CodeFieldtype schema.NumberFieldtype schema.PointFieldtype schema.UIFieldtype schema.ValueTypetype schema.VirtualFieldtype schema.SelectFieldtype schema.SelectOptiontype schema.RelationshipFiltertype schema.RelationshipTargettype schema.UploadFieldtype schema.ReferenceDeleteActiontype schema.BlockTypetype schema.RelationshipFieldtype schema.JoinFieldtype schema.NestedFieldtype schema.ArrayRowLabelstype schema.BlocksFieldtype schema.PluginField
Plugin manifest 5
constant schema.CurrentPluginAPIVersionThe compiled backend plugin contract represented by this manifest version.
constant schema.CurrentAdminPluginAPIVersionThe static backend/admin plugin contract represented by this manifest version.
type schema.PluginAdminStatic admin-package pairing metadata.
type schema.PluginFieldTypeGenerated Go, TypeScript, and JSON Schema contracts for a plugin field.
type schema.PluginEndpointPublic method, path, and summary for one compiled plugin endpoint.
Validation 16
type schema.ValidationErrorA path-aware set of schema issues.
type schema.IssueOne stable path-aware schema problem.
schema.NewValidationError()Create a path-aware validation error from issues.
schema.IsValidStableID()Check canonical deterministic schema identity syntax.
schema.IsValidCollectionSlug()Check URL- and API-facing collection slug syntax.
schema.IsValidLocaleCode()Check locale codes accepted by URLs, contracts, and storage.
schema.IsValidFieldName()Check unquoted generated property and query-path syntax.
schema.IsValidPluginKey()Check a plugin’s stable manifest key.
schema.IsValidAdminPluginPackage()Check a static JavaScript package specifier.
schema.IsValidAdminPluginExport()Check a named JavaScript export identifier.
schema.IsValidSemanticVersion()Check a complete unprefixed semantic version.
schema.IsValidSemanticVersionRange()Check a non-empty half-open semantic-version interval.
schema.SemanticVersionInRange()Test a version against a validated half-open interval.
schema.IsValidAdminPluginRoute()Check a package-relative admin plugin route.
schema.IsValidAdminPluginAsset()Check a package-relative static admin side-effect import.
schema.IsValidGoPackage()Check a portable Go import path.
Constants 50
constant schema.FieldCategoryNestedconstant schema.FieldCategoryPluginconstant schema.FieldCategoryPresentationconstant schema.FieldCategoryRelationshipconstant schema.FieldCategoryScalarconstant schema.FieldCategoryUploadconstant schema.FieldConditionDocumentconstant schema.FieldConditionEqualsconstant schema.FieldConditionKindAllconstant schema.FieldConditionKindAnyconstant schema.FieldConditionKindNotconstant schema.FieldConditionKindPredicateconstant schema.FieldConditionNotEqualsconstant schema.FieldConditionOneOfconstant schema.FieldConditionSiblingconstant schema.FieldTypeArrayconstant schema.FieldTypeBlocksconstant schema.FieldTypeCheckboxconstant schema.FieldTypeCodeconstant schema.FieldTypeDateconstant schema.FieldTypeEmailconstant schema.FieldTypeGroupconstant schema.FieldTypeJoinconstant schema.FieldTypeJSONconstant schema.FieldTypeNumberconstant schema.FieldTypePluginconstant schema.FieldTypePointconstant schema.FieldTypeRadioconstant schema.FieldTypeRelationshipconstant schema.FieldTypeSelectconstant schema.FieldTypeTextconstant schema.FieldTypeTextareaconstant schema.FieldTypeUIconstant schema.FieldTypeUploadconstant schema.FieldTypeVirtualconstant schema.ReferenceDeleteNullifyconstant schema.ReferenceDeleteRestrictconstant schema.ValueTypeBooleanconstant schema.ValueTypeJSONconstant schema.ValueTypeNumberconstant schema.ValueTypeStringconstant schema.DateOnlyconstant schema.DateTimeconstant schema.EmbeddedTreeVersionconstant schema.FieldTraitEmbeddedconstant schema.FieldTraitLocalizedconstant schema.FieldTypeNumberListconstant schema.FieldTypeTextListconstant schema.ReferenceDeleteCascadeconstant schema.TimeOnly
Methods 22
LocalizationSettings.LocaleCodes()Manifest.Bytes()Manifest.Equal()Manifest.MarshalJSON()Manifest.Snapshot()Manifest.UnmarshalJSON()ValidationError.Error()BlockAdmin.MarshalJSON()BlockAdmin.UnmarshalJSON()BlocksField.Definition()BlocksField.Definitions()BlocksField.ResolvedTypes()BlockType.ResolvedFields()EmbeddedTreeCase.Definition()EmbeddedTreeCase.Definitions()EmbeddedTreeCase.ResolvedTypes()FieldListSet.Add()Manifest.SameInstance()Manifest.SameStorage()Manifest.StorageSchema()NestedField.ResolvedFields()ScalarLiteral.Decode()