Documentation
¶
Overview ¶
Package field defines the stored values, validation, access rules, hooks, and admin presentation of fields in Ridu collections and globals. Build a Fields value from constructors such as Text, Number, Select, Group, and Array, then assign it to ridu.Collection.Fields, ridu.Global.Fields, or a nested field.
Constructors return concrete field values with fluent methods. Every method returns a refined copy, so a reusable field factory can be renamed, nested, or extended without changing the original. Access, Hooks, and Admin group related behavior; callbacks use occurrence-bound contexts from the operation package. Validate runs on authoritative saves. LiveValidate separately opts a writable field into advisory admin feedback without executing defaults or save hooks.
Text and Number configure scalar values. TextList and NumberList configure ordered primitive slices, preserving duplicates and meaningful empty/zero items. Their typed callbacks receive []string and []float64 respectively; the whole list is one field occurrence. Use Array for rows with child fields and stable identities, or MultiSelect for a list drawn from fixed options.
Use Fields.Edit for checked changes to a reusable field graph. Snapshot returns a detached View for inspecting a Node without exposing mutable configuration. Nested-field constructors and Fields.Edit snapshot their inputs. A top-level Fields slice remains caller-owned until config resolution, which snapshots the complete graph so later slice or map changes cannot alter the published schema.
Index ¶
- func AppendChild[Parent interface{ ... }](parent Parent, child Node) (Parent, error)
- func EditChild[Parent interface{ ... }, Child Node](parent Parent, name string, as func(Node) (Child, error), ...) (Parent, error)
- func NormalizeSlug(value string) string
- func ReplaceChild[Parent interface{ ... }](parent Parent, name string, replacement Node) (Parent, error)
- type Access
- type AccessRule
- type Admin
- type ArrayField
- func (f ArrayField) Access(value Access) ArrayField
- func (v ArrayField) AccessPolicy() Access
- func (f ArrayField) Admin(value Admin) ArrayField
- func (v ArrayField) AdminPolicy() Admin
- func (f ArrayField) AfterRead(callbacks ...OutputTransform[store.Value]) ArrayField
- func (f ArrayField) AfterReadHooks() []OutputTransform[store.Value]
- func (f ArrayField) AppendHooks(value Hooks[store.Value]) ArrayField
- func (v ArrayField) BehaviorSummary() PolicySummary
- func (v ArrayField) Children() Fields
- func (f ArrayField) EditAdmin(edit func(*Admin)) ArrayField
- func (f ArrayField) EditChildren(edit func(*ChildrenDraft) error) (ArrayField, error)
- func (f ArrayField) HookPolicy() Hooks[store.Value]
- func (f ArrayField) Hooks(value Hooks[store.Value]) ArrayField
- func (v ArrayField) IsLocalized() bool
- func (v ArrayField) IsRequired() bool
- func (v ArrayField) Kind() Kind
- func (f ArrayField) Label(value string) ArrayField
- func (v ArrayField) LabelText() string
- func (f ArrayField) LabelTranslations(values map[string]string) ArrayField
- func (f ArrayField) LiveValidate(value LiveValidator[store.Value]) ArrayField
- func (f ArrayField) LiveValidators() []LiveValidator[store.Value]
- func (f ArrayField) Localized(values ...bool) ArrayField
- func (f ArrayField) MaxRows(value int) ArrayField
- func (f ArrayField) MinRows(value int) ArrayField
- func (v ArrayField) Name() string
- func (f ArrayField) PrependHooks(value Hooks[store.Value]) ArrayField
- func (f ArrayField) Private(namespace string, value store.Value) ArrayField
- func (v ArrayField) Provenance() []string
- func (f ArrayField) Rename(name string) ArrayField
- func (f ArrayField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) ArrayField
- func (f ArrayField) ReplaceLiveValidators(values ...LiveValidator[store.Value]) ArrayField
- func (f ArrayField) ReplaceValidators(values ...Validator[store.Value]) ArrayField
- func (f ArrayField) Required(values ...bool) ArrayField
- func (f ArrayField) RestrictAccess(value Access) ArrayField
- func (f ArrayField) Validate(value Validator[store.Value]) ArrayField
- func (f ArrayField) Validators() []Validator[store.Value]
- type Block
- type BlockAdmin
- type BlockLabels
- type BlockRegistry
- type BlocksField
- func (f BlocksField) Access(value Access) BlocksField
- func (v BlocksField) AccessPolicy() Access
- func (f BlocksField) Admin(value Admin) BlocksField
- func (v BlocksField) AdminPolicy() Admin
- func (f BlocksField) AfterRead(callbacks ...OutputTransform[store.Value]) BlocksField
- func (f BlocksField) AfterReadHooks() []OutputTransform[store.Value]
- func (f BlocksField) AppendHooks(value Hooks[store.Value]) BlocksField
- func (v BlocksField) BehaviorSummary() PolicySummary
- func (v BlocksField) Children() Fields
- func (f BlocksField) EditAdmin(edit func(*Admin)) BlocksField
- func (f BlocksField) EditBlocks(edit func(*[]Block) error) (BlocksField, error)
- func (f BlocksField) HookPolicy() Hooks[store.Value]
- func (f BlocksField) Hooks(value Hooks[store.Value]) BlocksField
- func (v BlocksField) IsLocalized() bool
- func (v BlocksField) IsRequired() bool
- func (v BlocksField) Kind() Kind
- func (f BlocksField) Label(value string) BlocksField
- func (v BlocksField) LabelText() string
- func (f BlocksField) LabelTranslations(values map[string]string) BlocksField
- func (f BlocksField) LiveValidate(value LiveValidator[store.Value]) BlocksField
- func (f BlocksField) LiveValidators() []LiveValidator[store.Value]
- func (f BlocksField) Localized(values ...bool) BlocksField
- func (f BlocksField) MaxRows(value int) BlocksField
- func (f BlocksField) MinRows(value int) BlocksField
- func (v BlocksField) Name() string
- func (f BlocksField) PrependHooks(value Hooks[store.Value]) BlocksField
- func (f BlocksField) Private(namespace string, value store.Value) BlocksField
- func (v BlocksField) Provenance() []string
- func (f BlocksField) References(slugs ...string) BlocksField
- func (f BlocksField) Rename(name string) BlocksField
- func (f BlocksField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) BlocksField
- func (f BlocksField) ReplaceLiveValidators(values ...LiveValidator[store.Value]) BlocksField
- func (f BlocksField) ReplaceValidators(values ...Validator[store.Value]) BlocksField
- func (f BlocksField) Required(values ...bool) BlocksField
- func (f BlocksField) RestrictAccess(value Access) BlocksField
- func (f BlocksField) Validate(value Validator[store.Value]) BlocksField
- func (f BlocksField) Validators() []Validator[store.Value]
- type Boundary
- type Branch
- type BranchSelector
- type Category
- type CheckboxField
- func (f CheckboxField) Access(value Access) CheckboxField
- func (v CheckboxField) AccessPolicy() Access
- func (f CheckboxField) Admin(value Admin) CheckboxField
- func (v CheckboxField) AdminPolicy() Admin
- func (f CheckboxField) AfterRead(callbacks ...OutputTransform[bool]) CheckboxField
- func (f CheckboxField) AfterReadHooks() []OutputTransform[bool]
- func (f CheckboxField) AppendHooks(value Hooks[bool]) CheckboxField
- func (v CheckboxField) BehaviorSummary() PolicySummary
- func (v CheckboxField) Children() Fields
- func (f CheckboxField) Default(value bool) CheckboxField
- func (f CheckboxField) DefaultCallback() DefaultFunc[bool]
- func (f CheckboxField) DefaultFrom(callback DefaultFunc[bool]) CheckboxField
- func (f CheckboxField) EditAdmin(edit func(*Admin)) CheckboxField
- func (f CheckboxField) HookPolicy() Hooks[bool]
- func (f CheckboxField) Hooks(value Hooks[bool]) CheckboxField
- func (f CheckboxField) Index(values ...bool) CheckboxField
- func (v CheckboxField) IsLocalized() bool
- func (v CheckboxField) IsRequired() bool
- func (v CheckboxField) Kind() Kind
- func (f CheckboxField) Label(value string) CheckboxField
- func (v CheckboxField) LabelText() string
- func (f CheckboxField) LabelTranslations(values map[string]string) CheckboxField
- func (f CheckboxField) LiveValidate(value LiveValidator[bool]) CheckboxField
- func (f CheckboxField) LiveValidators() []LiveValidator[bool]
- func (f CheckboxField) Localized(values ...bool) CheckboxField
- func (v CheckboxField) Name() string
- func (f CheckboxField) PrependHooks(value Hooks[bool]) CheckboxField
- func (f CheckboxField) Private(namespace string, value store.Value) CheckboxField
- func (v CheckboxField) Provenance() []string
- func (f CheckboxField) Rename(name string) CheckboxField
- func (f CheckboxField) ReplaceAfterRead(callbacks ...OutputTransform[bool]) CheckboxField
- func (f CheckboxField) ReplaceLiveValidators(values ...LiveValidator[bool]) CheckboxField
- func (f CheckboxField) ReplaceValidators(values ...Validator[bool]) CheckboxField
- func (f CheckboxField) Required(values ...bool) CheckboxField
- func (f CheckboxField) RestrictAccess(value Access) CheckboxField
- func (f CheckboxField) Unique(values ...bool) CheckboxField
- func (f CheckboxField) Validate(value Validator[bool]) CheckboxField
- func (f CheckboxField) Validators() []Validator[bool]
- type ChildrenDraft
- func (d *ChildrenDraft) EditBlock(name, slug string, edit func(*ChildrenDraft) error) error
- func (d *ChildrenDraft) EditBranch(name string, selector BranchSelector, edit func(*ChildrenDraft) error) error
- func (d *ChildrenDraft) EditBranchAt(index int, selector BranchSelector, edit func(*ChildrenDraft) error) error
- func (d *ChildrenDraft) EditChildren(name string, edit func(*ChildrenDraft) error) error
- func (d *ChildrenDraft) EditNumber(name string, edit func(NumberField) NumberField) error
- func (d *ChildrenDraft) EditNumberList(name string, edit func(NumberListField) NumberListField) error
- func (d *ChildrenDraft) EditText(name string, edit func(TextField) TextField) error
- func (d *ChildrenDraft) EditTextList(name string, edit func(TextListField) TextListField) error
- func (d *ChildrenDraft) Fields() Fields
- func (d *ChildrenDraft) Insert(index int, node Node) error
- func (d *ChildrenDraft) Remove(name string) error
- func (d *ChildrenDraft) Rename(name, replacement string) error
- func (d *ChildrenDraft) RenameRoot(name, replacement string) error
- func (d *ChildrenDraft) Replace(name string, node Node) error
- func (d *ChildrenDraft) ReplaceAt(index int, node Node) error
- type ComponentRef
- type Condition
- func All(conditions ...Condition) Condition
- func Any(conditions ...Condition) Condition
- func Equal[Value ConditionScalar](reference Reference, value Value) Condition
- func Not(condition Condition) Condition
- func NotEqual[Value ConditionScalar](reference Reference, value Value) Condition
- func OneOf[Value ConditionScalar](reference Reference, values ...Value) Condition
- func (condition Condition) Conditions() []Condition
- func (condition Condition) Err() error
- func (condition Condition) IsZero() bool
- func (condition Condition) Kind() ConditionKind
- func (condition Condition) MarshalJSON() ([]byte, error)
- func (condition Condition) Operator() ConditionOperator
- func (condition Condition) Reference() Reference
- func (condition Condition) Values() []DefaultValue
- type ConditionKind
- type ConditionOperator
- type ConditionScalar
- type DateField
- func (f DateField) Access(value Access) DateField
- func (v DateField) AccessPolicy() Access
- func (f DateField) Admin(value Admin) DateField
- func (v DateField) AdminPolicy() Admin
- func (f DateField) AfterRead(callbacks ...OutputTransform[string]) DateField
- func (f DateField) AfterReadHooks() []OutputTransform[string]
- func (f DateField) AppendHooks(value Hooks[string]) DateField
- func (v DateField) BehaviorSummary() PolicySummary
- func (v DateField) Children() Fields
- func (f DateField) Default(value string) DateField
- func (f DateField) DefaultCallback() DefaultFunc[string]
- func (f DateField) DefaultFrom(callback DefaultFunc[string]) DateField
- func (f DateField) EditAdmin(edit func(*Admin)) DateField
- func (f DateField) Format(value DateFormat) DateField
- func (f DateField) HookPolicy() Hooks[string]
- func (f DateField) Hooks(value Hooks[string]) DateField
- func (f DateField) Index(values ...bool) DateField
- func (v DateField) IsLocalized() bool
- func (v DateField) IsRequired() bool
- func (v DateField) Kind() Kind
- func (f DateField) Label(value string) DateField
- func (v DateField) LabelText() string
- func (f DateField) LabelTranslations(values map[string]string) DateField
- func (f DateField) LiveValidate(value LiveValidator[string]) DateField
- func (f DateField) LiveValidators() []LiveValidator[string]
- func (f DateField) Localized(values ...bool) DateField
- func (v DateField) Name() string
- func (f DateField) PrependHooks(value Hooks[string]) DateField
- func (f DateField) Private(namespace string, value store.Value) DateField
- func (v DateField) Provenance() []string
- func (f DateField) Rename(name string) DateField
- func (f DateField) ReplaceAfterRead(callbacks ...OutputTransform[string]) DateField
- func (f DateField) ReplaceLiveValidators(values ...LiveValidator[string]) DateField
- func (f DateField) ReplaceValidators(values ...Validator[string]) DateField
- func (f DateField) Required(values ...bool) DateField
- func (f DateField) RestrictAccess(value Access) DateField
- func (f DateField) Unique(values ...bool) DateField
- func (f DateField) Validate(value Validator[string]) DateField
- func (f DateField) Validators() []Validator[string]
- type DateFormat
- type DefaultFunc
- type DefaultKind
- type DefaultValue
- type EditError
- type EmailField
- func (f EmailField) Access(value Access) EmailField
- func (v EmailField) AccessPolicy() Access
- func (f EmailField) Admin(value Admin) EmailField
- func (v EmailField) AdminPolicy() Admin
- func (f EmailField) AfterRead(callbacks ...OutputTransform[string]) EmailField
- func (f EmailField) AfterReadHooks() []OutputTransform[string]
- func (f EmailField) AppendHooks(value Hooks[string]) EmailField
- func (v EmailField) BehaviorSummary() PolicySummary
- func (v EmailField) Children() Fields
- func (f EmailField) Default(value string) EmailField
- func (f EmailField) DefaultCallback() DefaultFunc[string]
- func (f EmailField) DefaultFrom(callback DefaultFunc[string]) EmailField
- func (f EmailField) EditAdmin(edit func(*Admin)) EmailField
- func (f EmailField) HookPolicy() Hooks[string]
- func (f EmailField) Hooks(value Hooks[string]) EmailField
- func (f EmailField) Index(values ...bool) EmailField
- func (v EmailField) IsLocalized() bool
- func (v EmailField) IsRequired() bool
- func (v EmailField) Kind() Kind
- func (f EmailField) Label(value string) EmailField
- func (v EmailField) LabelText() string
- func (f EmailField) LabelTranslations(values map[string]string) EmailField
- func (f EmailField) LiveValidate(value LiveValidator[string]) EmailField
- func (f EmailField) LiveValidators() []LiveValidator[string]
- func (f EmailField) Localized(values ...bool) EmailField
- func (v EmailField) Name() string
- func (f EmailField) PrependHooks(value Hooks[string]) EmailField
- func (f EmailField) Private(namespace string, value store.Value) EmailField
- func (v EmailField) Provenance() []string
- func (f EmailField) Rename(name string) EmailField
- func (f EmailField) ReplaceAfterRead(callbacks ...OutputTransform[string]) EmailField
- func (f EmailField) ReplaceLiveValidators(values ...LiveValidator[string]) EmailField
- func (f EmailField) ReplaceValidators(values ...Validator[string]) EmailField
- func (f EmailField) Required(values ...bool) EmailField
- func (f EmailField) RestrictAccess(value Access) EmailField
- func (f EmailField) Unique(values ...bool) EmailField
- func (f EmailField) Validate(value Validator[string]) EmailField
- func (f EmailField) Validators() []Validator[string]
- type EmbeddedTree
- type EmbeddedTreeCase
- type Fields
- type GroupField
- func (f GroupField) Access(value Access) GroupField
- func (v GroupField) AccessPolicy() Access
- func (f GroupField) Admin(value Admin) GroupField
- func (v GroupField) AdminPolicy() Admin
- func (f GroupField) AfterRead(callbacks ...OutputTransform[store.Value]) GroupField
- func (f GroupField) AfterReadHooks() []OutputTransform[store.Value]
- func (f GroupField) AppendHooks(value Hooks[store.Value]) GroupField
- func (v GroupField) BehaviorSummary() PolicySummary
- func (v GroupField) Children() Fields
- func (f GroupField) EditAdmin(edit func(*Admin)) GroupField
- func (f GroupField) EditChildren(edit func(*ChildrenDraft) error) (GroupField, error)
- func (f GroupField) HookPolicy() Hooks[store.Value]
- func (f GroupField) Hooks(value Hooks[store.Value]) GroupField
- func (v GroupField) IsLocalized() bool
- func (v GroupField) IsRequired() bool
- func (v GroupField) Kind() Kind
- func (f GroupField) Label(value string) GroupField
- func (v GroupField) LabelText() string
- func (f GroupField) LabelTranslations(values map[string]string) GroupField
- func (f GroupField) LiveValidate(value LiveValidator[store.Value]) GroupField
- func (f GroupField) LiveValidators() []LiveValidator[store.Value]
- func (f GroupField) Localized(values ...bool) GroupField
- func (v GroupField) Name() string
- func (f GroupField) PrependHooks(value Hooks[store.Value]) GroupField
- func (f GroupField) Private(namespace string, value store.Value) GroupField
- func (v GroupField) Provenance() []string
- func (f GroupField) Rename(name string) GroupField
- func (f GroupField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) GroupField
- func (f GroupField) ReplaceLiveValidators(values ...LiveValidator[store.Value]) GroupField
- func (f GroupField) ReplaceValidators(values ...Validator[store.Value]) GroupField
- func (f GroupField) Required(values ...bool) GroupField
- func (f GroupField) RestrictAccess(value Access) GroupField
- func (f GroupField) Validate(value Validator[store.Value]) GroupField
- func (f GroupField) Validators() []Validator[store.Value]
- type Hooks
- type Issue
- type JSONField
- func (f JSONField) Access(value Access) JSONField
- func (v JSONField) AccessPolicy() Access
- func (f JSONField) Admin(value Admin) JSONField
- func (v JSONField) AdminPolicy() Admin
- func (f JSONField) AfterRead(callbacks ...OutputTransform[store.Value]) JSONField
- func (f JSONField) AfterReadHooks() []OutputTransform[store.Value]
- func (f JSONField) AppendHooks(value Hooks[store.Value]) JSONField
- func (v JSONField) BehaviorSummary() PolicySummary
- func (v JSONField) Children() Fields
- func (f JSONField) EditAdmin(edit func(*Admin)) JSONField
- func (f JSONField) HookPolicy() Hooks[store.Value]
- func (f JSONField) Hooks(value Hooks[store.Value]) JSONField
- func (v JSONField) IsLocalized() bool
- func (v JSONField) IsRequired() bool
- func (v JSONField) Kind() Kind
- func (f JSONField) Label(value string) JSONField
- func (v JSONField) LabelText() string
- func (f JSONField) LabelTranslations(values map[string]string) JSONField
- func (f JSONField) LiveValidate(value LiveValidator[store.Value]) JSONField
- func (f JSONField) LiveValidators() []LiveValidator[store.Value]
- func (f JSONField) Localized(values ...bool) JSONField
- func (v JSONField) Name() string
- func (f JSONField) PrependHooks(value Hooks[store.Value]) JSONField
- func (f JSONField) Private(namespace string, value store.Value) JSONField
- func (v JSONField) Provenance() []string
- func (f JSONField) Rename(name string) JSONField
- func (f JSONField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) JSONField
- func (f JSONField) ReplaceLiveValidators(values ...LiveValidator[store.Value]) JSONField
- func (f JSONField) ReplaceValidators(values ...Validator[store.Value]) JSONField
- func (f JSONField) Required(values ...bool) JSONField
- func (f JSONField) RestrictAccess(value Access) JSONField
- func (f JSONField) Validate(value Validator[store.Value]) JSONField
- func (f JSONField) Validators() []Validator[store.Value]
- type JoinField
- func (f JoinField) Access(value Access) JoinField
- func (v JoinField) AccessPolicy() Access
- func (f JoinField) Admin(value Admin) JoinField
- func (v JoinField) AdminPolicy() Admin
- func (f JoinField) AfterRead(callbacks ...OutputTransform[store.Value]) JoinField
- func (f JoinField) AfterReadHooks() []OutputTransform[store.Value]
- func (f JoinField) AllowCreate(value bool) JoinField
- func (v JoinField) BehaviorSummary() PolicySummary
- func (v JoinField) Children() Fields
- func (f JoinField) DefaultColumns(paths ...string) JoinField
- func (f JoinField) DefaultSort(value string) JoinField
- func (f JoinField) EditAdmin(edit func(*Admin)) JoinField
- func (v JoinField) IsLocalized() bool
- func (v JoinField) IsRequired() bool
- func (v JoinField) Kind() Kind
- func (f JoinField) Label(value string) JoinField
- func (v JoinField) LabelText() string
- func (f JoinField) LabelTranslations(values map[string]string) JoinField
- func (f JoinField) Limit(value int) JoinField
- func (v JoinField) Name() string
- func (f JoinField) Private(namespace string, value store.Value) JoinField
- func (v JoinField) Provenance() []string
- func (f JoinField) Rename(name string) JoinField
- func (f JoinField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) JoinField
- func (f JoinField) RestrictAccess(value Access) JoinField
- type Kind
- type LayoutField
- func (v LayoutField) AccessPolicy() Access
- func (f LayoutField) Admin(value Admin) LayoutField
- func (v LayoutField) AdminPolicy() Admin
- func (v LayoutField) BehaviorSummary() PolicySummary
- func (v LayoutField) Children() Fields
- func (f LayoutField) EditAdmin(edit func(*Admin)) LayoutField
- func (v LayoutField) IsLocalized() bool
- func (v LayoutField) IsRequired() bool
- func (v LayoutField) Kind() Kind
- func (f LayoutField) Label(value string) LayoutField
- func (v LayoutField) LabelText() string
- func (f LayoutField) LabelTranslations(values map[string]string) LayoutField
- func (v LayoutField) Name() string
- func (f LayoutField) Private(namespace string, value store.Value) LayoutField
- func (v LayoutField) Provenance() []string
- func (f LayoutField) Rename(name string) LayoutField
- type LiveValidator
- type MultiSelectField
- func (f MultiSelectField) Access(value Access) MultiSelectField
- func (v MultiSelectField) AccessPolicy() Access
- func (f MultiSelectField) Admin(value Admin) MultiSelectField
- func (v MultiSelectField) AdminPolicy() Admin
- func (f MultiSelectField) AfterRead(callbacks ...OutputTransform[[]string]) MultiSelectField
- func (f MultiSelectField) AfterReadHooks() []OutputTransform[[]string]
- func (f MultiSelectField) AppendHooks(value Hooks[[]string]) MultiSelectField
- func (v MultiSelectField) BehaviorSummary() PolicySummary
- func (v MultiSelectField) Children() Fields
- func (f MultiSelectField) Default(values ...string) MultiSelectField
- func (f MultiSelectField) DefaultCallback() DefaultFunc[[]string]
- func (f MultiSelectField) DefaultFrom(callback DefaultFunc[[]string]) MultiSelectField
- func (f MultiSelectField) EditAdmin(edit func(*Admin)) MultiSelectField
- func (f MultiSelectField) HookPolicy() Hooks[[]string]
- func (f MultiSelectField) Hooks(value Hooks[[]string]) MultiSelectField
- func (v MultiSelectField) IsLocalized() bool
- func (v MultiSelectField) IsRequired() bool
- func (v MultiSelectField) Kind() Kind
- func (f MultiSelectField) Label(value string) MultiSelectField
- func (v MultiSelectField) LabelText() string
- func (f MultiSelectField) LabelTranslations(values map[string]string) MultiSelectField
- func (f MultiSelectField) LiveValidate(value LiveValidator[[]string]) MultiSelectField
- func (f MultiSelectField) LiveValidators() []LiveValidator[[]string]
- func (f MultiSelectField) Localized(values ...bool) MultiSelectField
- func (v MultiSelectField) Name() string
- func (f MultiSelectField) Options(values ...Option) MultiSelectField
- func (f MultiSelectField) PrependHooks(value Hooks[[]string]) MultiSelectField
- func (f MultiSelectField) Private(namespace string, value store.Value) MultiSelectField
- func (v MultiSelectField) Provenance() []string
- func (f MultiSelectField) Rename(name string) MultiSelectField
- func (f MultiSelectField) ReplaceAfterRead(callbacks ...OutputTransform[[]string]) MultiSelectField
- func (f MultiSelectField) ReplaceLiveValidators(values ...LiveValidator[[]string]) MultiSelectField
- func (f MultiSelectField) ReplaceValidators(values ...Validator[[]string]) MultiSelectField
- func (f MultiSelectField) Required(values ...bool) MultiSelectField
- func (f MultiSelectField) RestrictAccess(value Access) MultiSelectField
- func (f MultiSelectField) Validate(value Validator[[]string]) MultiSelectField
- func (f MultiSelectField) Validators() []Validator[[]string]
- type Node
- type NumberField
- func (f NumberField) Access(value Access) NumberField
- func (v NumberField) AccessPolicy() Access
- func (f NumberField) Admin(value Admin) NumberField
- func (v NumberField) AdminPolicy() Admin
- func (f NumberField) AfterRead(callbacks ...OutputTransform[float64]) NumberField
- func (f NumberField) AfterReadHooks() []OutputTransform[float64]
- func (f NumberField) AppendHooks(value Hooks[float64]) NumberField
- func (v NumberField) BehaviorSummary() PolicySummary
- func (v NumberField) Children() Fields
- func (f NumberField) Default(value float64) NumberField
- func (f NumberField) DefaultCallback() DefaultFunc[float64]
- func (f NumberField) DefaultFrom(callback DefaultFunc[float64]) NumberField
- func (f NumberField) EditAdmin(edit func(*Admin)) NumberField
- func (f NumberField) HookPolicy() Hooks[float64]
- func (f NumberField) Hooks(value Hooks[float64]) NumberField
- func (f NumberField) Index(values ...bool) NumberField
- func (v NumberField) IsLocalized() bool
- func (v NumberField) IsRequired() bool
- func (v NumberField) Kind() Kind
- func (f NumberField) Label(value string) NumberField
- func (v NumberField) LabelText() string
- func (f NumberField) LabelTranslations(values map[string]string) NumberField
- func (f NumberField) LiveValidate(value LiveValidator[float64]) NumberField
- func (f NumberField) LiveValidators() []LiveValidator[float64]
- func (f NumberField) Localized(values ...bool) NumberField
- func (f NumberField) Max(value float64) NumberField
- func (f NumberField) Min(value float64) NumberField
- func (v NumberField) Name() string
- func (f NumberField) PrependHooks(value Hooks[float64]) NumberField
- func (f NumberField) Private(namespace string, value store.Value) NumberField
- func (v NumberField) Provenance() []string
- func (f NumberField) Rename(name string) NumberField
- func (f NumberField) ReplaceAfterRead(callbacks ...OutputTransform[float64]) NumberField
- func (f NumberField) ReplaceLiveValidators(values ...LiveValidator[float64]) NumberField
- func (f NumberField) ReplaceValidators(values ...Validator[float64]) NumberField
- func (f NumberField) Required(values ...bool) NumberField
- func (f NumberField) RestrictAccess(value Access) NumberField
- func (f NumberField) Step(value float64) NumberField
- func (f NumberField) Unique(values ...bool) NumberField
- func (f NumberField) Validate(value Validator[float64]) NumberField
- func (f NumberField) Validators() []Validator[float64]
- type NumberListField
- func (f NumberListField) Access(value Access) NumberListField
- func (v NumberListField) AccessPolicy() Access
- func (f NumberListField) Admin(value Admin) NumberListField
- func (v NumberListField) AdminPolicy() Admin
- func (f NumberListField) AfterRead(callbacks ...OutputTransform[[]float64]) NumberListField
- func (f NumberListField) AfterReadHooks() []OutputTransform[[]float64]
- func (f NumberListField) AppendHooks(value Hooks[[]float64]) NumberListField
- func (v NumberListField) BehaviorSummary() PolicySummary
- func (v NumberListField) Children() Fields
- func (f NumberListField) Default(values ...float64) NumberListField
- func (f NumberListField) DefaultCallback() DefaultFunc[[]float64]
- func (f NumberListField) DefaultFrom(callback DefaultFunc[[]float64]) NumberListField
- func (f NumberListField) EditAdmin(edit func(*Admin)) NumberListField
- func (f NumberListField) HookPolicy() Hooks[[]float64]
- func (f NumberListField) Hooks(value Hooks[[]float64]) NumberListField
- func (v NumberListField) IsLocalized() bool
- func (v NumberListField) IsRequired() bool
- func (v NumberListField) Kind() Kind
- func (f NumberListField) Label(value string) NumberListField
- func (v NumberListField) LabelText() string
- func (f NumberListField) LabelTranslations(values map[string]string) NumberListField
- func (f NumberListField) LiveValidate(value LiveValidator[[]float64]) NumberListField
- func (f NumberListField) LiveValidators() []LiveValidator[[]float64]
- func (f NumberListField) Localized(values ...bool) NumberListField
- func (f NumberListField) Max(value float64) NumberListField
- func (f NumberListField) MaxRows(value int) NumberListField
- func (f NumberListField) Min(value float64) NumberListField
- func (f NumberListField) MinRows(value int) NumberListField
- func (v NumberListField) Name() string
- func (f NumberListField) PrependHooks(value Hooks[[]float64]) NumberListField
- func (f NumberListField) Private(namespace string, value store.Value) NumberListField
- func (v NumberListField) Provenance() []string
- func (f NumberListField) Rename(name string) NumberListField
- func (f NumberListField) ReplaceAfterRead(callbacks ...OutputTransform[[]float64]) NumberListField
- func (f NumberListField) ReplaceLiveValidators(values ...LiveValidator[[]float64]) NumberListField
- func (f NumberListField) ReplaceValidators(values ...Validator[[]float64]) NumberListField
- func (f NumberListField) Required(values ...bool) NumberListField
- func (f NumberListField) RestrictAccess(value Access) NumberListField
- func (f NumberListField) Validate(value Validator[[]float64]) NumberListField
- func (f NumberListField) Validators() []Validator[[]float64]
- type Observer
- type Option
- type OutputField
- func (f OutputField) Access(value Access) OutputField
- func (v OutputField) AccessPolicy() Access
- func (f OutputField) Admin(value Admin) OutputField
- func (v OutputField) AdminPolicy() Admin
- func (f OutputField) AfterRead(callbacks ...OutputTransform[store.Value]) OutputField
- func (f OutputField) AfterReadHooks() []OutputTransform[store.Value]
- func (v OutputField) BehaviorSummary() PolicySummary
- func (v OutputField) Children() Fields
- func (f OutputField) EditAdmin(edit func(*Admin)) OutputField
- func (v OutputField) IsLocalized() bool
- func (v OutputField) IsRequired() bool
- func (v OutputField) Kind() Kind
- func (f OutputField) Label(value string) OutputField
- func (v OutputField) LabelText() string
- func (f OutputField) LabelTranslations(values map[string]string) OutputField
- func (v OutputField) Name() string
- func (f OutputField) Private(namespace string, value store.Value) OutputField
- func (v OutputField) Provenance() []string
- func (f OutputField) Rename(name string) OutputField
- func (f OutputField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) OutputField
- func (f OutputField) Resolver() Resolver[store.Value]
- func (f OutputField) RestrictAccess(value Access) OutputField
- type OutputTransform
- type PluginField
- func (f PluginField) Access(value Access) PluginField
- func (v PluginField) AccessPolicy() Access
- func (f PluginField) Admin(value Admin) PluginField
- func (v PluginField) AdminPolicy() Admin
- func (f PluginField) AfterRead(callbacks ...OutputTransform[store.Value]) PluginField
- func (f PluginField) AfterReadHooks() []OutputTransform[store.Value]
- func (f PluginField) AppendHooks(value Hooks[store.Value]) PluginField
- func (v PluginField) BehaviorSummary() PolicySummary
- func (v PluginField) Children() Fields
- func (f PluginField) CollectionReferenceKeys(keys ...string) PluginField
- func (f PluginField) EditAdmin(edit func(*Admin)) PluginField
- func (f PluginField) EmbeddedTrees(trees ...EmbeddedTree) PluginField
- func (f PluginField) HookPolicy() Hooks[store.Value]
- func (f PluginField) Hooks(value Hooks[store.Value]) PluginField
- func (v PluginField) IsLocalized() bool
- func (v PluginField) IsRequired() bool
- func (v PluginField) Kind() Kind
- func (f PluginField) Label(value string) PluginField
- func (v PluginField) LabelText() string
- func (f PluginField) LabelTranslations(values map[string]string) PluginField
- func (f PluginField) LiveValidate(value LiveValidator[store.Value]) PluginField
- func (f PluginField) LiveValidators() []LiveValidator[store.Value]
- func (f PluginField) Localized(values ...bool) PluginField
- func (v PluginField) Name() string
- func (f PluginField) PrependHooks(value Hooks[store.Value]) PluginField
- func (f PluginField) Private(namespace string, value store.Value) PluginField
- func (v PluginField) Provenance() []string
- func (f PluginField) Rename(name string) PluginField
- func (f PluginField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) PluginField
- func (f PluginField) ReplaceLiveValidators(values ...LiveValidator[store.Value]) PluginField
- func (f PluginField) ReplaceValidators(values ...Validator[store.Value]) PluginField
- func (f PluginField) Required(values ...bool) PluginField
- func (f PluginField) RestrictAccess(value Access) PluginField
- func (f PluginField) Validate(value Validator[store.Value]) PluginField
- func (f PluginField) Validators() []Validator[store.Value]
- type PointField
- func (f PointField) Access(value Access) PointField
- func (v PointField) AccessPolicy() Access
- func (f PointField) Admin(value Admin) PointField
- func (v PointField) AdminPolicy() Admin
- func (f PointField) AfterRead(callbacks ...OutputTransform[store.Value]) PointField
- func (f PointField) AfterReadHooks() []OutputTransform[store.Value]
- func (f PointField) AppendHooks(value Hooks[store.Value]) PointField
- func (v PointField) BehaviorSummary() PolicySummary
- func (v PointField) Children() Fields
- func (f PointField) EditAdmin(edit func(*Admin)) PointField
- func (f PointField) HookPolicy() Hooks[store.Value]
- func (f PointField) Hooks(value Hooks[store.Value]) PointField
- func (v PointField) IsLocalized() bool
- func (v PointField) IsRequired() bool
- func (v PointField) Kind() Kind
- func (f PointField) Label(value string) PointField
- func (v PointField) LabelText() string
- func (f PointField) LabelTranslations(values map[string]string) PointField
- func (f PointField) LiveValidate(value LiveValidator[store.Value]) PointField
- func (f PointField) LiveValidators() []LiveValidator[store.Value]
- func (f PointField) Localized(values ...bool) PointField
- func (v PointField) Name() string
- func (f PointField) PrependHooks(value Hooks[store.Value]) PointField
- func (f PointField) Private(namespace string, value store.Value) PointField
- func (v PointField) Provenance() []string
- func (f PointField) Rename(name string) PointField
- func (f PointField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) PointField
- func (f PointField) ReplaceLiveValidators(values ...LiveValidator[store.Value]) PointField
- func (f PointField) ReplaceValidators(values ...Validator[store.Value]) PointField
- func (f PointField) Required(values ...bool) PointField
- func (f PointField) RestrictAccess(value Access) PointField
- func (f PointField) Validate(value Validator[store.Value]) PointField
- func (f PointField) Validators() []Validator[store.Value]
- type PolicySummary
- type PolymorphicRelationshipField
- func (f PolymorphicRelationshipField) Access(value Access) PolymorphicRelationshipField
- func (v PolymorphicRelationshipField) AccessPolicy() Access
- func (f PolymorphicRelationshipField) Admin(value Admin) PolymorphicRelationshipField
- func (v PolymorphicRelationshipField) AdminPolicy() Admin
- func (f PolymorphicRelationshipField) AfterRead(callbacks ...OutputTransform[store.Value]) PolymorphicRelationshipField
- func (f PolymorphicRelationshipField) AfterReadHooks() []OutputTransform[store.Value]
- func (f PolymorphicRelationshipField) AppendHooks(value Hooks[store.Value]) PolymorphicRelationshipField
- func (v PolymorphicRelationshipField) BehaviorSummary() PolicySummary
- func (v PolymorphicRelationshipField) Children() Fields
- func (f PolymorphicRelationshipField) EditAdmin(edit func(*Admin)) PolymorphicRelationshipField
- func (f PolymorphicRelationshipField) FilterOptionRules(rules ...RelationshipFilterRule) PolymorphicRelationshipField
- func (f PolymorphicRelationshipField) HookPolicy() Hooks[store.Value]
- func (f PolymorphicRelationshipField) Hooks(value Hooks[store.Value]) PolymorphicRelationshipField
- func (v PolymorphicRelationshipField) IsLocalized() bool
- func (v PolymorphicRelationshipField) IsRequired() bool
- func (v PolymorphicRelationshipField) Kind() Kind
- func (f PolymorphicRelationshipField) Label(value string) PolymorphicRelationshipField
- func (v PolymorphicRelationshipField) LabelText() string
- func (f PolymorphicRelationshipField) LabelTranslations(values map[string]string) PolymorphicRelationshipField
- func (f PolymorphicRelationshipField) LiveValidate(value LiveValidator[store.Value]) PolymorphicRelationshipField
- func (f PolymorphicRelationshipField) LiveValidators() []LiveValidator[store.Value]
- func (f PolymorphicRelationshipField) Localized(values ...bool) PolymorphicRelationshipField
- func (v PolymorphicRelationshipField) Name() string
- func (f PolymorphicRelationshipField) OnDelete(value ReferenceDeleteAction) PolymorphicRelationshipField
- func (f PolymorphicRelationshipField) PrependHooks(value Hooks[store.Value]) PolymorphicRelationshipField
- func (f PolymorphicRelationshipField) Private(namespace string, value store.Value) PolymorphicRelationshipField
- func (v PolymorphicRelationshipField) Provenance() []string
- func (f PolymorphicRelationshipField) Rename(name string) PolymorphicRelationshipField
- func (f PolymorphicRelationshipField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) PolymorphicRelationshipField
- func (f PolymorphicRelationshipField) ReplaceLiveValidators(values ...LiveValidator[store.Value]) PolymorphicRelationshipField
- func (f PolymorphicRelationshipField) ReplaceValidators(values ...Validator[store.Value]) PolymorphicRelationshipField
- func (f PolymorphicRelationshipField) Required(values ...bool) PolymorphicRelationshipField
- func (f PolymorphicRelationshipField) RestrictAccess(value Access) PolymorphicRelationshipField
- func (f PolymorphicRelationshipField) Validate(value Validator[store.Value]) PolymorphicRelationshipField
- func (f PolymorphicRelationshipField) Validators() []Validator[store.Value]
- type PolymorphicRelationshipsField
- func (f PolymorphicRelationshipsField) Access(value Access) PolymorphicRelationshipsField
- func (v PolymorphicRelationshipsField) AccessPolicy() Access
- func (f PolymorphicRelationshipsField) Admin(value Admin) PolymorphicRelationshipsField
- func (v PolymorphicRelationshipsField) AdminPolicy() Admin
- func (f PolymorphicRelationshipsField) AfterRead(callbacks ...OutputTransform[store.Value]) PolymorphicRelationshipsField
- func (f PolymorphicRelationshipsField) AfterReadHooks() []OutputTransform[store.Value]
- func (f PolymorphicRelationshipsField) AppendHooks(value Hooks[store.Value]) PolymorphicRelationshipsField
- func (v PolymorphicRelationshipsField) BehaviorSummary() PolicySummary
- func (v PolymorphicRelationshipsField) Children() Fields
- func (f PolymorphicRelationshipsField) EditAdmin(edit func(*Admin)) PolymorphicRelationshipsField
- func (f PolymorphicRelationshipsField) FilterOptionRules(rules ...RelationshipFilterRule) PolymorphicRelationshipsField
- func (f PolymorphicRelationshipsField) HookPolicy() Hooks[store.Value]
- func (f PolymorphicRelationshipsField) Hooks(value Hooks[store.Value]) PolymorphicRelationshipsField
- func (v PolymorphicRelationshipsField) IsLocalized() bool
- func (v PolymorphicRelationshipsField) IsRequired() bool
- func (v PolymorphicRelationshipsField) Kind() Kind
- func (f PolymorphicRelationshipsField) Label(value string) PolymorphicRelationshipsField
- func (v PolymorphicRelationshipsField) LabelText() string
- func (f PolymorphicRelationshipsField) LabelTranslations(values map[string]string) PolymorphicRelationshipsField
- func (f PolymorphicRelationshipsField) LiveValidate(value LiveValidator[store.Value]) PolymorphicRelationshipsField
- func (f PolymorphicRelationshipsField) LiveValidators() []LiveValidator[store.Value]
- func (f PolymorphicRelationshipsField) Localized(values ...bool) PolymorphicRelationshipsField
- func (v PolymorphicRelationshipsField) Name() string
- func (f PolymorphicRelationshipsField) OnDelete(value ReferenceDeleteAction) PolymorphicRelationshipsField
- func (f PolymorphicRelationshipsField) PrependHooks(value Hooks[store.Value]) PolymorphicRelationshipsField
- func (f PolymorphicRelationshipsField) Private(namespace string, value store.Value) PolymorphicRelationshipsField
- func (v PolymorphicRelationshipsField) Provenance() []string
- func (f PolymorphicRelationshipsField) Rename(name string) PolymorphicRelationshipsField
- func (f PolymorphicRelationshipsField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) PolymorphicRelationshipsField
- func (f PolymorphicRelationshipsField) ReplaceLiveValidators(values ...LiveValidator[store.Value]) PolymorphicRelationshipsField
- func (f PolymorphicRelationshipsField) ReplaceValidators(values ...Validator[store.Value]) PolymorphicRelationshipsField
- func (f PolymorphicRelationshipsField) Required(values ...bool) PolymorphicRelationshipsField
- func (f PolymorphicRelationshipsField) RestrictAccess(value Access) PolymorphicRelationshipsField
- func (f PolymorphicRelationshipsField) Validate(value Validator[store.Value]) PolymorphicRelationshipsField
- func (f PolymorphicRelationshipsField) Validators() []Validator[store.Value]
- type RawTransform
- type Reference
- type ReferenceDeleteAction
- type ReferenceScope
- type RelationshipField
- func (f RelationshipField) Access(value Access) RelationshipField
- func (v RelationshipField) AccessPolicy() Access
- func (f RelationshipField) Admin(value Admin) RelationshipField
- func (v RelationshipField) AdminPolicy() Admin
- func (f RelationshipField) AfterRead(callbacks ...OutputTransform[operation.ReferenceOutput]) RelationshipField
- func (f RelationshipField) AfterReadHooks() []OutputTransform[operation.ReferenceOutput]
- func (f RelationshipField) AppendHooks(value Hooks[operation.ID]) RelationshipField
- func (v RelationshipField) BehaviorSummary() PolicySummary
- func (v RelationshipField) Children() Fields
- func (f RelationshipField) EditAdmin(edit func(*Admin)) RelationshipField
- func (f RelationshipField) FilterOptionRules(rules ...RelationshipFilterRule) RelationshipField
- func (f RelationshipField) HookPolicy() Hooks[operation.ID]
- func (f RelationshipField) Hooks(value Hooks[operation.ID]) RelationshipField
- func (f RelationshipField) Index(values ...bool) RelationshipField
- func (v RelationshipField) IsLocalized() bool
- func (v RelationshipField) IsRequired() bool
- func (v RelationshipField) Kind() Kind
- func (f RelationshipField) Label(value string) RelationshipField
- func (v RelationshipField) LabelText() string
- func (f RelationshipField) LabelTranslations(values map[string]string) RelationshipField
- func (f RelationshipField) LiveValidate(value LiveValidator[operation.ID]) RelationshipField
- func (f RelationshipField) LiveValidators() []LiveValidator[operation.ID]
- func (f RelationshipField) Localized(values ...bool) RelationshipField
- func (v RelationshipField) Name() string
- func (f RelationshipField) OnDelete(value ReferenceDeleteAction) RelationshipField
- func (f RelationshipField) PrependHooks(value Hooks[operation.ID]) RelationshipField
- func (f RelationshipField) Private(namespace string, value store.Value) RelationshipField
- func (v RelationshipField) Provenance() []string
- func (f RelationshipField) Rename(name string) RelationshipField
- func (f RelationshipField) ReplaceAfterRead(callbacks ...OutputTransform[operation.ReferenceOutput]) RelationshipField
- func (f RelationshipField) ReplaceLiveValidators(values ...LiveValidator[operation.ID]) RelationshipField
- func (f RelationshipField) ReplaceValidators(values ...Validator[operation.ID]) RelationshipField
- func (f RelationshipField) Required(values ...bool) RelationshipField
- func (f RelationshipField) RestrictAccess(value Access) RelationshipField
- func (f RelationshipField) Unique(values ...bool) RelationshipField
- func (f RelationshipField) Validate(value Validator[operation.ID]) RelationshipField
- func (f RelationshipField) Validators() []Validator[operation.ID]
- type RelationshipFilterOperator
- type RelationshipFilterRule
- func OptionFilter(targetPath string, operator RelationshipFilterOperator, sourcePath string) RelationshipFilterRule
- func OptionFilterFor(collection, targetPath string, operator RelationshipFilterOperator, ...) RelationshipFilterRule
- func OptionFilterValue[...](targetPath string, operator RelationshipFilterOperator, value Value) RelationshipFilterRule
- func OptionFilterValueFor[...](collection, targetPath string, operator RelationshipFilterOperator, ...) RelationshipFilterRule
- type RelationshipsField
- func (f RelationshipsField) Access(value Access) RelationshipsField
- func (v RelationshipsField) AccessPolicy() Access
- func (f RelationshipsField) Admin(value Admin) RelationshipsField
- func (v RelationshipsField) AdminPolicy() Admin
- func (f RelationshipsField) AfterRead(callbacks ...OutputTransform[[]operation.ReferenceOutput]) RelationshipsField
- func (f RelationshipsField) AfterReadHooks() []OutputTransform[[]operation.ReferenceOutput]
- func (f RelationshipsField) AppendHooks(value Hooks[[]operation.ID]) RelationshipsField
- func (v RelationshipsField) BehaviorSummary() PolicySummary
- func (v RelationshipsField) Children() Fields
- func (f RelationshipsField) EditAdmin(edit func(*Admin)) RelationshipsField
- func (f RelationshipsField) FilterOptionRules(rules ...RelationshipFilterRule) RelationshipsField
- func (f RelationshipsField) HookPolicy() Hooks[[]operation.ID]
- func (f RelationshipsField) Hooks(value Hooks[[]operation.ID]) RelationshipsField
- func (v RelationshipsField) IsLocalized() bool
- func (v RelationshipsField) IsRequired() bool
- func (v RelationshipsField) Kind() Kind
- func (f RelationshipsField) Label(value string) RelationshipsField
- func (v RelationshipsField) LabelText() string
- func (f RelationshipsField) LabelTranslations(values map[string]string) RelationshipsField
- func (f RelationshipsField) LiveValidate(value LiveValidator[[]operation.ID]) RelationshipsField
- func (f RelationshipsField) LiveValidators() []LiveValidator[[]operation.ID]
- func (f RelationshipsField) Localized(values ...bool) RelationshipsField
- func (v RelationshipsField) Name() string
- func (f RelationshipsField) OnDelete(value ReferenceDeleteAction) RelationshipsField
- func (f RelationshipsField) PrependHooks(value Hooks[[]operation.ID]) RelationshipsField
- func (f RelationshipsField) Private(namespace string, value store.Value) RelationshipsField
- func (v RelationshipsField) Provenance() []string
- func (f RelationshipsField) Rename(name string) RelationshipsField
- func (f RelationshipsField) ReplaceAfterRead(callbacks ...OutputTransform[[]operation.ReferenceOutput]) RelationshipsField
- func (f RelationshipsField) ReplaceLiveValidators(values ...LiveValidator[[]operation.ID]) RelationshipsField
- func (f RelationshipsField) ReplaceValidators(values ...Validator[[]operation.ID]) RelationshipsField
- func (f RelationshipsField) Required(values ...bool) RelationshipsField
- func (f RelationshipsField) RestrictAccess(value Access) RelationshipsField
- func (f RelationshipsField) Validate(value Validator[[]operation.ID]) RelationshipsField
- func (f RelationshipsField) Validators() []Validator[[]operation.ID]
- type Resolver
- type RowLabels
- type SelectField
- func (f SelectField) Access(value Access) SelectField
- func (v SelectField) AccessPolicy() Access
- func (f SelectField) Admin(value Admin) SelectField
- func (v SelectField) AdminPolicy() Admin
- func (f SelectField) AfterRead(callbacks ...OutputTransform[string]) SelectField
- func (f SelectField) AfterReadHooks() []OutputTransform[string]
- func (f SelectField) AppendHooks(value Hooks[string]) SelectField
- func (v SelectField) BehaviorSummary() PolicySummary
- func (v SelectField) Children() Fields
- func (f SelectField) Default(value string) SelectField
- func (f SelectField) DefaultCallback() DefaultFunc[string]
- func (f SelectField) DefaultFrom(callback DefaultFunc[string]) SelectField
- func (f SelectField) EditAdmin(edit func(*Admin)) SelectField
- func (f SelectField) HookPolicy() Hooks[string]
- func (f SelectField) Hooks(value Hooks[string]) SelectField
- func (f SelectField) Index(values ...bool) SelectField
- func (v SelectField) IsLocalized() bool
- func (v SelectField) IsRequired() bool
- func (v SelectField) Kind() Kind
- func (f SelectField) Label(value string) SelectField
- func (v SelectField) LabelText() string
- func (f SelectField) LabelTranslations(values map[string]string) SelectField
- func (f SelectField) LiveValidate(value LiveValidator[string]) SelectField
- func (f SelectField) LiveValidators() []LiveValidator[string]
- func (f SelectField) Localized(values ...bool) SelectField
- func (v SelectField) Name() string
- func (f SelectField) Options(values ...Option) SelectField
- func (f SelectField) PrependHooks(value Hooks[string]) SelectField
- func (f SelectField) Private(namespace string, value store.Value) SelectField
- func (v SelectField) Provenance() []string
- func (f SelectField) Rename(name string) SelectField
- func (f SelectField) ReplaceAfterRead(callbacks ...OutputTransform[string]) SelectField
- func (f SelectField) ReplaceLiveValidators(values ...LiveValidator[string]) SelectField
- func (f SelectField) ReplaceValidators(values ...Validator[string]) SelectField
- func (f SelectField) Required(values ...bool) SelectField
- func (f SelectField) RestrictAccess(value Access) SelectField
- func (f SelectField) Unique(values ...bool) SelectField
- func (f SelectField) Validate(value Validator[string]) SelectField
- func (f SelectField) Validators() []Validator[string]
- type TextField
- func (f TextField) Access(value Access) TextField
- func (v TextField) AccessPolicy() Access
- func (f TextField) Admin(value Admin) TextField
- func (v TextField) AdminPolicy() Admin
- func (f TextField) AfterRead(callbacks ...OutputTransform[string]) TextField
- func (f TextField) AfterReadHooks() []OutputTransform[string]
- func (f TextField) AppendHooks(value Hooks[string]) TextField
- func (v TextField) BehaviorSummary() PolicySummary
- func (v TextField) Children() Fields
- func (f TextField) Default(value string) TextField
- func (f TextField) DefaultCallback() DefaultFunc[string]
- func (f TextField) DefaultFrom(callback DefaultFunc[string]) TextField
- func (f TextField) EditAdmin(edit func(*Admin)) TextField
- func (f TextField) HookPolicy() Hooks[string]
- func (f TextField) Hooks(value Hooks[string]) TextField
- func (f TextField) Index(values ...bool) TextField
- func (v TextField) IsLocalized() bool
- func (v TextField) IsRequired() bool
- func (v TextField) Kind() Kind
- func (f TextField) Label(value string) TextField
- func (v TextField) LabelText() string
- func (f TextField) LabelTranslations(values map[string]string) TextField
- func (f TextField) LiveValidate(value LiveValidator[string]) TextField
- func (f TextField) LiveValidators() []LiveValidator[string]
- func (f TextField) Localized(values ...bool) TextField
- func (f TextField) MaxLength(value int) TextField
- func (f TextField) MinLength(value int) TextField
- func (v TextField) Name() string
- func (f TextField) PrependHooks(value Hooks[string]) TextField
- func (f TextField) Private(namespace string, value store.Value) TextField
- func (v TextField) Provenance() []string
- func (f TextField) Rename(name string) TextField
- func (f TextField) ReplaceAfterRead(callbacks ...OutputTransform[string]) TextField
- func (f TextField) ReplaceLiveValidators(values ...LiveValidator[string]) TextField
- func (f TextField) ReplaceValidators(values ...Validator[string]) TextField
- func (f TextField) Required(values ...bool) TextField
- func (f TextField) RestrictAccess(value Access) TextField
- func (f TextField) Unique(values ...bool) TextField
- func (f TextField) Validate(value Validator[string]) TextField
- func (f TextField) Validators() []Validator[string]
- type TextListField
- func (f TextListField) Access(value Access) TextListField
- func (v TextListField) AccessPolicy() Access
- func (f TextListField) Admin(value Admin) TextListField
- func (v TextListField) AdminPolicy() Admin
- func (f TextListField) AfterRead(callbacks ...OutputTransform[[]string]) TextListField
- func (f TextListField) AfterReadHooks() []OutputTransform[[]string]
- func (f TextListField) AppendHooks(value Hooks[[]string]) TextListField
- func (v TextListField) BehaviorSummary() PolicySummary
- func (v TextListField) Children() Fields
- func (f TextListField) Default(values ...string) TextListField
- func (f TextListField) DefaultCallback() DefaultFunc[[]string]
- func (f TextListField) DefaultFrom(callback DefaultFunc[[]string]) TextListField
- func (f TextListField) EditAdmin(edit func(*Admin)) TextListField
- func (f TextListField) HookPolicy() Hooks[[]string]
- func (f TextListField) Hooks(value Hooks[[]string]) TextListField
- func (v TextListField) IsLocalized() bool
- func (v TextListField) IsRequired() bool
- func (v TextListField) Kind() Kind
- func (f TextListField) Label(value string) TextListField
- func (v TextListField) LabelText() string
- func (f TextListField) LabelTranslations(values map[string]string) TextListField
- func (f TextListField) LiveValidate(value LiveValidator[[]string]) TextListField
- func (f TextListField) LiveValidators() []LiveValidator[[]string]
- func (f TextListField) Localized(values ...bool) TextListField
- func (f TextListField) MaxLength(value int) TextListField
- func (f TextListField) MaxRows(value int) TextListField
- func (f TextListField) MinLength(value int) TextListField
- func (f TextListField) MinRows(value int) TextListField
- func (v TextListField) Name() string
- func (f TextListField) PrependHooks(value Hooks[[]string]) TextListField
- func (f TextListField) Private(namespace string, value store.Value) TextListField
- func (v TextListField) Provenance() []string
- func (f TextListField) Rename(name string) TextListField
- func (f TextListField) ReplaceAfterRead(callbacks ...OutputTransform[[]string]) TextListField
- func (f TextListField) ReplaceLiveValidators(values ...LiveValidator[[]string]) TextListField
- func (f TextListField) ReplaceValidators(values ...Validator[[]string]) TextListField
- func (f TextListField) Required(values ...bool) TextListField
- func (f TextListField) RestrictAccess(value Access) TextListField
- func (f TextListField) Validate(value Validator[[]string]) TextListField
- func (f TextListField) Validators() []Validator[[]string]
- type Transform
- type UploadField
- func (f UploadField) Access(value Access) UploadField
- func (v UploadField) AccessPolicy() Access
- func (f UploadField) Admin(value Admin) UploadField
- func (v UploadField) AdminPolicy() Admin
- func (f UploadField) AfterRead(callbacks ...OutputTransform[operation.ReferenceOutput]) UploadField
- func (f UploadField) AfterReadHooks() []OutputTransform[operation.ReferenceOutput]
- func (f UploadField) AppendHooks(value Hooks[operation.ID]) UploadField
- func (v UploadField) BehaviorSummary() PolicySummary
- func (v UploadField) Children() Fields
- func (f UploadField) EditAdmin(edit func(*Admin)) UploadField
- func (f UploadField) FilterOptionRules(rules ...RelationshipFilterRule) UploadField
- func (f UploadField) HookPolicy() Hooks[operation.ID]
- func (f UploadField) Hooks(value Hooks[operation.ID]) UploadField
- func (f UploadField) Index(values ...bool) UploadField
- func (v UploadField) IsLocalized() bool
- func (v UploadField) IsRequired() bool
- func (v UploadField) Kind() Kind
- func (f UploadField) Label(value string) UploadField
- func (v UploadField) LabelText() string
- func (f UploadField) LabelTranslations(values map[string]string) UploadField
- func (f UploadField) LiveValidate(value LiveValidator[operation.ID]) UploadField
- func (f UploadField) LiveValidators() []LiveValidator[operation.ID]
- func (f UploadField) Localized(values ...bool) UploadField
- func (v UploadField) Name() string
- func (f UploadField) OnDelete(value ReferenceDeleteAction) UploadField
- func (f UploadField) PrependHooks(value Hooks[operation.ID]) UploadField
- func (f UploadField) Private(namespace string, value store.Value) UploadField
- func (v UploadField) Provenance() []string
- func (f UploadField) Rename(name string) UploadField
- func (f UploadField) ReplaceAfterRead(callbacks ...OutputTransform[operation.ReferenceOutput]) UploadField
- func (f UploadField) ReplaceLiveValidators(values ...LiveValidator[operation.ID]) UploadField
- func (f UploadField) ReplaceValidators(values ...Validator[operation.ID]) UploadField
- func (f UploadField) Required(values ...bool) UploadField
- func (f UploadField) RestrictAccess(value Access) UploadField
- func (f UploadField) Unique(values ...bool) UploadField
- func (f UploadField) Validate(value Validator[operation.ID]) UploadField
- func (f UploadField) Validators() []Validator[operation.ID]
- type UploadsField
- func (f UploadsField) Access(value Access) UploadsField
- func (v UploadsField) AccessPolicy() Access
- func (f UploadsField) Admin(value Admin) UploadsField
- func (v UploadsField) AdminPolicy() Admin
- func (f UploadsField) AfterRead(callbacks ...OutputTransform[[]operation.ReferenceOutput]) UploadsField
- func (f UploadsField) AfterReadHooks() []OutputTransform[[]operation.ReferenceOutput]
- func (f UploadsField) AppendHooks(value Hooks[[]operation.ID]) UploadsField
- func (v UploadsField) BehaviorSummary() PolicySummary
- func (v UploadsField) Children() Fields
- func (f UploadsField) EditAdmin(edit func(*Admin)) UploadsField
- func (f UploadsField) FilterOptionRules(rules ...RelationshipFilterRule) UploadsField
- func (f UploadsField) HookPolicy() Hooks[[]operation.ID]
- func (f UploadsField) Hooks(value Hooks[[]operation.ID]) UploadsField
- func (v UploadsField) IsLocalized() bool
- func (v UploadsField) IsRequired() bool
- func (v UploadsField) Kind() Kind
- func (f UploadsField) Label(value string) UploadsField
- func (v UploadsField) LabelText() string
- func (f UploadsField) LabelTranslations(values map[string]string) UploadsField
- func (f UploadsField) LiveValidate(value LiveValidator[[]operation.ID]) UploadsField
- func (f UploadsField) LiveValidators() []LiveValidator[[]operation.ID]
- func (f UploadsField) Localized(values ...bool) UploadsField
- func (v UploadsField) Name() string
- func (f UploadsField) OnDelete(value ReferenceDeleteAction) UploadsField
- func (f UploadsField) PrependHooks(value Hooks[[]operation.ID]) UploadsField
- func (f UploadsField) Private(namespace string, value store.Value) UploadsField
- func (v UploadsField) Provenance() []string
- func (f UploadsField) Rename(name string) UploadsField
- func (f UploadsField) ReplaceAfterRead(callbacks ...OutputTransform[[]operation.ReferenceOutput]) UploadsField
- func (f UploadsField) ReplaceLiveValidators(values ...LiveValidator[[]operation.ID]) UploadsField
- func (f UploadsField) ReplaceValidators(values ...Validator[[]operation.ID]) UploadsField
- func (f UploadsField) Required(values ...bool) UploadsField
- func (f UploadsField) RestrictAccess(value Access) UploadsField
- func (f UploadsField) Validate(value Validator[[]operation.ID]) UploadsField
- func (f UploadsField) Validators() []Validator[[]operation.ID]
- type Validator
- type ValueType
- type View
- func (d View) AccessPolicy() Access
- func (d View) AdminComponent() (pluginKey, component string, config json.RawMessage, ok bool)
- func (d View) AdminPolicy() Admin
- func (d View) BehaviorSummary() PolicySummary
- func (d View) BlockReferences() []string
- func (d View) Blocks() []Block
- func (d View) Boundary() Boundary
- func (d View) Branches() []Branch
- func (d View) Category() Category
- func (d View) CodeLanguage() string
- func (d View) Columns() int
- func (d View) DateFormat() DateFormat
- func (d View) Default() (DefaultValue, bool)
- func (d View) Description() string
- func (d View) DescriptionTranslations() map[string]string
- func (d View) Editor() (string, json.RawMessage)
- func (d View) EmbeddedTrees() []EmbeddedTree
- func (d View) Fields() Fields
- func (d View) HasBehavior() bool
- func (d View) Hidden() bool
- func (d View) Index() bool
- func (d View) InitiallyCollapsed() bool
- func (d View) IsNamedTab() bool
- func (d View) IsUnnamedTab() bool
- func (d View) Issues() []Issue
- func (d View) JoinAllowCreate() bool
- func (d View) JoinCollection() string
- func (d View) JoinDefaultColumns() []string
- func (d View) JoinDefaultSort() string
- func (d View) JoinLimit() int
- func (d View) JoinOn() string
- func (d View) Kind() Kind
- func (d View) Label() string
- func (d View) LabelTranslations() map[string]string
- func (d View) LocalRowLabel() (string, json.RawMessage)
- func (d View) Localized() bool
- func (d View) Max() (float64, bool)
- func (d View) MaxLength() (int, bool)
- func (d View) MaxRows() int
- func (d View) Min() (float64, bool)
- func (d View) MinLength() (int, bool)
- func (d View) MinRows() int
- func (d View) Name() string
- func (d View) Options() []Option
- func (d View) Placeholder() string
- func (d View) PlaceholderTranslations() map[string]string
- func (d View) PluginConfig() json.RawMessage
- func (d View) PluginKey() string
- func (d View) PluginReferenceKeys() []string
- func (d View) Private(namespace string) (store.Value, bool)
- func (d View) Provenance() []string
- func (d View) ReadOnly() bool
- func (d View) ReferenceDeleteAction() ReferenceDeleteAction
- func (d View) RelationshipFilters() []RelationshipFilterRule
- func (d View) RelationshipHasMany() bool
- func (d View) RelationshipTarget() string
- func (d View) RelationshipTargets() []string
- func (d View) Required() bool
- func (d View) RowLabel() string
- func (d View) RowLabelComponent() (pluginKey, component string, config json.RawMessage, ok bool)
- func (d View) RowLabels() RowLabels
- func (d View) SelectDefaults() []string
- func (d View) SelectHasMany() bool
- func (d View) Sidebar() bool
- func (d View) SlugSource() (string, bool)
- func (d View) Step() (float64, bool)
- func (d View) Tab() string
- func (d View) TabTranslations() map[string]string
- func (d View) Unique() bool
- func (d View) ValueType() ValueType
- type Visit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendChild ¶ added in v0.2.0
func AppendChild[Parent interface {
Node
EditChildren(func(*ChildrenDraft) error) (Parent, error)
}](parent Parent, child Node) (Parent, error)
AppendChild appends one direct child to a group or array. It snapshots the child and preserves existing parent and child policies. Duplicate or invalid names return the original parent and an error.
func EditChild ¶ added in v0.2.0
func EditChild[Parent interface {
Node
EditChildren(func(*ChildrenDraft) error) (Parent, error)
}, Child Node](parent Parent, name string, as func(Node) (Child, error), edit func(Child) Child) (Parent, error)
EditChild refines one direct child of a group or array while retaining the parent's concrete type. Pass a checked converter such as AsText or AsSelect and return the refined field from edit. Existing policies and attachments remain on that field unless the edit explicitly replaces them.
A missing child, incompatible concrete kind, or attempted rename returns the original parent and an error. Use EditChildren for nested or multiple edits.
func NormalizeSlug ¶
NormalizeSlug converts a source or manual value into Ridu's deterministic URL-segment form. ASCII letters are lowercased, digits and underscores are retained, whitespace and hyphen runs become one hyphen, and other characters are removed.
func ReplaceChild ¶ added in v0.2.0
func ReplaceChild[Parent interface {
Node
EditChildren(func(*ChildrenDraft) error) (Parent, error)
}](parent Parent, name string, replacement Node) (Parent, error)
ReplaceChild deliberately replaces one direct child, including its kind, policies, and attachments. Unrelated children and the parent's own policies are preserved. A failed replacement returns the original parent and an error.
Types ¶
type Access ¶ added in v0.2.0
type Access struct {
// Create controls whether the field may be supplied during document creation.
Create AccessRule
// Read controls whether the field is included in API and admin responses.
Read AccessRule
// Update controls whether the field may be changed on an existing document.
Update AccessRule
}
Access configures who may create, read, or update a field value. Assign it with a concrete field's Access method; an omitted rule leaves that operation unrestricted. Access replaces the field's complete policy group, while RestrictAccess adds only the supplied rules and requires both old and new rules to allow the operation.
For example, this field is omitted from anonymous read responses:
field.Text("internalNotes").Access(field.Access{
Read: func(ctx operation.Context) (bool, error) {
return ctx.Actor != nil, nil
},
})
type AccessRule ¶ added in v0.2.0
AccessRule decides whether one field value may be created, read, or updated. Return false during a write to reject the operation, or during a read to omit the field from the response. Returning an error stops the operation. Field rules cannot return the query predicates supported by collection access rules.
type Admin ¶ added in v0.2.0
type Admin struct {
Description string
DescriptionTranslations map[string]string
Placeholder string
PlaceholderTranslations map[string]string
ReadOnly bool
Hidden bool
Sidebar bool
Columns int
Editor ComponentRef
RowLabel ComponentRef
RowLabelPath string
RowLabels RowLabels
LabelTranslations map[string]string
Tab string
TabTranslations map[string]string
InitiallyCollapsed bool
CodeLanguage string
Extensions map[string]store.Value
// VisibleWhen is a finite presentation condition; it never grants access.
VisibleWhen Condition
}
Admin configures how a field is presented and edited in the framework admin. It never grants API access or changes storage behavior; use Access for authorization. A field's Admin method replaces the complete group, while EditAdmin preserves members its callback does not change. Ridu snapshots maps on input and output so retained drafts cannot mutate a published field.
type ArrayField ¶ added in v0.2.0
type ArrayField struct {
// contains filtered or unexported fields
}
ArrayField configures an ordered list of rows containing the supplied fields.
func Array ¶
func Array(name string, children Fields) ArrayField
Array creates an ordered list of rows containing the supplied fields.
func AsArray ¶ added in v0.2.0
func AsArray(node Node) (ArrayField, error)
AsArray provides a checked concrete view of an immutable node.
func (ArrayField) Access ¶ added in v0.2.0
func (f ArrayField) Access(value Access) ArrayField
Access replaces the complete field access policy.
func (ArrayField) AccessPolicy ¶ added in v0.2.0
func (v ArrayField) AccessPolicy() Access
func (ArrayField) Admin ¶ added in v0.2.0
func (f ArrayField) Admin(value Admin) ArrayField
Admin replaces the complete admin presentation policy.
func (ArrayField) AdminPolicy ¶ added in v0.2.0
func (v ArrayField) AdminPolicy() Admin
func (ArrayField) AfterRead ¶ added in v0.2.2
func (f ArrayField) AfterRead(callbacks ...OutputTransform[store.Value]) ArrayField
AfterRead appends response transforms in order; no callbacks does nothing.
func (ArrayField) AfterReadHooks ¶ added in v0.2.2
func (f ArrayField) AfterReadHooks() []OutputTransform[store.Value]
AfterReadHooks returns a detached response-transform slice.
func (ArrayField) AppendHooks ¶ added in v0.2.0
func (f ArrayField) AppendHooks(value Hooks[store.Value]) ArrayField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (ArrayField) BehaviorSummary ¶ added in v0.2.0
func (v ArrayField) BehaviorSummary() PolicySummary
func (ArrayField) EditAdmin ¶ added in v0.2.0
func (f ArrayField) EditAdmin(edit func(*Admin)) ArrayField
EditAdmin updates selected admin settings while preserving the rest.
func (ArrayField) EditChildren ¶ added in v0.2.0
func (f ArrayField) EditChildren(edit func(*ChildrenDraft) error) (ArrayField, error)
func (ArrayField) HookPolicy ¶ added in v0.2.0
func (f ArrayField) HookPolicy() Hooks[store.Value]
func (ArrayField) Hooks ¶ added in v0.2.0
func (f ArrayField) Hooks(value Hooks[store.Value]) ArrayField
Hooks replaces the complete field lifecycle hook group.
func (ArrayField) IsLocalized ¶ added in v0.2.0
func (v ArrayField) IsLocalized() bool
func (ArrayField) IsRequired ¶ added in v0.2.0
func (v ArrayField) IsRequired() bool
func (ArrayField) Label ¶ added in v0.2.0
func (f ArrayField) Label(value string) ArrayField
func (ArrayField) LabelTranslations ¶ added in v0.2.0
func (f ArrayField) LabelTranslations(values map[string]string) ArrayField
func (ArrayField) LiveValidate ¶ added in v0.2.0
func (f ArrayField) LiveValidate(value LiveValidator[store.Value]) ArrayField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (ArrayField) LiveValidators ¶ added in v0.2.0
func (f ArrayField) LiveValidators() []LiveValidator[store.Value]
LiveValidators returns a detached list of this field's advisory server checks.
func (ArrayField) Localized ¶ added in v0.2.0
func (f ArrayField) Localized(values ...bool) ArrayField
func (ArrayField) MaxRows ¶ added in v0.2.0
func (f ArrayField) MaxRows(value int) ArrayField
func (ArrayField) MinRows ¶ added in v0.2.0
func (f ArrayField) MinRows(value int) ArrayField
func (ArrayField) PrependHooks ¶ added in v0.2.0
func (f ArrayField) PrependHooks(value Hooks[store.Value]) ArrayField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (ArrayField) Private ¶ added in v0.2.0
func (f ArrayField) Private(namespace string, value store.Value) ArrayField
func (ArrayField) Provenance ¶ added in v0.2.0
func (v ArrayField) Provenance() []string
func (ArrayField) Rename ¶ added in v0.2.0
func (f ArrayField) Rename(name string) ArrayField
func (ArrayField) ReplaceAfterRead ¶ added in v0.2.2
func (f ArrayField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) ArrayField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (ArrayField) ReplaceLiveValidators ¶ added in v0.2.0
func (f ArrayField) ReplaceLiveValidators(values ...LiveValidator[store.Value]) ArrayField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (ArrayField) ReplaceValidators ¶ added in v0.2.0
func (f ArrayField) ReplaceValidators(values ...Validator[store.Value]) ArrayField
ReplaceValidators replaces all authoritative save validators.
func (ArrayField) Required ¶ added in v0.2.0
func (f ArrayField) Required(values ...bool) ArrayField
func (ArrayField) RestrictAccess ¶ added in v0.2.0
func (f ArrayField) RestrictAccess(value Access) ArrayField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (ArrayField) Validate ¶ added in v0.2.0
func (f ArrayField) Validate(value Validator[store.Value]) ArrayField
Validate appends one authoritative save validator.
func (ArrayField) Validators ¶ added in v0.2.0
func (f ArrayField) Validators() []Validator[store.Value]
type Block ¶
type Block struct {
// TypeName optionally names a reusable generated type family; it never changes the stored slug.
TypeName string
// Slug is the stable discriminator stored with block values.
Slug string
// Labels overrides the singular and plural names shown to authors.
Labels BlockLabels
// Fields defines the values stored by this block type.
Fields Fields
// Admin configures this block type in the framework admin.
Admin BlockAdmin
}
Block is one discriminated layout allowed by a blocks field.
type BlockAdmin ¶ added in v0.2.0
type BlockAdmin struct {
// NameField names a direct stored Text child edited from the block header.
// Slug fields and fields with custom editors are not eligible.
NameField string
// RowLabelPath names a direct stored scalar child; empty values use the block type label.
RowLabelPath string
}
BlockAdmin configures ordinary and embedded block headers.
type BlockLabels ¶ added in v0.2.0
type BlockLabels struct {
Singular string
Plural string
SingularTranslations map[string]string
PluralTranslations map[string]string
}
BlockLabels overrides the singular and plural names derived from a block slug. Translations select admin interface language, independently of content locale.
type BlockRegistry ¶ added in v0.2.0
type BlockRegistry struct {
// contains filtered or unexported fields
}
BlockRegistry owns immutable, centrally declared block definitions. Bind makes references traversable without granting a referencing resource mutation rights.
func NewBlockRegistry ¶ added in v0.2.0
func NewBlockRegistry(blocks ...Block) (BlockRegistry, error)
NewBlockRegistry snapshots and resolves a finite registry. Forward references are supported; cycles and duplicate declarations are configuration errors.
func (BlockRegistry) Bind ¶ added in v0.2.0
func (r BlockRegistry) Bind(fields Fields) (Fields, error)
Bind returns a detached field graph with read-only referenced branches. Policy closures remain application-owned and execute normally per occurrence.
func (BlockRegistry) BindAt ¶ added in v0.2.0
func (r BlockRegistry) BindAt(fields Fields, path string) (Fields, error)
BindAt includes the resource's authored path in reference diagnostics.
func (BlockRegistry) Blocks ¶ added in v0.2.0
func (r BlockRegistry) Blocks() []Block
Blocks returns detached declarations in registration order.
type BlocksField ¶ added in v0.2.0
type BlocksField struct {
// contains filtered or unexported fields
}
BlocksField configures an ordered list of rows chosen from the supplied block types.
func AsBlocks ¶ added in v0.2.0
func AsBlocks(node Node) (BlocksField, error)
AsBlocks provides a checked concrete view of an immutable node.
func Blocks ¶
func Blocks(name string, blocks ...Block) BlocksField
Blocks creates an ordered list of rows chosen from the supplied block types.
func (BlocksField) Access ¶ added in v0.2.0
func (f BlocksField) Access(value Access) BlocksField
Access replaces the complete field access policy.
func (BlocksField) AccessPolicy ¶ added in v0.2.0
func (v BlocksField) AccessPolicy() Access
func (BlocksField) Admin ¶ added in v0.2.0
func (f BlocksField) Admin(value Admin) BlocksField
Admin replaces the complete admin presentation policy.
func (BlocksField) AdminPolicy ¶ added in v0.2.0
func (v BlocksField) AdminPolicy() Admin
func (BlocksField) AfterRead ¶ added in v0.2.2
func (f BlocksField) AfterRead(callbacks ...OutputTransform[store.Value]) BlocksField
AfterRead appends response transforms in order; no callbacks does nothing.
func (BlocksField) AfterReadHooks ¶ added in v0.2.2
func (f BlocksField) AfterReadHooks() []OutputTransform[store.Value]
AfterReadHooks returns a detached response-transform slice.
func (BlocksField) AppendHooks ¶ added in v0.2.0
func (f BlocksField) AppendHooks(value Hooks[store.Value]) BlocksField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (BlocksField) BehaviorSummary ¶ added in v0.2.0
func (v BlocksField) BehaviorSummary() PolicySummary
func (BlocksField) EditAdmin ¶ added in v0.2.0
func (f BlocksField) EditAdmin(edit func(*Admin)) BlocksField
EditAdmin updates selected admin settings while preserving the rest.
func (BlocksField) EditBlocks ¶ added in v0.2.0
func (f BlocksField) EditBlocks(edit func(*[]Block) error) (BlocksField, error)
EditBlocks edits a detached block declaration slice and publishes it only when the edit succeeds. Field-owned behavior and presentation are preserved.
func (BlocksField) HookPolicy ¶ added in v0.2.0
func (f BlocksField) HookPolicy() Hooks[store.Value]
func (BlocksField) Hooks ¶ added in v0.2.0
func (f BlocksField) Hooks(value Hooks[store.Value]) BlocksField
Hooks replaces the complete field lifecycle hook group.
func (BlocksField) IsLocalized ¶ added in v0.2.0
func (v BlocksField) IsLocalized() bool
func (BlocksField) IsRequired ¶ added in v0.2.0
func (v BlocksField) IsRequired() bool
func (BlocksField) Label ¶ added in v0.2.0
func (f BlocksField) Label(value string) BlocksField
func (BlocksField) LabelTranslations ¶ added in v0.2.0
func (f BlocksField) LabelTranslations(values map[string]string) BlocksField
func (BlocksField) LiveValidate ¶ added in v0.2.0
func (f BlocksField) LiveValidate(value LiveValidator[store.Value]) BlocksField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (BlocksField) LiveValidators ¶ added in v0.2.0
func (f BlocksField) LiveValidators() []LiveValidator[store.Value]
LiveValidators returns a detached list of this field's advisory server checks.
func (BlocksField) Localized ¶ added in v0.2.0
func (f BlocksField) Localized(values ...bool) BlocksField
func (BlocksField) MaxRows ¶ added in v0.2.0
func (f BlocksField) MaxRows(value int) BlocksField
func (BlocksField) MinRows ¶ added in v0.2.0
func (f BlocksField) MinRows(value int) BlocksField
func (BlocksField) PrependHooks ¶ added in v0.2.0
func (f BlocksField) PrependHooks(value Hooks[store.Value]) BlocksField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (BlocksField) Private ¶ added in v0.2.0
func (f BlocksField) Private(namespace string, value store.Value) BlocksField
func (BlocksField) Provenance ¶ added in v0.2.0
func (v BlocksField) Provenance() []string
func (BlocksField) References ¶ added in v0.2.0
func (f BlocksField) References(slugs ...string) BlocksField
References selects registered definitions in picker order. Inline declarations and references are mutually exclusive and validated during resolution.
func (BlocksField) Rename ¶ added in v0.2.0
func (f BlocksField) Rename(name string) BlocksField
func (BlocksField) ReplaceAfterRead ¶ added in v0.2.2
func (f BlocksField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) BlocksField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (BlocksField) ReplaceLiveValidators ¶ added in v0.2.0
func (f BlocksField) ReplaceLiveValidators(values ...LiveValidator[store.Value]) BlocksField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (BlocksField) ReplaceValidators ¶ added in v0.2.0
func (f BlocksField) ReplaceValidators(values ...Validator[store.Value]) BlocksField
ReplaceValidators replaces all authoritative save validators.
func (BlocksField) Required ¶ added in v0.2.0
func (f BlocksField) Required(values ...bool) BlocksField
func (BlocksField) RestrictAccess ¶ added in v0.2.0
func (f BlocksField) RestrictAccess(value Access) BlocksField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (BlocksField) Validate ¶ added in v0.2.0
func (f BlocksField) Validate(value Validator[store.Value]) BlocksField
Validate appends one authoritative save validator.
func (BlocksField) Validators ¶ added in v0.2.0
func (f BlocksField) Validators() []Validator[store.Value]
type Boundary ¶ added in v0.2.0
type Boundary string
Boundary distinguishes storage shape from presentation and embedded hosts.
const ( StoredScalar Boundary = "stored_scalar" StoredReference Boundary = "stored_reference" StoredObject Boundary = "stored_object" RepeatedArray Boundary = "repeated_array" BlockSet Boundary = "blocks" BlockCase Boundary = "block_case" NamedTabBoundary Boundary = "named_tab" Layout Boundary = "layout" PluginValue Boundary = "plugin_value" EmbeddedCase Boundary = "embedded_case" Output Boundary = "output" )
type Branch ¶ added in v0.2.0
type Branch struct {
Selector BranchSelector
Name string
Referenced bool
Fields Fields
}
Branch is a detached traversal view of one child scope.
type BranchSelector ¶ added in v0.2.0
BranchSelector selects one structural child boundary, never a flattened path. Index identifies an authored tab; Tree/Case/Key identify plugin payload cases.
type Category ¶
type Category string
Category describes the broad behavior a field contributes to a resolved schema. Schema manifests use categories to avoid treating every field as an unstructured type string.
type CheckboxField ¶ added in v0.2.0
type CheckboxField struct {
// contains filtered or unexported fields
}
CheckboxField configures a true-or-false checkbox field.
func AsCheckbox ¶ added in v0.2.0
func AsCheckbox(node Node) (CheckboxField, error)
AsCheckbox provides a checked concrete view of an immutable node.
func Checkbox ¶
func Checkbox(name string) CheckboxField
Checkbox creates a true-or-false checkbox field.
func (CheckboxField) Access ¶ added in v0.2.0
func (f CheckboxField) Access(value Access) CheckboxField
Access replaces the complete field access policy.
func (CheckboxField) AccessPolicy ¶ added in v0.2.0
func (v CheckboxField) AccessPolicy() Access
func (CheckboxField) Admin ¶ added in v0.2.0
func (f CheckboxField) Admin(value Admin) CheckboxField
Admin replaces the complete admin presentation policy.
func (CheckboxField) AdminPolicy ¶ added in v0.2.0
func (v CheckboxField) AdminPolicy() Admin
func (CheckboxField) AfterRead ¶ added in v0.2.2
func (f CheckboxField) AfterRead(callbacks ...OutputTransform[bool]) CheckboxField
AfterRead appends response transforms in order; no callbacks does nothing.
func (CheckboxField) AfterReadHooks ¶ added in v0.2.2
func (f CheckboxField) AfterReadHooks() []OutputTransform[bool]
AfterReadHooks returns a detached response-transform slice.
func (CheckboxField) AppendHooks ¶ added in v0.2.0
func (f CheckboxField) AppendHooks(value Hooks[bool]) CheckboxField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (CheckboxField) BehaviorSummary ¶ added in v0.2.0
func (v CheckboxField) BehaviorSummary() PolicySummary
func (CheckboxField) Default ¶ added in v0.2.0
func (f CheckboxField) Default(value bool) CheckboxField
func (CheckboxField) DefaultCallback ¶ added in v0.2.0
func (f CheckboxField) DefaultCallback() DefaultFunc[bool]
DefaultCallback returns the configured dynamic default, or nil for a literal default or no default. Callback closure captures remain application-owned.
func (CheckboxField) DefaultFrom ¶ added in v0.2.0
func (f CheckboxField) DefaultFrom(callback DefaultFunc[bool]) CheckboxField
DefaultFrom supplies a server-side initial value for an eligible omitted field. It replaces a literal or dynamic default; the original field is unchanged. See DefaultFunc and operation.Context for initialization semantics.
func (CheckboxField) EditAdmin ¶ added in v0.2.0
func (f CheckboxField) EditAdmin(edit func(*Admin)) CheckboxField
EditAdmin updates selected admin settings while preserving the rest.
func (CheckboxField) HookPolicy ¶ added in v0.2.0
func (f CheckboxField) HookPolicy() Hooks[bool]
func (CheckboxField) Hooks ¶ added in v0.2.0
func (f CheckboxField) Hooks(value Hooks[bool]) CheckboxField
Hooks replaces the complete field lifecycle hook group.
func (CheckboxField) Index ¶ added in v0.2.0
func (f CheckboxField) Index(values ...bool) CheckboxField
func (CheckboxField) IsLocalized ¶ added in v0.2.0
func (v CheckboxField) IsLocalized() bool
func (CheckboxField) IsRequired ¶ added in v0.2.0
func (v CheckboxField) IsRequired() bool
func (CheckboxField) Label ¶ added in v0.2.0
func (f CheckboxField) Label(value string) CheckboxField
func (CheckboxField) LabelTranslations ¶ added in v0.2.0
func (f CheckboxField) LabelTranslations(values map[string]string) CheckboxField
func (CheckboxField) LiveValidate ¶ added in v0.2.0
func (f CheckboxField) LiveValidate(value LiveValidator[bool]) CheckboxField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (CheckboxField) LiveValidators ¶ added in v0.2.0
func (f CheckboxField) LiveValidators() []LiveValidator[bool]
LiveValidators returns a detached list of this field's advisory server checks.
func (CheckboxField) Localized ¶ added in v0.2.0
func (f CheckboxField) Localized(values ...bool) CheckboxField
func (CheckboxField) PrependHooks ¶ added in v0.2.0
func (f CheckboxField) PrependHooks(value Hooks[bool]) CheckboxField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (CheckboxField) Private ¶ added in v0.2.0
func (f CheckboxField) Private(namespace string, value store.Value) CheckboxField
func (CheckboxField) Provenance ¶ added in v0.2.0
func (v CheckboxField) Provenance() []string
func (CheckboxField) Rename ¶ added in v0.2.0
func (f CheckboxField) Rename(name string) CheckboxField
func (CheckboxField) ReplaceAfterRead ¶ added in v0.2.2
func (f CheckboxField) ReplaceAfterRead(callbacks ...OutputTransform[bool]) CheckboxField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (CheckboxField) ReplaceLiveValidators ¶ added in v0.2.0
func (f CheckboxField) ReplaceLiveValidators(values ...LiveValidator[bool]) CheckboxField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (CheckboxField) ReplaceValidators ¶ added in v0.2.0
func (f CheckboxField) ReplaceValidators(values ...Validator[bool]) CheckboxField
ReplaceValidators replaces all authoritative save validators.
func (CheckboxField) Required ¶ added in v0.2.0
func (f CheckboxField) Required(values ...bool) CheckboxField
func (CheckboxField) RestrictAccess ¶ added in v0.2.0
func (f CheckboxField) RestrictAccess(value Access) CheckboxField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (CheckboxField) Unique ¶ added in v0.2.0
func (f CheckboxField) Unique(values ...bool) CheckboxField
func (CheckboxField) Validate ¶ added in v0.2.0
func (f CheckboxField) Validate(value Validator[bool]) CheckboxField
Validate appends one authoritative save validator.
func (CheckboxField) Validators ¶ added in v0.2.0
func (f CheckboxField) Validators() []Validator[bool]
type ChildrenDraft ¶ added in v0.2.0
type ChildrenDraft struct {
// contains filtered or unexported fields
}
ChildrenDraft owns a detached slice. Committing snapshots again, so retained drafts cannot mutate published graphs. Structural edits are explicit.
func (*ChildrenDraft) EditBlock ¶ added in v0.2.0
func (d *ChildrenDraft) EditBlock(name, slug string, edit func(*ChildrenDraft) error) error
func (*ChildrenDraft) EditBranch ¶ added in v0.2.0
func (d *ChildrenDraft) EditBranch(name string, selector BranchSelector, edit func(*ChildrenDraft) error) error
EditBranch targets an explicit object, row, block case, tab or embedded case.
func (*ChildrenDraft) EditBranchAt ¶ added in v0.2.0
func (d *ChildrenDraft) EditBranchAt(index int, selector BranchSelector, edit func(*ChildrenDraft) error) error
EditBranchAt addresses a layout by its authored position when names are absent or ambiguous. The selector still identifies a structural boundary.
func (*ChildrenDraft) EditChildren ¶ added in v0.2.0
func (d *ChildrenDraft) EditChildren(name string, edit func(*ChildrenDraft) error) error
EditChildren targets the one direct children branch of an object/array/layout. Blocks, tabs and embedded payloads require their explicit branch selector.
func (*ChildrenDraft) EditNumber ¶ added in v0.2.0
func (d *ChildrenDraft) EditNumber(name string, edit func(NumberField) NumberField) error
EditNumber refines a known numeric node and diagnoses incompatible kinds.
func (*ChildrenDraft) EditNumberList ¶ added in v0.2.0
func (d *ChildrenDraft) EditNumberList(name string, edit func(NumberListField) NumberListField) error
EditNumberList refines a direct primitive-list child while preserving its policies.
func (*ChildrenDraft) EditText ¶ added in v0.2.0
func (d *ChildrenDraft) EditText(name string, edit func(TextField) TextField) error
EditText refines the actual node, preserving hidden attachments.
func (*ChildrenDraft) EditTextList ¶ added in v0.2.0
func (d *ChildrenDraft) EditTextList(name string, edit func(TextListField) TextListField) error
EditTextList refines a direct primitive-list child while preserving its policies.
func (*ChildrenDraft) Fields ¶ added in v0.2.0
func (d *ChildrenDraft) Fields() Fields
Fields returns a detached inspection snapshot of the draft's current state.
func (*ChildrenDraft) Insert ¶ added in v0.2.0
func (d *ChildrenDraft) Insert(index int, node Node) error
func (*ChildrenDraft) Remove ¶ added in v0.2.0
func (d *ChildrenDraft) Remove(name string) error
func (*ChildrenDraft) Rename ¶ added in v0.2.0
func (d *ChildrenDraft) Rename(name, replacement string) error
Rename changes one direct local name. Sibling references in this same stored scope are rebound explicitly; root references require RenameRoot at the root. Calling Rename on a facade merely changes that value's own name.
func (*ChildrenDraft) RenameRoot ¶ added in v0.2.0
func (d *ChildrenDraft) RenameRoot(name, replacement string) error
RenameRoot is the explicit root edit that also rewrites root selectors in descendants. It must be used on the resource's root draft.
type ComponentRef ¶ added in v0.2.0
type ComponentRef struct {
Key string
PluginKey string
Config store.Value
// contains filtered or unexported fields
}
ComponentRef selects a custom admin component and its optional settings. It changes the UI without changing how the field's value is stored or typed.
func Component ¶ added in v0.2.0
func Component(key string, config ...store.Value) ComponentRef
Component selects an application component registered in admin/src/admin.config.ts. Optionally pass a settings object; the component registration must provide a decoder to check it. Omit settings when the component does not use them.
func PluginComponent ¶ added in v0.2.0
func PluginComponent(pluginKey, key string, config ...store.Value) ComponentRef
PluginComponent selects a component supplied by an installed plugin. pluginKey names the Go plugin; key names a component registered by its admin package.
func (ComponentRef) Err ¶ added in v0.2.0
func (c ComponentRef) Err() error
Err validates static component syntax and finite public object configuration. Omitted configuration is allowed; explicitly supplied zero or null values are not objects. Registration and supported host checks belong to configuration resolution.
func (ComponentRef) MarshalJSON ¶ added in v0.2.0
func (c ComponentRef) MarshalJSON() ([]byte, error)
MarshalJSON encodes only public static component data. An unspecified reference is null and absent configuration is omitted.
type Condition ¶
type Condition struct {
// contains filtered or unexported fields
}
Condition is an immutable, deterministic presentation expression. It never grants access or removes a hidden value from a document.
func Equal ¶ added in v0.2.0
func Equal[Value ConditionScalar](reference Reference, value Value) Condition
Equal compares a referenced scalar field with one finite value.
func NotEqual ¶ added in v0.2.0
func NotEqual[Value ConditionScalar](reference Reference, value Value) Condition
NotEqual compares a referenced scalar field with one finite value.
func OneOf ¶
func OneOf[Value ConditionScalar](reference Reference, values ...Value) Condition
OneOf matches any configured finite value of one scalar type.
func (Condition) Conditions ¶
Conditions returns detached child expressions for All, Any, and Not nodes.
func (Condition) Err ¶ added in v0.2.0
Err checks a condition's finite declaration without resolving its references.
func (Condition) Kind ¶
func (condition Condition) Kind() ConditionKind
Kind reports whether this node is a logical group, negation, or predicate.
func (Condition) MarshalJSON ¶ added in v0.2.0
MarshalJSON serializes the finite authoring tree without resolving references.
func (Condition) Operator ¶
func (condition Condition) Operator() ConditionOperator
Operator returns the predicate's scalar comparison operator.
func (Condition) Reference ¶ added in v0.2.0
Reference returns the predicate's authored field selector.
func (Condition) Values ¶
func (condition Condition) Values() []DefaultValue
Values returns detached, canonically encoded predicate operands.
type ConditionKind ¶
type ConditionKind string
ConditionKind identifies one node in a presentation-only condition tree.
const ( ConditionKindAll ConditionKind = "all" ConditionKindAny ConditionKind = "any" ConditionKindNot ConditionKind = "not" ConditionKindPredicate ConditionKind = "predicate" )
type ConditionOperator ¶
type ConditionOperator string
ConditionOperator identifies one scalar predicate operation.
const ( ConditionEquals ConditionOperator = "equals" ConditionNotEquals ConditionOperator = "notEquals" ConditionOneOf ConditionOperator = "oneOf" )
type ConditionScalar ¶
type ConditionScalar interface {
~string | ~bool | ~int | ~int8 | ~int16 | ~int32 | ~int64 |
~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~float32 | ~float64
}
ConditionScalar is the finite scalar vocabulary accepted by condition predicates.
type DateField ¶ added in v0.2.0
type DateField struct {
// contains filtered or unexported fields
}
DateField configures a field for a date, time, or timestamp.
func (DateField) AccessPolicy ¶ added in v0.2.0
func (v DateField) AccessPolicy() Access
func (DateField) AdminPolicy ¶ added in v0.2.0
func (v DateField) AdminPolicy() Admin
func (DateField) AfterRead ¶ added in v0.2.2
func (f DateField) AfterRead(callbacks ...OutputTransform[string]) DateField
AfterRead appends response transforms in order; no callbacks does nothing.
func (DateField) AfterReadHooks ¶ added in v0.2.2
func (f DateField) AfterReadHooks() []OutputTransform[string]
AfterReadHooks returns a detached response-transform slice.
func (DateField) AppendHooks ¶ added in v0.2.0
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (DateField) BehaviorSummary ¶ added in v0.2.0
func (v DateField) BehaviorSummary() PolicySummary
func (DateField) DefaultCallback ¶ added in v0.2.0
func (f DateField) DefaultCallback() DefaultFunc[string]
DefaultCallback returns the configured dynamic default, or nil for a literal default or no default. Callback closure captures remain application-owned.
func (DateField) DefaultFrom ¶ added in v0.2.0
func (f DateField) DefaultFrom(callback DefaultFunc[string]) DateField
DefaultFrom supplies a server-side initial value for an eligible omitted field. It replaces a literal or dynamic default; the original field is unchanged. See DefaultFunc and operation.Context for initialization semantics.
func (DateField) EditAdmin ¶ added in v0.2.0
EditAdmin updates selected admin settings while preserving the rest.
func (DateField) Format ¶ added in v0.2.0
func (f DateField) Format(value DateFormat) DateField
Format selects whether the field accepts a date, timestamp, or local time. DateOnly is the default. Admin display settings do not change the stored format.
func (DateField) HookPolicy ¶ added in v0.2.0
func (DateField) IsLocalized ¶ added in v0.2.0
func (v DateField) IsLocalized() bool
func (DateField) IsRequired ¶ added in v0.2.0
func (v DateField) IsRequired() bool
func (DateField) LabelTranslations ¶ added in v0.2.0
func (DateField) LiveValidate ¶ added in v0.2.0
func (f DateField) LiveValidate(value LiveValidator[string]) DateField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (DateField) LiveValidators ¶ added in v0.2.0
func (f DateField) LiveValidators() []LiveValidator[string]
LiveValidators returns a detached list of this field's advisory server checks.
func (DateField) PrependHooks ¶ added in v0.2.0
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (DateField) Provenance ¶ added in v0.2.0
func (v DateField) Provenance() []string
func (DateField) ReplaceAfterRead ¶ added in v0.2.2
func (f DateField) ReplaceAfterRead(callbacks ...OutputTransform[string]) DateField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (DateField) ReplaceLiveValidators ¶ added in v0.2.0
func (f DateField) ReplaceLiveValidators(values ...LiveValidator[string]) DateField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (DateField) ReplaceValidators ¶ added in v0.2.0
ReplaceValidators replaces all authoritative save validators.
func (DateField) RestrictAccess ¶ added in v0.2.0
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (DateField) Validators ¶ added in v0.2.0
type DateFormat ¶ added in v0.2.0
type DateFormat string
DateFormat selects a date field's accepted value contract. The admin control follows this format; changing presentation never changes accepted API values.
const ( DateOnly DateFormat = "date" DateTime DateFormat = "date-time" TimeOnly DateFormat = "time" )
type DefaultFunc ¶ added in v0.2.0
DefaultFunc supplies a server-side initial value for an eligible omitted field. Root and Siblings are snapshots at initialization; Prior is the persisted enclosing object or stable row (empty for new rows). ID may be empty. Locale is exact and Local retains authorization, cancellation and the active transaction. Present supplies a value, including zero values; Empty leaves it without a default. An error stops the operation. Returned values still pass validation. Defaults do not prefill an unsaved admin form and do not run on ordinary edits to an existing scope. Callbacks must not depend on other dynamic defaults or perform irreversible side effects: separate requests or retries can run again.
type DefaultKind ¶
type DefaultKind string
DefaultKind identifies the logical value carried by a field default.
const ( DefaultList DefaultKind = "list" DefaultString DefaultKind = "string" DefaultNumber DefaultKind = "number" DefaultBoolean DefaultKind = "boolean" )
type DefaultValue ¶
type DefaultValue struct {
// contains filtered or unexported fields
}
DefaultValue is the normalized literal value produced by Default.
func (DefaultValue) Kind ¶
func (value DefaultValue) Kind() DefaultKind
Kind reports whether the normalized default is a string, number, boolean, or primitive list.
func (DefaultValue) String ¶
func (value DefaultValue) String() string
String returns the canonical textual encoding written to the manifest.
type EditError ¶ added in v0.2.0
type EditError struct {
Code string
Name string
// Expected and Actual name the concrete field shapes for incompatible edits.
Expected string
Actual string
}
EditError identifies a failed explicit authoring edit. Failed transactions return the original graph and publish no partial changes.
type EmailField ¶ added in v0.2.0
type EmailField struct {
// contains filtered or unexported fields
}
EmailField configures a field that stores and validates an email address.
func AsEmail ¶ added in v0.2.0
func AsEmail(node Node) (EmailField, error)
AsEmail provides a checked concrete view of an immutable node.
func Email ¶
func Email(name string) EmailField
Email creates a field that stores and validates an email address.
func (EmailField) Access ¶ added in v0.2.0
func (f EmailField) Access(value Access) EmailField
Access replaces the complete field access policy.
func (EmailField) AccessPolicy ¶ added in v0.2.0
func (v EmailField) AccessPolicy() Access
func (EmailField) Admin ¶ added in v0.2.0
func (f EmailField) Admin(value Admin) EmailField
Admin replaces the complete admin presentation policy.
func (EmailField) AdminPolicy ¶ added in v0.2.0
func (v EmailField) AdminPolicy() Admin
func (EmailField) AfterRead ¶ added in v0.2.2
func (f EmailField) AfterRead(callbacks ...OutputTransform[string]) EmailField
AfterRead appends response transforms in order; no callbacks does nothing.
func (EmailField) AfterReadHooks ¶ added in v0.2.2
func (f EmailField) AfterReadHooks() []OutputTransform[string]
AfterReadHooks returns a detached response-transform slice.
func (EmailField) AppendHooks ¶ added in v0.2.0
func (f EmailField) AppendHooks(value Hooks[string]) EmailField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (EmailField) BehaviorSummary ¶ added in v0.2.0
func (v EmailField) BehaviorSummary() PolicySummary
func (EmailField) Default ¶ added in v0.2.0
func (f EmailField) Default(value string) EmailField
func (EmailField) DefaultCallback ¶ added in v0.2.0
func (f EmailField) DefaultCallback() DefaultFunc[string]
DefaultCallback returns the configured dynamic default, or nil for a literal default or no default. Callback closure captures remain application-owned.
func (EmailField) DefaultFrom ¶ added in v0.2.0
func (f EmailField) DefaultFrom(callback DefaultFunc[string]) EmailField
DefaultFrom supplies a server-side initial value for an eligible omitted field. It replaces a literal or dynamic default; the original field is unchanged. See DefaultFunc and operation.Context for initialization semantics.
func (EmailField) EditAdmin ¶ added in v0.2.0
func (f EmailField) EditAdmin(edit func(*Admin)) EmailField
EditAdmin updates selected admin settings while preserving the rest.
func (EmailField) HookPolicy ¶ added in v0.2.0
func (f EmailField) HookPolicy() Hooks[string]
func (EmailField) Hooks ¶ added in v0.2.0
func (f EmailField) Hooks(value Hooks[string]) EmailField
Hooks replaces the complete field lifecycle hook group.
func (EmailField) Index ¶ added in v0.2.0
func (f EmailField) Index(values ...bool) EmailField
func (EmailField) IsLocalized ¶ added in v0.2.0
func (v EmailField) IsLocalized() bool
func (EmailField) IsRequired ¶ added in v0.2.0
func (v EmailField) IsRequired() bool
func (EmailField) Label ¶ added in v0.2.0
func (f EmailField) Label(value string) EmailField
func (EmailField) LabelTranslations ¶ added in v0.2.0
func (f EmailField) LabelTranslations(values map[string]string) EmailField
func (EmailField) LiveValidate ¶ added in v0.2.0
func (f EmailField) LiveValidate(value LiveValidator[string]) EmailField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (EmailField) LiveValidators ¶ added in v0.2.0
func (f EmailField) LiveValidators() []LiveValidator[string]
LiveValidators returns a detached list of this field's advisory server checks.
func (EmailField) Localized ¶ added in v0.2.0
func (f EmailField) Localized(values ...bool) EmailField
func (EmailField) PrependHooks ¶ added in v0.2.0
func (f EmailField) PrependHooks(value Hooks[string]) EmailField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (EmailField) Private ¶ added in v0.2.0
func (f EmailField) Private(namespace string, value store.Value) EmailField
func (EmailField) Provenance ¶ added in v0.2.0
func (v EmailField) Provenance() []string
func (EmailField) Rename ¶ added in v0.2.0
func (f EmailField) Rename(name string) EmailField
func (EmailField) ReplaceAfterRead ¶ added in v0.2.2
func (f EmailField) ReplaceAfterRead(callbacks ...OutputTransform[string]) EmailField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (EmailField) ReplaceLiveValidators ¶ added in v0.2.0
func (f EmailField) ReplaceLiveValidators(values ...LiveValidator[string]) EmailField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (EmailField) ReplaceValidators ¶ added in v0.2.0
func (f EmailField) ReplaceValidators(values ...Validator[string]) EmailField
ReplaceValidators replaces all authoritative save validators.
func (EmailField) Required ¶ added in v0.2.0
func (f EmailField) Required(values ...bool) EmailField
func (EmailField) RestrictAccess ¶ added in v0.2.0
func (f EmailField) RestrictAccess(value Access) EmailField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (EmailField) Unique ¶ added in v0.2.0
func (f EmailField) Unique(values ...bool) EmailField
func (EmailField) Validate ¶ added in v0.2.0
func (f EmailField) Validate(value Validator[string]) EmailField
Validate appends one authoritative save validator.
func (EmailField) Validators ¶ added in v0.2.0
func (f EmailField) Validators() []Validator[string]
type EmbeddedTree ¶ added in v0.2.0
type EmbeddedTree struct {
Key string
Root []string
Children string
Tag string
Cases []EmbeddedTreeCase
}
EmbeddedTree describes a finite tree inside a plugin value. Root is a literal property path to a node (or a list of nodes). Children is a structural child list property. Payload objects are handed back to ordinary field processing; they are never searched for more nodes by this descriptor.
type EmbeddedTreeCase ¶ added in v0.2.0
type EmbeddedTreeCase struct {
TagValue string
Payload string
Discriminator string
Identity string
Types []Block
BlockReferences []string
// contains filtered or unexported fields
}
EmbeddedTreeCase declares schema-owned payloads for one structural node tag. Discriminator and Identity name properties inside Payload. Types reuse the ordinary field vocabulary; plugin settings must not serialize these definitions.
type Fields ¶
type Fields []Node
Fields is the ordered list assigned to ridu.Collection.Fields, ridu.Global.Fields, or a nested field constructor. Populate it with Nodes from this package's constructors. Ridu snapshots the caller-owned slice during construction, editing, and config resolution.
For example:
fields := field.Fields{
field.Text("title").Required(),
field.Select("status", "draft", "published"),
field.Group("seo", field.Fields{
field.Textarea("description"),
}),
}
func (Fields) Edit ¶ added in v0.2.0
func (fields Fields) Edit(edit func(*ChildrenDraft) error) (Fields, error)
Edit applies checked changes to a detached draft and returns a new field list. Use it to refine a reusable graph without rebuilding it. The result is published only when the callback and graph validation succeed; on error, Edit returns an unchanged snapshot of the original fields.
func (Fields) Snapshot ¶ added in v0.2.0
Snapshot detaches the mutable slice and freezes pointer facade inputs.
func (Fields) Walk ¶ added in v0.2.0
Walk visits nodes in declaration order and crosses only explicit branches.
func (Fields) WithProvenance ¶ added in v0.2.0
WithProvenance marks every published node as passing through a transform.
type GroupField ¶ added in v0.2.0
type GroupField struct {
// contains filtered or unexported fields
}
GroupField configures a nested object containing the supplied fields.
func AsGroup ¶ added in v0.2.0
func AsGroup(node Node) (GroupField, error)
AsGroup provides a checked concrete view of an immutable node.
func Group ¶
func Group(name string, children Fields) GroupField
Group creates a nested object containing the supplied fields.
func NamedTab ¶
func NamedTab(name, label string, children Fields) GroupField
NamedTab groups fields in an admin tab and stores them in a named object.
func (GroupField) Access ¶ added in v0.2.0
func (f GroupField) Access(value Access) GroupField
Access replaces the complete field access policy.
func (GroupField) AccessPolicy ¶ added in v0.2.0
func (v GroupField) AccessPolicy() Access
func (GroupField) Admin ¶ added in v0.2.0
func (f GroupField) Admin(value Admin) GroupField
Admin replaces the complete admin presentation policy.
func (GroupField) AdminPolicy ¶ added in v0.2.0
func (v GroupField) AdminPolicy() Admin
func (GroupField) AfterRead ¶ added in v0.2.2
func (f GroupField) AfterRead(callbacks ...OutputTransform[store.Value]) GroupField
AfterRead appends response transforms in order; no callbacks does nothing.
func (GroupField) AfterReadHooks ¶ added in v0.2.2
func (f GroupField) AfterReadHooks() []OutputTransform[store.Value]
AfterReadHooks returns a detached response-transform slice.
func (GroupField) AppendHooks ¶ added in v0.2.0
func (f GroupField) AppendHooks(value Hooks[store.Value]) GroupField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (GroupField) BehaviorSummary ¶ added in v0.2.0
func (v GroupField) BehaviorSummary() PolicySummary
func (GroupField) EditAdmin ¶ added in v0.2.0
func (f GroupField) EditAdmin(edit func(*Admin)) GroupField
EditAdmin updates selected admin settings while preserving the rest.
func (GroupField) EditChildren ¶ added in v0.2.0
func (f GroupField) EditChildren(edit func(*ChildrenDraft) error) (GroupField, error)
func (GroupField) HookPolicy ¶ added in v0.2.0
func (f GroupField) HookPolicy() Hooks[store.Value]
func (GroupField) Hooks ¶ added in v0.2.0
func (f GroupField) Hooks(value Hooks[store.Value]) GroupField
Hooks replaces the complete field lifecycle hook group.
func (GroupField) IsLocalized ¶ added in v0.2.0
func (v GroupField) IsLocalized() bool
func (GroupField) IsRequired ¶ added in v0.2.0
func (v GroupField) IsRequired() bool
func (GroupField) Label ¶ added in v0.2.0
func (f GroupField) Label(value string) GroupField
func (GroupField) LabelTranslations ¶ added in v0.2.0
func (f GroupField) LabelTranslations(values map[string]string) GroupField
func (GroupField) LiveValidate ¶ added in v0.2.0
func (f GroupField) LiveValidate(value LiveValidator[store.Value]) GroupField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (GroupField) LiveValidators ¶ added in v0.2.0
func (f GroupField) LiveValidators() []LiveValidator[store.Value]
LiveValidators returns a detached list of this field's advisory server checks.
func (GroupField) Localized ¶ added in v0.2.0
func (f GroupField) Localized(values ...bool) GroupField
func (GroupField) PrependHooks ¶ added in v0.2.0
func (f GroupField) PrependHooks(value Hooks[store.Value]) GroupField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (GroupField) Private ¶ added in v0.2.0
func (f GroupField) Private(namespace string, value store.Value) GroupField
func (GroupField) Provenance ¶ added in v0.2.0
func (v GroupField) Provenance() []string
func (GroupField) Rename ¶ added in v0.2.0
func (f GroupField) Rename(name string) GroupField
func (GroupField) ReplaceAfterRead ¶ added in v0.2.2
func (f GroupField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) GroupField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (GroupField) ReplaceLiveValidators ¶ added in v0.2.0
func (f GroupField) ReplaceLiveValidators(values ...LiveValidator[store.Value]) GroupField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (GroupField) ReplaceValidators ¶ added in v0.2.0
func (f GroupField) ReplaceValidators(values ...Validator[store.Value]) GroupField
ReplaceValidators replaces all authoritative save validators.
func (GroupField) Required ¶ added in v0.2.0
func (f GroupField) Required(values ...bool) GroupField
func (GroupField) RestrictAccess ¶ added in v0.2.0
func (f GroupField) RestrictAccess(value Access) GroupField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (GroupField) Validate ¶ added in v0.2.0
func (f GroupField) Validate(value Validator[store.Value]) GroupField
Validate appends one authoritative save validator.
func (GroupField) Validators ¶ added in v0.2.0
func (f GroupField) Validators() []Validator[store.Value]
type Hooks ¶ added in v0.2.0
type Hooks[T any] struct { // BeforeDuplicate receives raw copied input before validation. It runs only // when duplicating a collection document, after the resource hook. BeforeDuplicate []RawTransform // BeforeValidate receives raw input before built-in validation. It can supply // or normalize a value before conversion to T. This shared phase also runs on // reads and deletes; check the context's Operation for write-only logic. BeforeValidate []RawTransform // BeforeChange transforms T after initial built-in checks on create, // duplicate, update, publish, and unpublish. Custom validators run later. BeforeChange []Transform[T] // BeforeOperation transforms T before the store operation, after BeforeChange // on writes. This shared phase also runs on reads and deletes. BeforeOperation []Transform[T] // BeforeDelete observes the saved value before trashing or permanent deletion. BeforeDelete []Observer[T] // AfterChange observes a saved create, duplicate, update, publish, or unpublish // before commit. It cannot replace the field; an error rolls back the save. AfterChange []Observer[T] // AfterDelete observes a value after trashing or permanent deletion but before // commit. An error can still roll back the deletion. AfterDelete []Observer[T] // AfterOperation observes the result before response processing and commit. // It also runs on reads and deletes; check Operation for write-only work. AfterOperation []Observer[T] // AfterCommit observes the value outside the committed transaction, before // resource AfterCommit hooks. It also runs for reads. Errors cannot roll back // saved data, and later effects still run. AfterCommit []Observer[T] }
Hooks registers transforms and event callbacks for one field. Each list runs in declaration order for each field occurrence, including nested array rows. Collection or global hooks run first in the same phase, except AfterCommit, where field callbacks run first. Use AfterRead for response transformations.
type Issue ¶
type Issue struct {
// Code is a stable machine-readable problem identifier.
Code string
// Path locates the invalid property within the field definition.
Path string
// Message explains how to correct the problem.
Message string
}
Issue records a definition problem relative to the field. Config resolution prefixes Path with the field's exact location in the application config.
type JSONField ¶ added in v0.2.0
type JSONField struct {
// contains filtered or unexported fields
}
JSONField configures a field for JSON data.
func (JSONField) AccessPolicy ¶ added in v0.2.0
func (v JSONField) AccessPolicy() Access
func (JSONField) AdminPolicy ¶ added in v0.2.0
func (v JSONField) AdminPolicy() Admin
func (JSONField) AfterRead ¶ added in v0.2.2
func (f JSONField) AfterRead(callbacks ...OutputTransform[store.Value]) JSONField
AfterRead appends response transforms in order; no callbacks does nothing.
func (JSONField) AfterReadHooks ¶ added in v0.2.2
func (f JSONField) AfterReadHooks() []OutputTransform[store.Value]
AfterReadHooks returns a detached response-transform slice.
func (JSONField) AppendHooks ¶ added in v0.2.0
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (JSONField) BehaviorSummary ¶ added in v0.2.0
func (v JSONField) BehaviorSummary() PolicySummary
func (JSONField) EditAdmin ¶ added in v0.2.0
EditAdmin updates selected admin settings while preserving the rest.
func (JSONField) IsLocalized ¶ added in v0.2.0
func (v JSONField) IsLocalized() bool
func (JSONField) IsRequired ¶ added in v0.2.0
func (v JSONField) IsRequired() bool
func (JSONField) LabelTranslations ¶ added in v0.2.0
func (JSONField) LiveValidate ¶ added in v0.2.0
func (f JSONField) LiveValidate(value LiveValidator[store.Value]) JSONField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (JSONField) LiveValidators ¶ added in v0.2.0
func (f JSONField) LiveValidators() []LiveValidator[store.Value]
LiveValidators returns a detached list of this field's advisory server checks.
func (JSONField) PrependHooks ¶ added in v0.2.0
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (JSONField) Provenance ¶ added in v0.2.0
func (v JSONField) Provenance() []string
func (JSONField) ReplaceAfterRead ¶ added in v0.2.2
func (f JSONField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) JSONField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (JSONField) ReplaceLiveValidators ¶ added in v0.2.0
func (f JSONField) ReplaceLiveValidators(values ...LiveValidator[store.Value]) JSONField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (JSONField) ReplaceValidators ¶ added in v0.2.0
ReplaceValidators replaces all authoritative save validators.
func (JSONField) RestrictAccess ¶ added in v0.2.0
RestrictAccess combines supplied rules with existing access rules; both must allow.
type JoinField ¶ added in v0.2.0
type JoinField struct {
// contains filtered or unexported fields
}
JoinField configures a list of documents that refer back to this document.
func (JoinField) Access ¶ added in v0.2.0
Access replaces the read authorization group on an inverse output join.
func (JoinField) AccessPolicy ¶ added in v0.2.0
func (v JoinField) AccessPolicy() Access
func (JoinField) AdminPolicy ¶ added in v0.2.0
func (v JoinField) AdminPolicy() Admin
func (JoinField) AfterRead ¶ added in v0.2.2
func (f JoinField) AfterRead(callbacks ...OutputTransform[store.Value]) JoinField
AfterRead appends response transforms in order; no callbacks does nothing.
func (JoinField) AfterReadHooks ¶ added in v0.2.2
func (f JoinField) AfterReadHooks() []OutputTransform[store.Value]
AfterReadHooks returns a detached response-transform slice. AfterReadHooks returns a detached response-transform slice.
func (JoinField) AllowCreate ¶ added in v0.2.0
func (JoinField) BehaviorSummary ¶ added in v0.2.0
func (v JoinField) BehaviorSummary() PolicySummary
func (JoinField) DefaultColumns ¶ added in v0.2.0
func (JoinField) DefaultSort ¶ added in v0.2.0
func (JoinField) EditAdmin ¶ added in v0.2.0
EditAdmin updates selected admin settings while preserving the rest.
func (JoinField) IsLocalized ¶ added in v0.2.0
func (v JoinField) IsLocalized() bool
func (JoinField) IsRequired ¶ added in v0.2.0
func (v JoinField) IsRequired() bool
func (JoinField) LabelTranslations ¶ added in v0.2.0
func (JoinField) Provenance ¶ added in v0.2.0
func (v JoinField) Provenance() []string
func (JoinField) ReplaceAfterRead ¶ added in v0.2.2
func (f JoinField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) JoinField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (JoinField) RestrictAccess ¶ added in v0.2.0
RestrictAccess conjoins the supplied join output access policy.
type Kind ¶
type Kind string
Kind identifies a built-in authoring field definition.
const ( KindText Kind = "text" KindTextList Kind = "text-list" KindNumberList Kind = "number-list" KindCode Kind = "code" KindSelect Kind = "select" KindRadio Kind = "radio" KindPoint Kind = "point" KindRelationship Kind = "relationship" KindUpload Kind = "upload" KindGroup Kind = "group" KindTextarea Kind = "textarea" KindEmail Kind = "email" KindDate Kind = "date" KindNumber Kind = "number" KindCheckbox Kind = "checkbox" KindJSON Kind = "json" KindArray Kind = "array" KindBlocks Kind = "blocks" KindTabs Kind = "tabs" KindRow Kind = "row" KindUI Kind = "ui" KindCollapsible Kind = "collapsible" KindJoin Kind = "join" KindVirtual Kind = "virtual" KindPlugin Kind = "plugin" )
type LayoutField ¶ added in v0.2.0
type LayoutField struct {
// contains filtered or unexported fields
}
LayoutField arranges fields in the admin without adding a stored value.
func Collapsible ¶
func Collapsible(name string, children Fields) LayoutField
Collapsible displays fields beneath a heading the author can expand or collapse.
func Row ¶
func Row(children Fields) LayoutField
Row displays fields side by side without nesting their stored values.
func Tabs ¶
func Tabs(children Fields) LayoutField
Tabs displays named and unnamed tabs together in the admin.
func UI ¶
func UI(name string) LayoutField
UI adds a custom component to the form without storing a value.
func UnnamedTab ¶
func UnnamedTab(label string, children Fields) LayoutField
UnnamedTab groups fields in an admin tab without nesting their stored values.
func (LayoutField) AccessPolicy ¶ added in v0.2.0
func (v LayoutField) AccessPolicy() Access
func (LayoutField) Admin ¶ added in v0.2.0
func (f LayoutField) Admin(value Admin) LayoutField
Admin replaces the complete admin presentation policy.
func (LayoutField) AdminPolicy ¶ added in v0.2.0
func (v LayoutField) AdminPolicy() Admin
func (LayoutField) BehaviorSummary ¶ added in v0.2.0
func (v LayoutField) BehaviorSummary() PolicySummary
func (LayoutField) EditAdmin ¶ added in v0.2.0
func (f LayoutField) EditAdmin(edit func(*Admin)) LayoutField
EditAdmin updates selected admin settings while preserving the rest.
func (LayoutField) IsLocalized ¶ added in v0.2.0
func (v LayoutField) IsLocalized() bool
func (LayoutField) IsRequired ¶ added in v0.2.0
func (v LayoutField) IsRequired() bool
func (LayoutField) Label ¶ added in v0.2.0
func (f LayoutField) Label(value string) LayoutField
func (LayoutField) LabelTranslations ¶ added in v0.2.0
func (f LayoutField) LabelTranslations(values map[string]string) LayoutField
func (LayoutField) Private ¶ added in v0.2.0
func (f LayoutField) Private(namespace string, value store.Value) LayoutField
func (LayoutField) Provenance ¶ added in v0.2.0
func (v LayoutField) Provenance() []string
func (LayoutField) Rename ¶ added in v0.2.0
func (f LayoutField) Rename(name string) LayoutField
type LiveValidator ¶ added in v0.2.0
type LiveValidator[T any] func(operation.LiveValidationContext, operation.Value[T]) ([]operation.Issue, error)
LiveValidator checks a typed unsaved value on explicit admin feedback requests. Root and Siblings contain retained input, without save hooks or defaults. Reuse business rules with Validator through thin, separately typed adapters. A live check never replaces authoritative save validation.
Return operation.Issue values for user-correctable problems, or an error when the check could not run. Checks must be repeatable, read-only and respect the context's cancellation. The framework cannot prevent side effects in arbitrary application Go code. Invalid typed input is skipped before this callback runs. Aggregate store.Value callbacks receive raw object/list carriers: their children may still be incomplete or malformed. No deep save validation has run.
type MultiSelectField ¶ added in v0.2.0
type MultiSelectField struct {
// contains filtered or unexported fields
}
MultiSelectField configures a field for choosing several values from a fixed list.
func AsMultiSelect ¶ added in v0.2.0
func AsMultiSelect(node Node) (MultiSelectField, error)
AsMultiSelect provides a checked concrete view of an immutable node.
func MultiSelect ¶ added in v0.2.0
func MultiSelect(name string, values ...string) MultiSelectField
MultiSelect creates a field for choosing several values from a fixed list. Values are stored exactly as given; display labels are generated during resolution. Use Options to configure custom labels or translations.
func (MultiSelectField) Access ¶ added in v0.2.0
func (f MultiSelectField) Access(value Access) MultiSelectField
Access replaces the complete field access policy.
func (MultiSelectField) AccessPolicy ¶ added in v0.2.0
func (v MultiSelectField) AccessPolicy() Access
func (MultiSelectField) Admin ¶ added in v0.2.0
func (f MultiSelectField) Admin(value Admin) MultiSelectField
Admin replaces the complete admin presentation policy.
func (MultiSelectField) AdminPolicy ¶ added in v0.2.0
func (v MultiSelectField) AdminPolicy() Admin
func (MultiSelectField) AfterRead ¶ added in v0.2.2
func (f MultiSelectField) AfterRead(callbacks ...OutputTransform[[]string]) MultiSelectField
AfterRead appends response transforms in order; no callbacks does nothing.
func (MultiSelectField) AfterReadHooks ¶ added in v0.2.2
func (f MultiSelectField) AfterReadHooks() []OutputTransform[[]string]
AfterReadHooks returns a detached response-transform slice.
func (MultiSelectField) AppendHooks ¶ added in v0.2.0
func (f MultiSelectField) AppendHooks(value Hooks[[]string]) MultiSelectField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (MultiSelectField) BehaviorSummary ¶ added in v0.2.0
func (v MultiSelectField) BehaviorSummary() PolicySummary
func (MultiSelectField) Default ¶ added in v0.2.0
func (f MultiSelectField) Default(values ...string) MultiSelectField
func (MultiSelectField) DefaultCallback ¶ added in v0.2.0
func (f MultiSelectField) DefaultCallback() DefaultFunc[[]string]
DefaultCallback returns the configured dynamic default, or nil for a literal default or no default. Callback closure captures remain application-owned.
func (MultiSelectField) DefaultFrom ¶ added in v0.2.0
func (f MultiSelectField) DefaultFrom(callback DefaultFunc[[]string]) MultiSelectField
DefaultFrom supplies a server-side initial value for an eligible omitted field. It replaces a literal or dynamic default; the original field is unchanged. See DefaultFunc and operation.Context for initialization semantics.
func (MultiSelectField) EditAdmin ¶ added in v0.2.0
func (f MultiSelectField) EditAdmin(edit func(*Admin)) MultiSelectField
EditAdmin updates selected admin settings while preserving the rest.
func (MultiSelectField) HookPolicy ¶ added in v0.2.0
func (f MultiSelectField) HookPolicy() Hooks[[]string]
func (MultiSelectField) Hooks ¶ added in v0.2.0
func (f MultiSelectField) Hooks(value Hooks[[]string]) MultiSelectField
Hooks replaces the complete field lifecycle hook group.
func (MultiSelectField) IsLocalized ¶ added in v0.2.0
func (v MultiSelectField) IsLocalized() bool
func (MultiSelectField) IsRequired ¶ added in v0.2.0
func (v MultiSelectField) IsRequired() bool
func (MultiSelectField) Label ¶ added in v0.2.0
func (f MultiSelectField) Label(value string) MultiSelectField
func (MultiSelectField) LabelTranslations ¶ added in v0.2.0
func (f MultiSelectField) LabelTranslations(values map[string]string) MultiSelectField
func (MultiSelectField) LiveValidate ¶ added in v0.2.0
func (f MultiSelectField) LiveValidate(value LiveValidator[[]string]) MultiSelectField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (MultiSelectField) LiveValidators ¶ added in v0.2.0
func (f MultiSelectField) LiveValidators() []LiveValidator[[]string]
LiveValidators returns a detached list of this field's advisory server checks.
func (MultiSelectField) Localized ¶ added in v0.2.0
func (f MultiSelectField) Localized(values ...bool) MultiSelectField
func (MultiSelectField) Options ¶ added in v0.2.0
func (f MultiSelectField) Options(values ...Option) MultiSelectField
Options replaces the option list with options that can include labels and translations.
func (MultiSelectField) PrependHooks ¶ added in v0.2.0
func (f MultiSelectField) PrependHooks(value Hooks[[]string]) MultiSelectField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (MultiSelectField) Private ¶ added in v0.2.0
func (f MultiSelectField) Private(namespace string, value store.Value) MultiSelectField
func (MultiSelectField) Provenance ¶ added in v0.2.0
func (v MultiSelectField) Provenance() []string
func (MultiSelectField) Rename ¶ added in v0.2.0
func (f MultiSelectField) Rename(name string) MultiSelectField
func (MultiSelectField) ReplaceAfterRead ¶ added in v0.2.2
func (f MultiSelectField) ReplaceAfterRead(callbacks ...OutputTransform[[]string]) MultiSelectField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (MultiSelectField) ReplaceLiveValidators ¶ added in v0.2.0
func (f MultiSelectField) ReplaceLiveValidators(values ...LiveValidator[[]string]) MultiSelectField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (MultiSelectField) ReplaceValidators ¶ added in v0.2.0
func (f MultiSelectField) ReplaceValidators(values ...Validator[[]string]) MultiSelectField
ReplaceValidators replaces all authoritative save validators.
func (MultiSelectField) Required ¶ added in v0.2.0
func (f MultiSelectField) Required(values ...bool) MultiSelectField
func (MultiSelectField) RestrictAccess ¶ added in v0.2.0
func (f MultiSelectField) RestrictAccess(value Access) MultiSelectField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (MultiSelectField) Validate ¶ added in v0.2.0
func (f MultiSelectField) Validate(value Validator[[]string]) MultiSelectField
Validate appends one authoritative save validator.
func (MultiSelectField) Validators ¶ added in v0.2.0
func (f MultiSelectField) Validators() []Validator[[]string]
type Node ¶ added in v0.2.0
Node is any field definition that can be placed in Fields. Authors normally create nodes with constructors such as Text, Select, Group, or Array and use their concrete fluent methods before adding them to a field list. The interface is sealed so Ridu can snapshot every supported field safely.
type NumberField ¶ added in v0.2.0
type NumberField struct {
// contains filtered or unexported fields
}
NumberField configures a number field.
func AsNumber ¶ added in v0.2.0
func AsNumber(node Node) (NumberField, error)
AsNumber provides a checked concrete view of an immutable node.
func (NumberField) Access ¶ added in v0.2.0
func (f NumberField) Access(value Access) NumberField
Access replaces the complete field access policy.
func (NumberField) AccessPolicy ¶ added in v0.2.0
func (v NumberField) AccessPolicy() Access
func (NumberField) Admin ¶ added in v0.2.0
func (f NumberField) Admin(value Admin) NumberField
Admin replaces the complete admin presentation policy.
func (NumberField) AdminPolicy ¶ added in v0.2.0
func (v NumberField) AdminPolicy() Admin
func (NumberField) AfterRead ¶ added in v0.2.2
func (f NumberField) AfterRead(callbacks ...OutputTransform[float64]) NumberField
AfterRead appends response transforms in order; no callbacks does nothing.
func (NumberField) AfterReadHooks ¶ added in v0.2.2
func (f NumberField) AfterReadHooks() []OutputTransform[float64]
AfterReadHooks returns a detached response-transform slice.
func (NumberField) AppendHooks ¶ added in v0.2.0
func (f NumberField) AppendHooks(value Hooks[float64]) NumberField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (NumberField) BehaviorSummary ¶ added in v0.2.0
func (v NumberField) BehaviorSummary() PolicySummary
func (NumberField) Default ¶ added in v0.2.0
func (f NumberField) Default(value float64) NumberField
func (NumberField) DefaultCallback ¶ added in v0.2.0
func (f NumberField) DefaultCallback() DefaultFunc[float64]
DefaultCallback returns the configured dynamic default, or nil for a literal default or no default. Callback closure captures remain application-owned.
func (NumberField) DefaultFrom ¶ added in v0.2.0
func (f NumberField) DefaultFrom(callback DefaultFunc[float64]) NumberField
DefaultFrom supplies a server-side initial value for an eligible omitted field. It replaces a literal or dynamic default; the original field is unchanged. See DefaultFunc and operation.Context for initialization semantics.
func (NumberField) EditAdmin ¶ added in v0.2.0
func (f NumberField) EditAdmin(edit func(*Admin)) NumberField
EditAdmin updates selected admin settings while preserving the rest.
func (NumberField) HookPolicy ¶ added in v0.2.0
func (f NumberField) HookPolicy() Hooks[float64]
func (NumberField) Hooks ¶ added in v0.2.0
func (f NumberField) Hooks(value Hooks[float64]) NumberField
Hooks replaces the complete field lifecycle hook group.
func (NumberField) Index ¶ added in v0.2.0
func (f NumberField) Index(values ...bool) NumberField
func (NumberField) IsLocalized ¶ added in v0.2.0
func (v NumberField) IsLocalized() bool
func (NumberField) IsRequired ¶ added in v0.2.0
func (v NumberField) IsRequired() bool
func (NumberField) Label ¶ added in v0.2.0
func (f NumberField) Label(value string) NumberField
func (NumberField) LabelTranslations ¶ added in v0.2.0
func (f NumberField) LabelTranslations(values map[string]string) NumberField
func (NumberField) LiveValidate ¶ added in v0.2.0
func (f NumberField) LiveValidate(value LiveValidator[float64]) NumberField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (NumberField) LiveValidators ¶ added in v0.2.0
func (f NumberField) LiveValidators() []LiveValidator[float64]
LiveValidators returns a detached list of this field's advisory server checks.
func (NumberField) Localized ¶ added in v0.2.0
func (f NumberField) Localized(values ...bool) NumberField
func (NumberField) Max ¶ added in v0.2.0
func (f NumberField) Max(value float64) NumberField
func (NumberField) Min ¶ added in v0.2.0
func (f NumberField) Min(value float64) NumberField
func (NumberField) PrependHooks ¶ added in v0.2.0
func (f NumberField) PrependHooks(value Hooks[float64]) NumberField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (NumberField) Private ¶ added in v0.2.0
func (f NumberField) Private(namespace string, value store.Value) NumberField
func (NumberField) Provenance ¶ added in v0.2.0
func (v NumberField) Provenance() []string
func (NumberField) Rename ¶ added in v0.2.0
func (f NumberField) Rename(name string) NumberField
func (NumberField) ReplaceAfterRead ¶ added in v0.2.2
func (f NumberField) ReplaceAfterRead(callbacks ...OutputTransform[float64]) NumberField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (NumberField) ReplaceLiveValidators ¶ added in v0.2.0
func (f NumberField) ReplaceLiveValidators(values ...LiveValidator[float64]) NumberField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (NumberField) ReplaceValidators ¶ added in v0.2.0
func (f NumberField) ReplaceValidators(values ...Validator[float64]) NumberField
ReplaceValidators replaces all authoritative save validators.
func (NumberField) Required ¶ added in v0.2.0
func (f NumberField) Required(values ...bool) NumberField
func (NumberField) RestrictAccess ¶ added in v0.2.0
func (f NumberField) RestrictAccess(value Access) NumberField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (NumberField) Step ¶ added in v0.2.0
func (f NumberField) Step(value float64) NumberField
func (NumberField) Unique ¶ added in v0.2.0
func (f NumberField) Unique(values ...bool) NumberField
func (NumberField) Validate ¶ added in v0.2.0
func (f NumberField) Validate(value Validator[float64]) NumberField
Validate appends one authoritative save validator.
func (NumberField) Validators ¶ added in v0.2.0
func (f NumberField) Validators() []Validator[float64]
type NumberListField ¶ added in v0.2.0
type NumberListField struct {
// contains filtered or unexported fields
}
NumberListField configures one ordered list of finite numbers. It preserves duplicate values and has no per-item fields or persisted row identities.
func AsNumberList ¶ added in v0.2.0
func AsNumberList(node Node) (NumberListField, error)
AsNumberList provides a checked concrete view of an immutable primitive-list node.
func NumberList ¶ added in v0.2.0
func NumberList(name string) NumberListField
NumberList creates an ordered primitive list. Required demands a nonempty list; MinRows and MaxRows constrain its length independently of per-item constraints.
func (NumberListField) Access ¶ added in v0.2.0
func (f NumberListField) Access(value Access) NumberListField
Access replaces the complete field access policy.
func (NumberListField) AccessPolicy ¶ added in v0.2.0
func (v NumberListField) AccessPolicy() Access
func (NumberListField) Admin ¶ added in v0.2.0
func (f NumberListField) Admin(value Admin) NumberListField
Admin replaces the complete admin presentation policy.
func (NumberListField) AdminPolicy ¶ added in v0.2.0
func (v NumberListField) AdminPolicy() Admin
func (NumberListField) AfterRead ¶ added in v0.2.2
func (f NumberListField) AfterRead(callbacks ...OutputTransform[[]float64]) NumberListField
AfterRead appends response transforms in order; no callbacks does nothing.
func (NumberListField) AfterReadHooks ¶ added in v0.2.2
func (f NumberListField) AfterReadHooks() []OutputTransform[[]float64]
AfterReadHooks returns a detached response-transform slice.
func (NumberListField) AppendHooks ¶ added in v0.2.0
func (f NumberListField) AppendHooks(value Hooks[[]float64]) NumberListField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (NumberListField) BehaviorSummary ¶ added in v0.2.0
func (v NumberListField) BehaviorSummary() PolicySummary
func (NumberListField) Default ¶ added in v0.2.0
func (f NumberListField) Default(values ...float64) NumberListField
Default sets a copied literal initial list. With no values it explicitly defaults to an empty list. It replaces any DefaultFrom callback.
func (NumberListField) DefaultCallback ¶ added in v0.2.0
func (f NumberListField) DefaultCallback() DefaultFunc[[]float64]
DefaultCallback returns the configured server default without executing it.
func (NumberListField) DefaultFrom ¶ added in v0.2.0
func (f NumberListField) DefaultFrom(callback DefaultFunc[[]float64]) NumberListField
DefaultFrom sets a typed server default using the ordinary initialization lifecycle.
func (NumberListField) EditAdmin ¶ added in v0.2.0
func (f NumberListField) EditAdmin(edit func(*Admin)) NumberListField
EditAdmin updates selected admin settings while preserving the rest.
func (NumberListField) HookPolicy ¶ added in v0.2.0
func (f NumberListField) HookPolicy() Hooks[[]float64]
func (NumberListField) Hooks ¶ added in v0.2.0
func (f NumberListField) Hooks(value Hooks[[]float64]) NumberListField
Hooks replaces the complete field lifecycle hook group.
func (NumberListField) IsLocalized ¶ added in v0.2.0
func (v NumberListField) IsLocalized() bool
func (NumberListField) IsRequired ¶ added in v0.2.0
func (v NumberListField) IsRequired() bool
func (NumberListField) Label ¶ added in v0.2.0
func (f NumberListField) Label(value string) NumberListField
func (NumberListField) LabelTranslations ¶ added in v0.2.0
func (f NumberListField) LabelTranslations(values map[string]string) NumberListField
func (NumberListField) LiveValidate ¶ added in v0.2.0
func (f NumberListField) LiveValidate(value LiveValidator[[]float64]) NumberListField
LiveValidate appends an advisory check for the complete primitive list. Items have no separate occurrence identity; Validate remains authoritative on Save.
func (NumberListField) LiveValidators ¶ added in v0.2.0
func (f NumberListField) LiveValidators() []LiveValidator[[]float64]
LiveValidators returns a detached list of whole-list advisory checks.
func (NumberListField) Localized ¶ added in v0.2.0
func (f NumberListField) Localized(values ...bool) NumberListField
func (NumberListField) Max ¶ added in v0.2.0
func (f NumberListField) Max(value float64) NumberListField
Max sets the inclusive upper bound for every number.
func (NumberListField) MaxRows ¶ added in v0.2.0
func (f NumberListField) MaxRows(value int) NumberListField
MaxRows limits the number of items; zero means no configured maximum.
func (NumberListField) Min ¶ added in v0.2.0
func (f NumberListField) Min(value float64) NumberListField
Min sets the inclusive lower bound for every number.
func (NumberListField) MinRows ¶ added in v0.2.0
func (f NumberListField) MinRows(value int) NumberListField
MinRows requires at least value items, including when the list is empty or null.
func (NumberListField) PrependHooks ¶ added in v0.2.0
func (f NumberListField) PrependHooks(value Hooks[[]float64]) NumberListField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (NumberListField) Private ¶ added in v0.2.0
func (f NumberListField) Private(namespace string, value store.Value) NumberListField
func (NumberListField) Provenance ¶ added in v0.2.0
func (v NumberListField) Provenance() []string
func (NumberListField) Rename ¶ added in v0.2.0
func (f NumberListField) Rename(name string) NumberListField
func (NumberListField) ReplaceAfterRead ¶ added in v0.2.2
func (f NumberListField) ReplaceAfterRead(callbacks ...OutputTransform[[]float64]) NumberListField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (NumberListField) ReplaceLiveValidators ¶ added in v0.2.0
func (f NumberListField) ReplaceLiveValidators(values ...LiveValidator[[]float64]) NumberListField
ReplaceLiveValidators replaces only this field's advisory checks. An empty list disables live checks while preserving every unrelated policy.
func (NumberListField) ReplaceValidators ¶ added in v0.2.0
func (f NumberListField) ReplaceValidators(values ...Validator[[]float64]) NumberListField
ReplaceValidators replaces all authoritative save validators.
func (NumberListField) Required ¶ added in v0.2.0
func (f NumberListField) Required(values ...bool) NumberListField
func (NumberListField) RestrictAccess ¶ added in v0.2.0
func (f NumberListField) RestrictAccess(value Access) NumberListField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (NumberListField) Validate ¶ added in v0.2.0
func (f NumberListField) Validate(value Validator[[]float64]) NumberListField
Validate appends one authoritative save validator.
func (NumberListField) Validators ¶ added in v0.2.0
func (f NumberListField) Validators() []Validator[[]float64]
type Observer ¶ added in v0.2.0
Observer runs code at a field lifecycle event. It receives the context and the field's value, but cannot return a replacement or mutate the context snapshots. Return nil to continue or an error to stop. Before commit, errors roll back the operation; an AfterCommit error reports failure after data has already saved.
type Option ¶
type Option struct {
// Value is the exact string stored in documents and sent over APIs.
Value string
// Label is the author-facing name shown in selection controls.
// When omitted, resolution generates it from Value.
Label string
// LabelTranslations overrides Label for configured admin interface languages.
LabelTranslations map[string]string
}
Option is one allowed value and its author-facing label for a select field.
type OutputField ¶ added in v0.2.0
type OutputField struct {
// contains filtered or unexported fields
}
OutputField configures a computed response value that cannot be set by a write request.
func AsOutput ¶ added in v0.2.0
func AsOutput(node Node) (OutputField, error)
AsOutput provides a checked concrete view of an immutable node.
func Virtual ¶
Virtual adds a computed field at the document root, using resolver to return its value.
func (OutputField) Access ¶ added in v0.2.0
func (f OutputField) Access(value Access) OutputField
Access replaces the complete field access policy.
func (OutputField) AccessPolicy ¶ added in v0.2.0
func (v OutputField) AccessPolicy() Access
func (OutputField) Admin ¶ added in v0.2.0
func (f OutputField) Admin(value Admin) OutputField
Admin replaces the complete admin presentation policy.
func (OutputField) AdminPolicy ¶ added in v0.2.0
func (v OutputField) AdminPolicy() Admin
func (OutputField) AfterRead ¶ added in v0.2.2
func (f OutputField) AfterRead(callbacks ...OutputTransform[store.Value]) OutputField
AfterRead appends response transforms in order; no callbacks does nothing.
func (OutputField) AfterReadHooks ¶ added in v0.2.2
func (f OutputField) AfterReadHooks() []OutputTransform[store.Value]
AfterReadHooks returns a detached response-transform slice.
func (OutputField) BehaviorSummary ¶ added in v0.2.0
func (v OutputField) BehaviorSummary() PolicySummary
func (OutputField) EditAdmin ¶ added in v0.2.0
func (f OutputField) EditAdmin(edit func(*Admin)) OutputField
EditAdmin updates selected admin settings while preserving the rest.
func (OutputField) IsLocalized ¶ added in v0.2.0
func (v OutputField) IsLocalized() bool
func (OutputField) IsRequired ¶ added in v0.2.0
func (v OutputField) IsRequired() bool
func (OutputField) Label ¶ added in v0.2.0
func (f OutputField) Label(value string) OutputField
func (OutputField) LabelTranslations ¶ added in v0.2.0
func (f OutputField) LabelTranslations(values map[string]string) OutputField
func (OutputField) Private ¶ added in v0.2.0
func (f OutputField) Private(namespace string, value store.Value) OutputField
func (OutputField) Provenance ¶ added in v0.2.0
func (v OutputField) Provenance() []string
func (OutputField) Rename ¶ added in v0.2.0
func (f OutputField) Rename(name string) OutputField
func (OutputField) ReplaceAfterRead ¶ added in v0.2.2
func (f OutputField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) OutputField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (OutputField) RestrictAccess ¶ added in v0.2.0
func (f OutputField) RestrictAccess(value Access) OutputField
RestrictAccess combines supplied rules with existing access rules; both must allow.
type OutputTransform ¶ added in v0.2.0
type OutputTransform[T any] func(operation.Context, operation.Value[T]) (operation.Change[T], error)
OutputTransform changes one field in the response without changing storage. Its context supplies response values, which may include related documents and locale fallback. Return Keep or Replace, as for a write transform. Field read access still runs afterward; visible context data is not permission to expose it. AfterRead runs after resource response hooks on reads and mutation responses, before final field redaction. Registration determines the callback phase. An error stops the response and can roll back an uncommitted mutation.
type PluginField ¶ added in v0.2.0
type PluginField struct {
// contains filtered or unexported fields
}
PluginField configures a field provided by the named Go plugin.
func AsPlugin ¶ added in v0.2.0
func AsPlugin(node Node) (PluginField, error)
AsPlugin provides a checked concrete view of an immutable node.
func Plugin ¶
func Plugin(name, key string, config json.RawMessage) PluginField
Plugin creates a field provided by the named Go plugin.
func (PluginField) Access ¶ added in v0.2.0
func (f PluginField) Access(value Access) PluginField
Access replaces the complete field access policy.
func (PluginField) AccessPolicy ¶ added in v0.2.0
func (v PluginField) AccessPolicy() Access
func (PluginField) Admin ¶ added in v0.2.0
func (f PluginField) Admin(value Admin) PluginField
Admin replaces the complete admin presentation policy.
func (PluginField) AdminPolicy ¶ added in v0.2.0
func (v PluginField) AdminPolicy() Admin
func (PluginField) AfterRead ¶ added in v0.2.2
func (f PluginField) AfterRead(callbacks ...OutputTransform[store.Value]) PluginField
AfterRead appends response transforms in order; no callbacks does nothing.
func (PluginField) AfterReadHooks ¶ added in v0.2.2
func (f PluginField) AfterReadHooks() []OutputTransform[store.Value]
AfterReadHooks returns a detached response-transform slice.
func (PluginField) AppendHooks ¶ added in v0.2.0
func (f PluginField) AppendHooks(value Hooks[store.Value]) PluginField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (PluginField) BehaviorSummary ¶ added in v0.2.0
func (v PluginField) BehaviorSummary() PolicySummary
func (PluginField) CollectionReferenceKeys ¶ added in v0.2.0
func (f PluginField) CollectionReferenceKeys(keys ...string) PluginField
func (PluginField) EditAdmin ¶ added in v0.2.0
func (f PluginField) EditAdmin(edit func(*Admin)) PluginField
EditAdmin updates selected admin settings while preserving the rest.
func (PluginField) EmbeddedTrees ¶ added in v0.2.0
func (f PluginField) EmbeddedTrees(trees ...EmbeddedTree) PluginField
func (PluginField) HookPolicy ¶ added in v0.2.0
func (f PluginField) HookPolicy() Hooks[store.Value]
func (PluginField) Hooks ¶ added in v0.2.0
func (f PluginField) Hooks(value Hooks[store.Value]) PluginField
Hooks replaces the complete field lifecycle hook group.
func (PluginField) IsLocalized ¶ added in v0.2.0
func (v PluginField) IsLocalized() bool
func (PluginField) IsRequired ¶ added in v0.2.0
func (v PluginField) IsRequired() bool
func (PluginField) Label ¶ added in v0.2.0
func (f PluginField) Label(value string) PluginField
func (PluginField) LabelTranslations ¶ added in v0.2.0
func (f PluginField) LabelTranslations(values map[string]string) PluginField
func (PluginField) LiveValidate ¶ added in v0.2.0
func (f PluginField) LiveValidate(value LiveValidator[store.Value]) PluginField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (PluginField) LiveValidators ¶ added in v0.2.0
func (f PluginField) LiveValidators() []LiveValidator[store.Value]
LiveValidators returns a detached list of this field's advisory server checks.
func (PluginField) Localized ¶ added in v0.2.0
func (f PluginField) Localized(values ...bool) PluginField
func (PluginField) PrependHooks ¶ added in v0.2.0
func (f PluginField) PrependHooks(value Hooks[store.Value]) PluginField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (PluginField) Private ¶ added in v0.2.0
func (f PluginField) Private(namespace string, value store.Value) PluginField
func (PluginField) Provenance ¶ added in v0.2.0
func (v PluginField) Provenance() []string
func (PluginField) Rename ¶ added in v0.2.0
func (f PluginField) Rename(name string) PluginField
func (PluginField) ReplaceAfterRead ¶ added in v0.2.2
func (f PluginField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) PluginField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (PluginField) ReplaceLiveValidators ¶ added in v0.2.0
func (f PluginField) ReplaceLiveValidators(values ...LiveValidator[store.Value]) PluginField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (PluginField) ReplaceValidators ¶ added in v0.2.0
func (f PluginField) ReplaceValidators(values ...Validator[store.Value]) PluginField
ReplaceValidators replaces all authoritative save validators.
func (PluginField) Required ¶ added in v0.2.0
func (f PluginField) Required(values ...bool) PluginField
func (PluginField) RestrictAccess ¶ added in v0.2.0
func (f PluginField) RestrictAccess(value Access) PluginField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (PluginField) Validate ¶ added in v0.2.0
func (f PluginField) Validate(value Validator[store.Value]) PluginField
Validate appends one authoritative save validator.
func (PluginField) Validators ¶ added in v0.2.0
func (f PluginField) Validators() []Validator[store.Value]
type PointField ¶ added in v0.2.0
type PointField struct {
// contains filtered or unexported fields
}
PointField configures a field for a geographic point.
func AsPoint ¶ added in v0.2.0
func AsPoint(node Node) (PointField, error)
AsPoint provides a checked concrete view of an immutable node.
func (PointField) Access ¶ added in v0.2.0
func (f PointField) Access(value Access) PointField
Access replaces the complete field access policy.
func (PointField) AccessPolicy ¶ added in v0.2.0
func (v PointField) AccessPolicy() Access
func (PointField) Admin ¶ added in v0.2.0
func (f PointField) Admin(value Admin) PointField
Admin replaces the complete admin presentation policy.
func (PointField) AdminPolicy ¶ added in v0.2.0
func (v PointField) AdminPolicy() Admin
func (PointField) AfterRead ¶ added in v0.2.2
func (f PointField) AfterRead(callbacks ...OutputTransform[store.Value]) PointField
AfterRead appends response transforms in order; no callbacks does nothing.
func (PointField) AfterReadHooks ¶ added in v0.2.2
func (f PointField) AfterReadHooks() []OutputTransform[store.Value]
AfterReadHooks returns a detached response-transform slice.
func (PointField) AppendHooks ¶ added in v0.2.0
func (f PointField) AppendHooks(value Hooks[store.Value]) PointField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (PointField) BehaviorSummary ¶ added in v0.2.0
func (v PointField) BehaviorSummary() PolicySummary
func (PointField) EditAdmin ¶ added in v0.2.0
func (f PointField) EditAdmin(edit func(*Admin)) PointField
EditAdmin updates selected admin settings while preserving the rest.
func (PointField) HookPolicy ¶ added in v0.2.0
func (f PointField) HookPolicy() Hooks[store.Value]
func (PointField) Hooks ¶ added in v0.2.0
func (f PointField) Hooks(value Hooks[store.Value]) PointField
Hooks replaces the complete field lifecycle hook group.
func (PointField) IsLocalized ¶ added in v0.2.0
func (v PointField) IsLocalized() bool
func (PointField) IsRequired ¶ added in v0.2.0
func (v PointField) IsRequired() bool
func (PointField) Label ¶ added in v0.2.0
func (f PointField) Label(value string) PointField
func (PointField) LabelTranslations ¶ added in v0.2.0
func (f PointField) LabelTranslations(values map[string]string) PointField
func (PointField) LiveValidate ¶ added in v0.2.0
func (f PointField) LiveValidate(value LiveValidator[store.Value]) PointField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (PointField) LiveValidators ¶ added in v0.2.0
func (f PointField) LiveValidators() []LiveValidator[store.Value]
LiveValidators returns a detached list of this field's advisory server checks.
func (PointField) Localized ¶ added in v0.2.0
func (f PointField) Localized(values ...bool) PointField
func (PointField) PrependHooks ¶ added in v0.2.0
func (f PointField) PrependHooks(value Hooks[store.Value]) PointField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (PointField) Private ¶ added in v0.2.0
func (f PointField) Private(namespace string, value store.Value) PointField
func (PointField) Provenance ¶ added in v0.2.0
func (v PointField) Provenance() []string
func (PointField) Rename ¶ added in v0.2.0
func (f PointField) Rename(name string) PointField
func (PointField) ReplaceAfterRead ¶ added in v0.2.2
func (f PointField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) PointField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (PointField) ReplaceLiveValidators ¶ added in v0.2.0
func (f PointField) ReplaceLiveValidators(values ...LiveValidator[store.Value]) PointField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (PointField) ReplaceValidators ¶ added in v0.2.0
func (f PointField) ReplaceValidators(values ...Validator[store.Value]) PointField
ReplaceValidators replaces all authoritative save validators.
func (PointField) Required ¶ added in v0.2.0
func (f PointField) Required(values ...bool) PointField
func (PointField) RestrictAccess ¶ added in v0.2.0
func (f PointField) RestrictAccess(value Access) PointField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (PointField) Validate ¶ added in v0.2.0
func (f PointField) Validate(value Validator[store.Value]) PointField
Validate appends one authoritative save validator.
func (PointField) Validators ¶ added in v0.2.0
func (f PointField) Validators() []Validator[store.Value]
type PolicySummary ¶ added in v0.2.0
type PolicySummary struct {
LiveValidators int `json:"liveValidators,omitempty"`
Validators int `json:"validators,omitempty"`
Hooks map[string]int `json:"hooks,omitempty"`
CreateAccess bool `json:"createAccess,omitempty"`
ReadAccess bool `json:"readAccess,omitempty"`
UpdateAccess bool `json:"updateAccess,omitempty"`
Resolver bool `json:"resolver,omitempty"`
DynamicDefault bool `json:"dynamicDefault,omitempty"`
}
PolicySummary is descriptive configuration evidence, never callback identity or a dispatch plan. No function address or captured state is serialized.
type PolymorphicRelationshipField ¶ added in v0.2.0
type PolymorphicRelationshipField struct {
// contains filtered or unexported fields
}
PolymorphicRelationshipField configures a link to one document from any of the target collections.
func AsPolymorphicRelationship ¶ added in v0.2.0
func AsPolymorphicRelationship(node Node) (PolymorphicRelationshipField, error)
AsPolymorphicRelationship provides a checked concrete view of an immutable node.
func PolymorphicRelationship ¶ added in v0.2.0
func PolymorphicRelationship(name string, targets ...schema.CollectionSlug) PolymorphicRelationshipField
PolymorphicRelationship creates a link to one document from any of the target collections.
func (PolymorphicRelationshipField) Access ¶ added in v0.2.0
func (f PolymorphicRelationshipField) Access(value Access) PolymorphicRelationshipField
Access replaces the complete field access policy.
func (PolymorphicRelationshipField) AccessPolicy ¶ added in v0.2.0
func (v PolymorphicRelationshipField) AccessPolicy() Access
func (PolymorphicRelationshipField) Admin ¶ added in v0.2.0
func (f PolymorphicRelationshipField) Admin(value Admin) PolymorphicRelationshipField
Admin replaces the complete admin presentation policy.
func (PolymorphicRelationshipField) AdminPolicy ¶ added in v0.2.0
func (v PolymorphicRelationshipField) AdminPolicy() Admin
func (PolymorphicRelationshipField) AfterRead ¶ added in v0.2.2
func (f PolymorphicRelationshipField) AfterRead(callbacks ...OutputTransform[store.Value]) PolymorphicRelationshipField
AfterRead appends response transforms in order; no callbacks does nothing.
func (PolymorphicRelationshipField) AfterReadHooks ¶ added in v0.2.2
func (f PolymorphicRelationshipField) AfterReadHooks() []OutputTransform[store.Value]
AfterReadHooks returns a detached response-transform slice.
func (PolymorphicRelationshipField) AppendHooks ¶ added in v0.2.0
func (f PolymorphicRelationshipField) AppendHooks(value Hooks[store.Value]) PolymorphicRelationshipField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (PolymorphicRelationshipField) BehaviorSummary ¶ added in v0.2.0
func (v PolymorphicRelationshipField) BehaviorSummary() PolicySummary
func (PolymorphicRelationshipField) Children ¶ added in v0.2.0
func (v PolymorphicRelationshipField) Children() Fields
func (PolymorphicRelationshipField) EditAdmin ¶ added in v0.2.0
func (f PolymorphicRelationshipField) EditAdmin(edit func(*Admin)) PolymorphicRelationshipField
EditAdmin updates selected admin settings while preserving the rest.
func (PolymorphicRelationshipField) FilterOptionRules ¶ added in v0.2.0
func (f PolymorphicRelationshipField) FilterOptionRules(rules ...RelationshipFilterRule) PolymorphicRelationshipField
func (PolymorphicRelationshipField) HookPolicy ¶ added in v0.2.0
func (f PolymorphicRelationshipField) HookPolicy() Hooks[store.Value]
func (PolymorphicRelationshipField) Hooks ¶ added in v0.2.0
func (f PolymorphicRelationshipField) Hooks(value Hooks[store.Value]) PolymorphicRelationshipField
Hooks replaces the complete field lifecycle hook group.
func (PolymorphicRelationshipField) IsLocalized ¶ added in v0.2.0
func (v PolymorphicRelationshipField) IsLocalized() bool
func (PolymorphicRelationshipField) IsRequired ¶ added in v0.2.0
func (v PolymorphicRelationshipField) IsRequired() bool
func (PolymorphicRelationshipField) Kind ¶ added in v0.2.0
func (v PolymorphicRelationshipField) Kind() Kind
func (PolymorphicRelationshipField) Label ¶ added in v0.2.0
func (f PolymorphicRelationshipField) Label(value string) PolymorphicRelationshipField
func (PolymorphicRelationshipField) LabelText ¶ added in v0.2.0
func (v PolymorphicRelationshipField) LabelText() string
func (PolymorphicRelationshipField) LabelTranslations ¶ added in v0.2.0
func (f PolymorphicRelationshipField) LabelTranslations(values map[string]string) PolymorphicRelationshipField
func (PolymorphicRelationshipField) LiveValidate ¶ added in v0.2.0
func (f PolymorphicRelationshipField) LiveValidate(value LiveValidator[store.Value]) PolymorphicRelationshipField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (PolymorphicRelationshipField) LiveValidators ¶ added in v0.2.0
func (f PolymorphicRelationshipField) LiveValidators() []LiveValidator[store.Value]
LiveValidators returns a detached list of this field's advisory server checks.
func (PolymorphicRelationshipField) Localized ¶ added in v0.2.0
func (f PolymorphicRelationshipField) Localized(values ...bool) PolymorphicRelationshipField
func (PolymorphicRelationshipField) Name ¶ added in v0.2.0
func (v PolymorphicRelationshipField) Name() string
func (PolymorphicRelationshipField) OnDelete ¶ added in v0.2.0
func (f PolymorphicRelationshipField) OnDelete(value ReferenceDeleteAction) PolymorphicRelationshipField
func (PolymorphicRelationshipField) PrependHooks ¶ added in v0.2.0
func (f PolymorphicRelationshipField) PrependHooks(value Hooks[store.Value]) PolymorphicRelationshipField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (PolymorphicRelationshipField) Private ¶ added in v0.2.0
func (f PolymorphicRelationshipField) Private(namespace string, value store.Value) PolymorphicRelationshipField
func (PolymorphicRelationshipField) Provenance ¶ added in v0.2.0
func (v PolymorphicRelationshipField) Provenance() []string
func (PolymorphicRelationshipField) Rename ¶ added in v0.2.0
func (f PolymorphicRelationshipField) Rename(name string) PolymorphicRelationshipField
func (PolymorphicRelationshipField) ReplaceAfterRead ¶ added in v0.2.2
func (f PolymorphicRelationshipField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) PolymorphicRelationshipField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (PolymorphicRelationshipField) ReplaceLiveValidators ¶ added in v0.2.0
func (f PolymorphicRelationshipField) ReplaceLiveValidators(values ...LiveValidator[store.Value]) PolymorphicRelationshipField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (PolymorphicRelationshipField) ReplaceValidators ¶ added in v0.2.0
func (f PolymorphicRelationshipField) ReplaceValidators(values ...Validator[store.Value]) PolymorphicRelationshipField
ReplaceValidators replaces all authoritative save validators.
func (PolymorphicRelationshipField) Required ¶ added in v0.2.0
func (f PolymorphicRelationshipField) Required(values ...bool) PolymorphicRelationshipField
func (PolymorphicRelationshipField) RestrictAccess ¶ added in v0.2.0
func (f PolymorphicRelationshipField) RestrictAccess(value Access) PolymorphicRelationshipField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (PolymorphicRelationshipField) Validate ¶ added in v0.2.0
func (f PolymorphicRelationshipField) Validate(value Validator[store.Value]) PolymorphicRelationshipField
Validate appends one authoritative save validator.
func (PolymorphicRelationshipField) Validators ¶ added in v0.2.0
func (f PolymorphicRelationshipField) Validators() []Validator[store.Value]
type PolymorphicRelationshipsField ¶ added in v0.2.0
type PolymorphicRelationshipsField struct {
// contains filtered or unexported fields
}
PolymorphicRelationshipsField configures links to documents from any of the target collections.
func AsPolymorphicRelationships ¶ added in v0.2.0
func AsPolymorphicRelationships(node Node) (PolymorphicRelationshipsField, error)
AsPolymorphicRelationships provides a checked concrete view of an immutable node.
func PolymorphicRelationships ¶ added in v0.2.0
func PolymorphicRelationships(name string, targets ...schema.CollectionSlug) PolymorphicRelationshipsField
PolymorphicRelationships creates links to documents from any of the target collections.
func (PolymorphicRelationshipsField) Access ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) Access(value Access) PolymorphicRelationshipsField
Access replaces the complete field access policy.
func (PolymorphicRelationshipsField) AccessPolicy ¶ added in v0.2.0
func (v PolymorphicRelationshipsField) AccessPolicy() Access
func (PolymorphicRelationshipsField) Admin ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) Admin(value Admin) PolymorphicRelationshipsField
Admin replaces the complete admin presentation policy.
func (PolymorphicRelationshipsField) AdminPolicy ¶ added in v0.2.0
func (v PolymorphicRelationshipsField) AdminPolicy() Admin
func (PolymorphicRelationshipsField) AfterRead ¶ added in v0.2.2
func (f PolymorphicRelationshipsField) AfterRead(callbacks ...OutputTransform[store.Value]) PolymorphicRelationshipsField
AfterRead appends response transforms in order; no callbacks does nothing.
func (PolymorphicRelationshipsField) AfterReadHooks ¶ added in v0.2.2
func (f PolymorphicRelationshipsField) AfterReadHooks() []OutputTransform[store.Value]
AfterReadHooks returns a detached response-transform slice.
func (PolymorphicRelationshipsField) AppendHooks ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) AppendHooks(value Hooks[store.Value]) PolymorphicRelationshipsField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (PolymorphicRelationshipsField) BehaviorSummary ¶ added in v0.2.0
func (v PolymorphicRelationshipsField) BehaviorSummary() PolicySummary
func (PolymorphicRelationshipsField) Children ¶ added in v0.2.0
func (v PolymorphicRelationshipsField) Children() Fields
func (PolymorphicRelationshipsField) EditAdmin ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) EditAdmin(edit func(*Admin)) PolymorphicRelationshipsField
EditAdmin updates selected admin settings while preserving the rest.
func (PolymorphicRelationshipsField) FilterOptionRules ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) FilterOptionRules(rules ...RelationshipFilterRule) PolymorphicRelationshipsField
func (PolymorphicRelationshipsField) HookPolicy ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) HookPolicy() Hooks[store.Value]
func (PolymorphicRelationshipsField) Hooks ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) Hooks(value Hooks[store.Value]) PolymorphicRelationshipsField
Hooks replaces the complete field lifecycle hook group.
func (PolymorphicRelationshipsField) IsLocalized ¶ added in v0.2.0
func (v PolymorphicRelationshipsField) IsLocalized() bool
func (PolymorphicRelationshipsField) IsRequired ¶ added in v0.2.0
func (v PolymorphicRelationshipsField) IsRequired() bool
func (PolymorphicRelationshipsField) Kind ¶ added in v0.2.0
func (v PolymorphicRelationshipsField) Kind() Kind
func (PolymorphicRelationshipsField) Label ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) Label(value string) PolymorphicRelationshipsField
func (PolymorphicRelationshipsField) LabelText ¶ added in v0.2.0
func (v PolymorphicRelationshipsField) LabelText() string
func (PolymorphicRelationshipsField) LabelTranslations ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) LabelTranslations(values map[string]string) PolymorphicRelationshipsField
func (PolymorphicRelationshipsField) LiveValidate ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) LiveValidate(value LiveValidator[store.Value]) PolymorphicRelationshipsField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (PolymorphicRelationshipsField) LiveValidators ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) LiveValidators() []LiveValidator[store.Value]
LiveValidators returns a detached list of this field's advisory server checks.
func (PolymorphicRelationshipsField) Localized ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) Localized(values ...bool) PolymorphicRelationshipsField
func (PolymorphicRelationshipsField) Name ¶ added in v0.2.0
func (v PolymorphicRelationshipsField) Name() string
func (PolymorphicRelationshipsField) OnDelete ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) OnDelete(value ReferenceDeleteAction) PolymorphicRelationshipsField
func (PolymorphicRelationshipsField) PrependHooks ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) PrependHooks(value Hooks[store.Value]) PolymorphicRelationshipsField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (PolymorphicRelationshipsField) Private ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) Private(namespace string, value store.Value) PolymorphicRelationshipsField
func (PolymorphicRelationshipsField) Provenance ¶ added in v0.2.0
func (v PolymorphicRelationshipsField) Provenance() []string
func (PolymorphicRelationshipsField) Rename ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) Rename(name string) PolymorphicRelationshipsField
func (PolymorphicRelationshipsField) ReplaceAfterRead ¶ added in v0.2.2
func (f PolymorphicRelationshipsField) ReplaceAfterRead(callbacks ...OutputTransform[store.Value]) PolymorphicRelationshipsField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (PolymorphicRelationshipsField) ReplaceLiveValidators ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) ReplaceLiveValidators(values ...LiveValidator[store.Value]) PolymorphicRelationshipsField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (PolymorphicRelationshipsField) ReplaceValidators ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) ReplaceValidators(values ...Validator[store.Value]) PolymorphicRelationshipsField
ReplaceValidators replaces all authoritative save validators.
func (PolymorphicRelationshipsField) Required ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) Required(values ...bool) PolymorphicRelationshipsField
func (PolymorphicRelationshipsField) RestrictAccess ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) RestrictAccess(value Access) PolymorphicRelationshipsField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (PolymorphicRelationshipsField) Validate ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) Validate(value Validator[store.Value]) PolymorphicRelationshipsField
Validate appends one authoritative save validator.
func (PolymorphicRelationshipsField) Validators ¶ added in v0.2.0
func (f PolymorphicRelationshipsField) Validators() []Validator[store.Value]
type RawTransform ¶ added in v0.2.0
type RawTransform func(operation.Context, operation.Value[store.Value]) (operation.Change[store.Value], error)
RawTransform checks or changes one field before input is converted to its Go type. The context supplies surrounding values; the separate value is this field's raw input and may be invalid. Empty means omitted; Present(store.Null()) means explicit null. Return Keep to leave it unchanged, Replace to change this field, or an error to stop. Changing a context snapshot does not change the document.
type Reference ¶ added in v0.2.0
type Reference struct {
// contains filtered or unexported fields
}
Reference is an immutable field selector. Its dot-separated path names stored fields through non-repeated groups or named tabs, excluding presentation wrappers and repeated row selectors. Each use resolves in its own field scope.
func (Reference) Err ¶ added in v0.2.0
Err checks path structure. Configuration resolution checks target existence and rejects paths that cross repeated fields or end at incompatible values.
func (Reference) MarshalJSON ¶ added in v0.2.0
MarshalJSON retains the authored scope and path.
func (Reference) Path ¶ added in v0.2.0
Path returns the authored dot-separated path relative to the starting scope.
func (Reference) Scope ¶ added in v0.2.0
func (r Reference) Scope() ReferenceScope
Scope returns the reference's starting object scope.
type ReferenceDeleteAction ¶
type ReferenceDeleteAction string
ReferenceDeleteAction controls how a hard-deleted target affects current relationship and upload values that point at it. Historical version snapshots are immutable and are not reconciled by this policy.
const ( // ReferenceDeleteNullify clears a singular reference or removes matching // members from a has-many reference. ReferenceDeleteNullify ReferenceDeleteAction = "nullify" // ReferenceDeleteRestrict rejects the target hard delete while a current // document still references it. ReferenceDeleteRestrict ReferenceDeleteAction = "restrict" )
type ReferenceScope ¶ added in v0.2.0
type ReferenceScope string
ReferenceScope identifies the object from which a field reference is resolved.
const ( SiblingScope ReferenceScope = "sibling" RootScope ReferenceScope = "root" )
type RelationshipField ¶ added in v0.2.0
type RelationshipField struct {
// contains filtered or unexported fields
}
RelationshipField configures a link to one document in the target collection.
func AsRelationship ¶ added in v0.2.0
func AsRelationship(node Node) (RelationshipField, error)
AsRelationship provides a checked concrete view of an immutable node.
func Relationship ¶
func Relationship(name string, target schema.CollectionSlug) RelationshipField
Relationship creates a link to one document in the target collection.
func (RelationshipField) Access ¶ added in v0.2.0
func (f RelationshipField) Access(value Access) RelationshipField
Access replaces the complete field access policy.
func (RelationshipField) AccessPolicy ¶ added in v0.2.0
func (v RelationshipField) AccessPolicy() Access
func (RelationshipField) Admin ¶ added in v0.2.0
func (f RelationshipField) Admin(value Admin) RelationshipField
Admin replaces the complete admin presentation policy.
func (RelationshipField) AdminPolicy ¶ added in v0.2.0
func (v RelationshipField) AdminPolicy() Admin
func (RelationshipField) AfterRead ¶ added in v0.2.2
func (f RelationshipField) AfterRead(callbacks ...OutputTransform[operation.ReferenceOutput]) RelationshipField
AfterRead appends response transforms in order; no callbacks does nothing.
func (RelationshipField) AfterReadHooks ¶ added in v0.2.2
func (f RelationshipField) AfterReadHooks() []OutputTransform[operation.ReferenceOutput]
AfterReadHooks returns a detached response-transform slice.
func (RelationshipField) AppendHooks ¶ added in v0.2.0
func (f RelationshipField) AppendHooks(value Hooks[operation.ID]) RelationshipField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (RelationshipField) BehaviorSummary ¶ added in v0.2.0
func (v RelationshipField) BehaviorSummary() PolicySummary
func (RelationshipField) EditAdmin ¶ added in v0.2.0
func (f RelationshipField) EditAdmin(edit func(*Admin)) RelationshipField
EditAdmin updates selected admin settings while preserving the rest.
func (RelationshipField) FilterOptionRules ¶ added in v0.2.0
func (f RelationshipField) FilterOptionRules(rules ...RelationshipFilterRule) RelationshipField
func (RelationshipField) HookPolicy ¶ added in v0.2.0
func (f RelationshipField) HookPolicy() Hooks[operation.ID]
func (RelationshipField) Hooks ¶ added in v0.2.0
func (f RelationshipField) Hooks(value Hooks[operation.ID]) RelationshipField
Hooks replaces the complete field lifecycle hook group.
func (RelationshipField) Index ¶ added in v0.2.0
func (f RelationshipField) Index(values ...bool) RelationshipField
func (RelationshipField) IsLocalized ¶ added in v0.2.0
func (v RelationshipField) IsLocalized() bool
func (RelationshipField) IsRequired ¶ added in v0.2.0
func (v RelationshipField) IsRequired() bool
func (RelationshipField) Label ¶ added in v0.2.0
func (f RelationshipField) Label(value string) RelationshipField
func (RelationshipField) LabelTranslations ¶ added in v0.2.0
func (f RelationshipField) LabelTranslations(values map[string]string) RelationshipField
func (RelationshipField) LiveValidate ¶ added in v0.2.0
func (f RelationshipField) LiveValidate(value LiveValidator[operation.ID]) RelationshipField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (RelationshipField) LiveValidators ¶ added in v0.2.0
func (f RelationshipField) LiveValidators() []LiveValidator[operation.ID]
LiveValidators returns a detached list of this field's advisory server checks.
func (RelationshipField) Localized ¶ added in v0.2.0
func (f RelationshipField) Localized(values ...bool) RelationshipField
func (RelationshipField) OnDelete ¶ added in v0.2.0
func (f RelationshipField) OnDelete(value ReferenceDeleteAction) RelationshipField
func (RelationshipField) PrependHooks ¶ added in v0.2.0
func (f RelationshipField) PrependHooks(value Hooks[operation.ID]) RelationshipField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (RelationshipField) Private ¶ added in v0.2.0
func (f RelationshipField) Private(namespace string, value store.Value) RelationshipField
func (RelationshipField) Provenance ¶ added in v0.2.0
func (v RelationshipField) Provenance() []string
func (RelationshipField) Rename ¶ added in v0.2.0
func (f RelationshipField) Rename(name string) RelationshipField
func (RelationshipField) ReplaceAfterRead ¶ added in v0.2.2
func (f RelationshipField) ReplaceAfterRead(callbacks ...OutputTransform[operation.ReferenceOutput]) RelationshipField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (RelationshipField) ReplaceLiveValidators ¶ added in v0.2.0
func (f RelationshipField) ReplaceLiveValidators(values ...LiveValidator[operation.ID]) RelationshipField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (RelationshipField) ReplaceValidators ¶ added in v0.2.0
func (f RelationshipField) ReplaceValidators(values ...Validator[operation.ID]) RelationshipField
ReplaceValidators replaces all authoritative save validators.
func (RelationshipField) Required ¶ added in v0.2.0
func (f RelationshipField) Required(values ...bool) RelationshipField
func (RelationshipField) RestrictAccess ¶ added in v0.2.0
func (f RelationshipField) RestrictAccess(value Access) RelationshipField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (RelationshipField) Unique ¶ added in v0.2.0
func (f RelationshipField) Unique(values ...bool) RelationshipField
func (RelationshipField) Validate ¶ added in v0.2.0
func (f RelationshipField) Validate(value Validator[operation.ID]) RelationshipField
Validate appends one authoritative save validator.
func (RelationshipField) Validators ¶ added in v0.2.0
func (f RelationshipField) Validators() []Validator[operation.ID]
type RelationshipFilterOperator ¶
type RelationshipFilterOperator string
RelationshipFilterOperator is the finite predicate vocabulary used to narrow admin options.
const ( FilterEquals RelationshipFilterOperator = "equals" FilterNotEquals RelationshipFilterOperator = "notEquals" FilterLike RelationshipFilterOperator = "like" FilterContains RelationshipFilterOperator = "contains" FilterGreaterThan RelationshipFilterOperator = "greaterThan" FilterGreaterThanEqual RelationshipFilterOperator = "greaterThanEqual" FilterLessThan RelationshipFilterOperator = "lessThan" FilterLessThanEqual RelationshipFilterOperator = "lessThanEqual" )
type RelationshipFilterRule ¶
type RelationshipFilterRule struct {
Collection string
TargetPath string
Operator RelationshipFilterOperator
SourcePath string
Literal *DefaultValue
}
RelationshipFilterRule derives one target predicate from current document data. Collection optionally limits the rule to one target of a polymorphic relationship.
func OptionFilter ¶
func OptionFilter(targetPath string, operator RelationshipFilterOperator, sourcePath string) RelationshipFilterRule
OptionFilter derives one relationship-choice predicate from current document data.
func OptionFilterFor ¶
func OptionFilterFor(collection, targetPath string, operator RelationshipFilterOperator, sourcePath string) RelationshipFilterRule
OptionFilterFor limits an option-filter rule to one target of a polymorphic relationship.
func OptionFilterValue ¶
func OptionFilterValue[Value ~string | ~bool | ~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~float32 | ~float64](targetPath string, operator RelationshipFilterOperator, value Value) RelationshipFilterRule
OptionFilterValue compares a target field with one static scalar value. Literal filters are applied by both admin pickers and server-side reference admission.
func OptionFilterValueFor ¶
func OptionFilterValueFor[Value ~string | ~bool | ~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~float32 | ~float64](collection, targetPath string, operator RelationshipFilterOperator, value Value) RelationshipFilterRule
OptionFilterValueFor limits a static option filter to one polymorphic target.
type RelationshipsField ¶ added in v0.2.0
type RelationshipsField struct {
// contains filtered or unexported fields
}
RelationshipsField configures links to several documents in the target collection.
func AsRelationships ¶ added in v0.2.0
func AsRelationships(node Node) (RelationshipsField, error)
AsRelationships provides a checked concrete view of an immutable node.
func Relationships ¶ added in v0.2.0
func Relationships(name string, target schema.CollectionSlug) RelationshipsField
Relationships creates links to several documents in the target collection.
func (RelationshipsField) Access ¶ added in v0.2.0
func (f RelationshipsField) Access(value Access) RelationshipsField
Access replaces the complete field access policy.
func (RelationshipsField) AccessPolicy ¶ added in v0.2.0
func (v RelationshipsField) AccessPolicy() Access
func (RelationshipsField) Admin ¶ added in v0.2.0
func (f RelationshipsField) Admin(value Admin) RelationshipsField
Admin replaces the complete admin presentation policy.
func (RelationshipsField) AdminPolicy ¶ added in v0.2.0
func (v RelationshipsField) AdminPolicy() Admin
func (RelationshipsField) AfterRead ¶ added in v0.2.2
func (f RelationshipsField) AfterRead(callbacks ...OutputTransform[[]operation.ReferenceOutput]) RelationshipsField
AfterRead appends response transforms in order; no callbacks does nothing.
func (RelationshipsField) AfterReadHooks ¶ added in v0.2.2
func (f RelationshipsField) AfterReadHooks() []OutputTransform[[]operation.ReferenceOutput]
AfterReadHooks returns a detached response-transform slice.
func (RelationshipsField) AppendHooks ¶ added in v0.2.0
func (f RelationshipsField) AppendHooks(value Hooks[[]operation.ID]) RelationshipsField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (RelationshipsField) BehaviorSummary ¶ added in v0.2.0
func (v RelationshipsField) BehaviorSummary() PolicySummary
func (RelationshipsField) EditAdmin ¶ added in v0.2.0
func (f RelationshipsField) EditAdmin(edit func(*Admin)) RelationshipsField
EditAdmin updates selected admin settings while preserving the rest.
func (RelationshipsField) FilterOptionRules ¶ added in v0.2.0
func (f RelationshipsField) FilterOptionRules(rules ...RelationshipFilterRule) RelationshipsField
func (RelationshipsField) HookPolicy ¶ added in v0.2.0
func (f RelationshipsField) HookPolicy() Hooks[[]operation.ID]
func (RelationshipsField) Hooks ¶ added in v0.2.0
func (f RelationshipsField) Hooks(value Hooks[[]operation.ID]) RelationshipsField
Hooks replaces the complete field lifecycle hook group.
func (RelationshipsField) IsLocalized ¶ added in v0.2.0
func (v RelationshipsField) IsLocalized() bool
func (RelationshipsField) IsRequired ¶ added in v0.2.0
func (v RelationshipsField) IsRequired() bool
func (RelationshipsField) Label ¶ added in v0.2.0
func (f RelationshipsField) Label(value string) RelationshipsField
func (RelationshipsField) LabelText ¶ added in v0.2.0
func (v RelationshipsField) LabelText() string
func (RelationshipsField) LabelTranslations ¶ added in v0.2.0
func (f RelationshipsField) LabelTranslations(values map[string]string) RelationshipsField
func (RelationshipsField) LiveValidate ¶ added in v0.2.0
func (f RelationshipsField) LiveValidate(value LiveValidator[[]operation.ID]) RelationshipsField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (RelationshipsField) LiveValidators ¶ added in v0.2.0
func (f RelationshipsField) LiveValidators() []LiveValidator[[]operation.ID]
LiveValidators returns a detached list of this field's advisory server checks.
func (RelationshipsField) Localized ¶ added in v0.2.0
func (f RelationshipsField) Localized(values ...bool) RelationshipsField
func (RelationshipsField) OnDelete ¶ added in v0.2.0
func (f RelationshipsField) OnDelete(value ReferenceDeleteAction) RelationshipsField
func (RelationshipsField) PrependHooks ¶ added in v0.2.0
func (f RelationshipsField) PrependHooks(value Hooks[[]operation.ID]) RelationshipsField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (RelationshipsField) Private ¶ added in v0.2.0
func (f RelationshipsField) Private(namespace string, value store.Value) RelationshipsField
func (RelationshipsField) Provenance ¶ added in v0.2.0
func (v RelationshipsField) Provenance() []string
func (RelationshipsField) Rename ¶ added in v0.2.0
func (f RelationshipsField) Rename(name string) RelationshipsField
func (RelationshipsField) ReplaceAfterRead ¶ added in v0.2.2
func (f RelationshipsField) ReplaceAfterRead(callbacks ...OutputTransform[[]operation.ReferenceOutput]) RelationshipsField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (RelationshipsField) ReplaceLiveValidators ¶ added in v0.2.0
func (f RelationshipsField) ReplaceLiveValidators(values ...LiveValidator[[]operation.ID]) RelationshipsField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (RelationshipsField) ReplaceValidators ¶ added in v0.2.0
func (f RelationshipsField) ReplaceValidators(values ...Validator[[]operation.ID]) RelationshipsField
ReplaceValidators replaces all authoritative save validators.
func (RelationshipsField) Required ¶ added in v0.2.0
func (f RelationshipsField) Required(values ...bool) RelationshipsField
func (RelationshipsField) RestrictAccess ¶ added in v0.2.0
func (f RelationshipsField) RestrictAccess(value Access) RelationshipsField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (RelationshipsField) Validate ¶ added in v0.2.0
func (f RelationshipsField) Validate(value Validator[[]operation.ID]) RelationshipsField
Validate appends one authoritative save validator.
func (RelationshipsField) Validators ¶ added in v0.2.0
func (f RelationshipsField) Validators() []Validator[[]operation.ID]
type Resolver ¶ added in v0.2.0
Resolver calculates a root Virtual field for the response. Read other values from its context and return Present(value), Empty[T](), or an error. The value must match the declared Virtual type and remains subject to field read access.
type RowLabels ¶
type RowLabels struct {
Singular string
Plural string
SingularTranslations map[string]string
PluralTranslations map[string]string
}
RowLabels contains optional singular and plural display names for array rows. RowLabelPath remains the separate child-field path used to derive each row heading.
type SelectField ¶ added in v0.2.0
type SelectField struct {
// contains filtered or unexported fields
}
SelectField configures a field for choosing one value from a fixed list.
func AsSelect ¶ added in v0.2.0
func AsSelect(node Node) (SelectField, error)
AsSelect provides a checked concrete view of an immutable node.
func Radio ¶
func Radio(name string, values ...string) SelectField
Radio creates a field for choosing one value with radio buttons. Values are stored exactly as given; display labels are generated during resolution. Use Options to configure custom labels or translations.
func Select ¶
func Select(name string, values ...string) SelectField
Select creates a field for choosing one value from a fixed list. Values are stored exactly as given; display labels are generated during resolution. Use Options to configure custom labels or translations.
func (SelectField) Access ¶ added in v0.2.0
func (f SelectField) Access(value Access) SelectField
Access replaces the complete field access policy.
func (SelectField) AccessPolicy ¶ added in v0.2.0
func (v SelectField) AccessPolicy() Access
func (SelectField) Admin ¶ added in v0.2.0
func (f SelectField) Admin(value Admin) SelectField
Admin replaces the complete admin presentation policy.
func (SelectField) AdminPolicy ¶ added in v0.2.0
func (v SelectField) AdminPolicy() Admin
func (SelectField) AfterRead ¶ added in v0.2.2
func (f SelectField) AfterRead(callbacks ...OutputTransform[string]) SelectField
AfterRead appends response transforms in order; no callbacks does nothing.
func (SelectField) AfterReadHooks ¶ added in v0.2.2
func (f SelectField) AfterReadHooks() []OutputTransform[string]
AfterReadHooks returns a detached response-transform slice.
func (SelectField) AppendHooks ¶ added in v0.2.0
func (f SelectField) AppendHooks(value Hooks[string]) SelectField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (SelectField) BehaviorSummary ¶ added in v0.2.0
func (v SelectField) BehaviorSummary() PolicySummary
func (SelectField) Default ¶ added in v0.2.0
func (f SelectField) Default(value string) SelectField
func (SelectField) DefaultCallback ¶ added in v0.2.0
func (f SelectField) DefaultCallback() DefaultFunc[string]
DefaultCallback returns the configured dynamic default, or nil for a literal default or no default. Callback closure captures remain application-owned.
func (SelectField) DefaultFrom ¶ added in v0.2.0
func (f SelectField) DefaultFrom(callback DefaultFunc[string]) SelectField
DefaultFrom supplies a server-side initial value for an eligible omitted field. It replaces a literal or dynamic default; the original field is unchanged. See DefaultFunc and operation.Context for initialization semantics.
func (SelectField) EditAdmin ¶ added in v0.2.0
func (f SelectField) EditAdmin(edit func(*Admin)) SelectField
EditAdmin updates selected admin settings while preserving the rest.
func (SelectField) HookPolicy ¶ added in v0.2.0
func (f SelectField) HookPolicy() Hooks[string]
func (SelectField) Hooks ¶ added in v0.2.0
func (f SelectField) Hooks(value Hooks[string]) SelectField
Hooks replaces the complete field lifecycle hook group.
func (SelectField) Index ¶ added in v0.2.0
func (f SelectField) Index(values ...bool) SelectField
func (SelectField) IsLocalized ¶ added in v0.2.0
func (v SelectField) IsLocalized() bool
func (SelectField) IsRequired ¶ added in v0.2.0
func (v SelectField) IsRequired() bool
func (SelectField) Label ¶ added in v0.2.0
func (f SelectField) Label(value string) SelectField
func (SelectField) LabelTranslations ¶ added in v0.2.0
func (f SelectField) LabelTranslations(values map[string]string) SelectField
func (SelectField) LiveValidate ¶ added in v0.2.0
func (f SelectField) LiveValidate(value LiveValidator[string]) SelectField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (SelectField) LiveValidators ¶ added in v0.2.0
func (f SelectField) LiveValidators() []LiveValidator[string]
LiveValidators returns a detached list of this field's advisory server checks.
func (SelectField) Localized ¶ added in v0.2.0
func (f SelectField) Localized(values ...bool) SelectField
func (SelectField) Options ¶ added in v0.2.0
func (f SelectField) Options(values ...Option) SelectField
Options replaces the option list with options that can include labels and translations.
func (SelectField) PrependHooks ¶ added in v0.2.0
func (f SelectField) PrependHooks(value Hooks[string]) SelectField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (SelectField) Private ¶ added in v0.2.0
func (f SelectField) Private(namespace string, value store.Value) SelectField
func (SelectField) Provenance ¶ added in v0.2.0
func (v SelectField) Provenance() []string
func (SelectField) Rename ¶ added in v0.2.0
func (f SelectField) Rename(name string) SelectField
func (SelectField) ReplaceAfterRead ¶ added in v0.2.2
func (f SelectField) ReplaceAfterRead(callbacks ...OutputTransform[string]) SelectField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (SelectField) ReplaceLiveValidators ¶ added in v0.2.0
func (f SelectField) ReplaceLiveValidators(values ...LiveValidator[string]) SelectField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (SelectField) ReplaceValidators ¶ added in v0.2.0
func (f SelectField) ReplaceValidators(values ...Validator[string]) SelectField
ReplaceValidators replaces all authoritative save validators.
func (SelectField) Required ¶ added in v0.2.0
func (f SelectField) Required(values ...bool) SelectField
func (SelectField) RestrictAccess ¶ added in v0.2.0
func (f SelectField) RestrictAccess(value Access) SelectField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (SelectField) Unique ¶ added in v0.2.0
func (f SelectField) Unique(values ...bool) SelectField
func (SelectField) Validate ¶ added in v0.2.0
func (f SelectField) Validate(value Validator[string]) SelectField
Validate appends one authoritative save validator.
func (SelectField) Validators ¶ added in v0.2.0
func (f SelectField) Validators() []Validator[string]
type TextField ¶ added in v0.2.0
type TextField struct {
// contains filtered or unexported fields
}
TextField configures a Text, Code, or Textarea string field.
func Slug ¶
Slug defines a required, unique, indexed text field whose value is generated from sourcePath until an author supplies a manual value. The source may be a direct string field or a string field beneath non-repeated groups.
Slugs intentionally use ordinary text storage and generated string contracts. Localization and defaults are not supported by this first-class helper.
func (TextField) AccessPolicy ¶ added in v0.2.0
func (v TextField) AccessPolicy() Access
func (TextField) AdminPolicy ¶ added in v0.2.0
func (v TextField) AdminPolicy() Admin
func (TextField) AfterRead ¶ added in v0.2.2
func (f TextField) AfterRead(callbacks ...OutputTransform[string]) TextField
AfterRead appends response transforms in order; no callbacks does nothing.
func (TextField) AfterReadHooks ¶ added in v0.2.2
func (f TextField) AfterReadHooks() []OutputTransform[string]
AfterReadHooks returns a detached response-transform slice.
func (TextField) AppendHooks ¶ added in v0.2.0
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (TextField) BehaviorSummary ¶ added in v0.2.0
func (v TextField) BehaviorSummary() PolicySummary
func (TextField) DefaultCallback ¶ added in v0.2.0
func (f TextField) DefaultCallback() DefaultFunc[string]
DefaultCallback returns the configured dynamic default, or nil for a literal default or no default. Callback closure captures remain application-owned.
func (TextField) DefaultFrom ¶ added in v0.2.0
func (f TextField) DefaultFrom(callback DefaultFunc[string]) TextField
DefaultFrom supplies a server-side initial value for an eligible omitted field. It replaces a literal or dynamic default; the original field is unchanged. See DefaultFunc and operation.Context for initialization semantics.
func (TextField) EditAdmin ¶ added in v0.2.0
EditAdmin updates selected admin settings while preserving the rest.
func (TextField) HookPolicy ¶ added in v0.2.0
func (TextField) IsLocalized ¶ added in v0.2.0
func (v TextField) IsLocalized() bool
func (TextField) IsRequired ¶ added in v0.2.0
func (v TextField) IsRequired() bool
func (TextField) LabelTranslations ¶ added in v0.2.0
func (TextField) LiveValidate ¶ added in v0.2.0
func (f TextField) LiveValidate(value LiveValidator[string]) TextField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (TextField) LiveValidators ¶ added in v0.2.0
func (f TextField) LiveValidators() []LiveValidator[string]
LiveValidators returns a detached list of this field's advisory server checks.
func (TextField) PrependHooks ¶ added in v0.2.0
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (TextField) Provenance ¶ added in v0.2.0
func (v TextField) Provenance() []string
func (TextField) ReplaceAfterRead ¶ added in v0.2.2
func (f TextField) ReplaceAfterRead(callbacks ...OutputTransform[string]) TextField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (TextField) ReplaceLiveValidators ¶ added in v0.2.0
func (f TextField) ReplaceLiveValidators(values ...LiveValidator[string]) TextField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (TextField) ReplaceValidators ¶ added in v0.2.0
ReplaceValidators replaces all authoritative save validators.
func (TextField) RestrictAccess ¶ added in v0.2.0
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (TextField) Validators ¶ added in v0.2.0
type TextListField ¶ added in v0.2.0
type TextListField struct {
// contains filtered or unexported fields
}
TextListField configures one ordered list of strings. It preserves duplicate values and has no per-item fields or persisted row identities.
func AsTextList ¶ added in v0.2.0
func AsTextList(node Node) (TextListField, error)
AsTextList provides a checked concrete view of an immutable primitive-list node.
func TextList ¶ added in v0.2.0
func TextList(name string) TextListField
TextList creates an ordered primitive list. Required demands a nonempty list; MinRows and MaxRows constrain its length independently of per-item constraints.
func (TextListField) Access ¶ added in v0.2.0
func (f TextListField) Access(value Access) TextListField
Access replaces the complete field access policy.
func (TextListField) AccessPolicy ¶ added in v0.2.0
func (v TextListField) AccessPolicy() Access
func (TextListField) Admin ¶ added in v0.2.0
func (f TextListField) Admin(value Admin) TextListField
Admin replaces the complete admin presentation policy.
func (TextListField) AdminPolicy ¶ added in v0.2.0
func (v TextListField) AdminPolicy() Admin
func (TextListField) AfterRead ¶ added in v0.2.2
func (f TextListField) AfterRead(callbacks ...OutputTransform[[]string]) TextListField
AfterRead appends response transforms in order; no callbacks does nothing.
func (TextListField) AfterReadHooks ¶ added in v0.2.2
func (f TextListField) AfterReadHooks() []OutputTransform[[]string]
AfterReadHooks returns a detached response-transform slice.
func (TextListField) AppendHooks ¶ added in v0.2.0
func (f TextListField) AppendHooks(value Hooks[[]string]) TextListField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (TextListField) BehaviorSummary ¶ added in v0.2.0
func (v TextListField) BehaviorSummary() PolicySummary
func (TextListField) Default ¶ added in v0.2.0
func (f TextListField) Default(values ...string) TextListField
Default sets a copied literal initial list. With no values it explicitly defaults to an empty list. It replaces any DefaultFrom callback.
func (TextListField) DefaultCallback ¶ added in v0.2.0
func (f TextListField) DefaultCallback() DefaultFunc[[]string]
DefaultCallback returns the configured server default without executing it.
func (TextListField) DefaultFrom ¶ added in v0.2.0
func (f TextListField) DefaultFrom(callback DefaultFunc[[]string]) TextListField
DefaultFrom sets a typed server default using the ordinary initialization lifecycle.
func (TextListField) EditAdmin ¶ added in v0.2.0
func (f TextListField) EditAdmin(edit func(*Admin)) TextListField
EditAdmin updates selected admin settings while preserving the rest.
func (TextListField) HookPolicy ¶ added in v0.2.0
func (f TextListField) HookPolicy() Hooks[[]string]
func (TextListField) Hooks ¶ added in v0.2.0
func (f TextListField) Hooks(value Hooks[[]string]) TextListField
Hooks replaces the complete field lifecycle hook group.
func (TextListField) IsLocalized ¶ added in v0.2.0
func (v TextListField) IsLocalized() bool
func (TextListField) IsRequired ¶ added in v0.2.0
func (v TextListField) IsRequired() bool
func (TextListField) Label ¶ added in v0.2.0
func (f TextListField) Label(value string) TextListField
func (TextListField) LabelTranslations ¶ added in v0.2.0
func (f TextListField) LabelTranslations(values map[string]string) TextListField
func (TextListField) LiveValidate ¶ added in v0.2.0
func (f TextListField) LiveValidate(value LiveValidator[[]string]) TextListField
LiveValidate appends an advisory check for the complete primitive list. Items have no separate occurrence identity; Validate remains authoritative on Save.
func (TextListField) LiveValidators ¶ added in v0.2.0
func (f TextListField) LiveValidators() []LiveValidator[[]string]
LiveValidators returns a detached list of whole-list advisory checks.
func (TextListField) Localized ¶ added in v0.2.0
func (f TextListField) Localized(values ...bool) TextListField
func (TextListField) MaxLength ¶ added in v0.2.0
func (f TextListField) MaxLength(value int) TextListField
MaxLength limits each string's Unicode code point count.
func (TextListField) MaxRows ¶ added in v0.2.0
func (f TextListField) MaxRows(value int) TextListField
MaxRows limits the number of items; zero means no configured maximum.
func (TextListField) MinLength ¶ added in v0.2.0
func (f TextListField) MinLength(value int) TextListField
MinLength requires each string to contain at least value Unicode code points.
func (TextListField) MinRows ¶ added in v0.2.0
func (f TextListField) MinRows(value int) TextListField
MinRows requires at least value items, including when the list is empty or null.
func (TextListField) PrependHooks ¶ added in v0.2.0
func (f TextListField) PrependHooks(value Hooks[[]string]) TextListField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (TextListField) Private ¶ added in v0.2.0
func (f TextListField) Private(namespace string, value store.Value) TextListField
func (TextListField) Provenance ¶ added in v0.2.0
func (v TextListField) Provenance() []string
func (TextListField) Rename ¶ added in v0.2.0
func (f TextListField) Rename(name string) TextListField
func (TextListField) ReplaceAfterRead ¶ added in v0.2.2
func (f TextListField) ReplaceAfterRead(callbacks ...OutputTransform[[]string]) TextListField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (TextListField) ReplaceLiveValidators ¶ added in v0.2.0
func (f TextListField) ReplaceLiveValidators(values ...LiveValidator[[]string]) TextListField
ReplaceLiveValidators replaces only this field's advisory checks. An empty list disables live checks while preserving every unrelated policy.
func (TextListField) ReplaceValidators ¶ added in v0.2.0
func (f TextListField) ReplaceValidators(values ...Validator[[]string]) TextListField
ReplaceValidators replaces all authoritative save validators.
func (TextListField) Required ¶ added in v0.2.0
func (f TextListField) Required(values ...bool) TextListField
func (TextListField) RestrictAccess ¶ added in v0.2.0
func (f TextListField) RestrictAccess(value Access) TextListField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (TextListField) Validate ¶ added in v0.2.0
func (f TextListField) Validate(value Validator[[]string]) TextListField
Validate appends one authoritative save validator.
func (TextListField) Validators ¶ added in v0.2.0
func (f TextListField) Validators() []Validator[[]string]
type Transform ¶ added in v0.2.0
Transform checks or changes one field's typed value before saving. The context includes unchanged values from an update and changes made by earlier hooks. Return Keep to leave this field unchanged, Replace(Present(value)) to set it, or Replace(Empty[T]()) to clear it. An error stops the operation. Returned values still pass through validation and field access checks.
type UploadField ¶ added in v0.2.0
type UploadField struct {
// contains filtered or unexported fields
}
UploadField configures a link to one file in the target upload collection.
func AsUpload ¶ added in v0.2.0
func AsUpload(node Node) (UploadField, error)
AsUpload provides a checked concrete view of an immutable node.
func Upload ¶
func Upload(name string, target schema.CollectionSlug) UploadField
Upload creates a link to one file in the target upload collection.
func (UploadField) Access ¶ added in v0.2.0
func (f UploadField) Access(value Access) UploadField
Access replaces the complete field access policy.
func (UploadField) AccessPolicy ¶ added in v0.2.0
func (v UploadField) AccessPolicy() Access
func (UploadField) Admin ¶ added in v0.2.0
func (f UploadField) Admin(value Admin) UploadField
Admin replaces the complete admin presentation policy.
func (UploadField) AdminPolicy ¶ added in v0.2.0
func (v UploadField) AdminPolicy() Admin
func (UploadField) AfterRead ¶ added in v0.2.2
func (f UploadField) AfterRead(callbacks ...OutputTransform[operation.ReferenceOutput]) UploadField
AfterRead appends response transforms in order; no callbacks does nothing.
func (UploadField) AfterReadHooks ¶ added in v0.2.2
func (f UploadField) AfterReadHooks() []OutputTransform[operation.ReferenceOutput]
AfterReadHooks returns a detached response-transform slice.
func (UploadField) AppendHooks ¶ added in v0.2.0
func (f UploadField) AppendHooks(value Hooks[operation.ID]) UploadField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (UploadField) BehaviorSummary ¶ added in v0.2.0
func (v UploadField) BehaviorSummary() PolicySummary
func (UploadField) EditAdmin ¶ added in v0.2.0
func (f UploadField) EditAdmin(edit func(*Admin)) UploadField
EditAdmin updates selected admin settings while preserving the rest.
func (UploadField) FilterOptionRules ¶ added in v0.2.0
func (f UploadField) FilterOptionRules(rules ...RelationshipFilterRule) UploadField
func (UploadField) HookPolicy ¶ added in v0.2.0
func (f UploadField) HookPolicy() Hooks[operation.ID]
func (UploadField) Hooks ¶ added in v0.2.0
func (f UploadField) Hooks(value Hooks[operation.ID]) UploadField
Hooks replaces the complete field lifecycle hook group.
func (UploadField) Index ¶ added in v0.2.0
func (f UploadField) Index(values ...bool) UploadField
func (UploadField) IsLocalized ¶ added in v0.2.0
func (v UploadField) IsLocalized() bool
func (UploadField) IsRequired ¶ added in v0.2.0
func (v UploadField) IsRequired() bool
func (UploadField) Label ¶ added in v0.2.0
func (f UploadField) Label(value string) UploadField
func (UploadField) LabelTranslations ¶ added in v0.2.0
func (f UploadField) LabelTranslations(values map[string]string) UploadField
func (UploadField) LiveValidate ¶ added in v0.2.0
func (f UploadField) LiveValidate(value LiveValidator[operation.ID]) UploadField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (UploadField) LiveValidators ¶ added in v0.2.0
func (f UploadField) LiveValidators() []LiveValidator[operation.ID]
LiveValidators returns a detached list of this field's advisory server checks.
func (UploadField) Localized ¶ added in v0.2.0
func (f UploadField) Localized(values ...bool) UploadField
func (UploadField) OnDelete ¶ added in v0.2.0
func (f UploadField) OnDelete(value ReferenceDeleteAction) UploadField
func (UploadField) PrependHooks ¶ added in v0.2.0
func (f UploadField) PrependHooks(value Hooks[operation.ID]) UploadField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (UploadField) Private ¶ added in v0.2.0
func (f UploadField) Private(namespace string, value store.Value) UploadField
func (UploadField) Provenance ¶ added in v0.2.0
func (v UploadField) Provenance() []string
func (UploadField) Rename ¶ added in v0.2.0
func (f UploadField) Rename(name string) UploadField
func (UploadField) ReplaceAfterRead ¶ added in v0.2.2
func (f UploadField) ReplaceAfterRead(callbacks ...OutputTransform[operation.ReferenceOutput]) UploadField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (UploadField) ReplaceLiveValidators ¶ added in v0.2.0
func (f UploadField) ReplaceLiveValidators(values ...LiveValidator[operation.ID]) UploadField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (UploadField) ReplaceValidators ¶ added in v0.2.0
func (f UploadField) ReplaceValidators(values ...Validator[operation.ID]) UploadField
ReplaceValidators replaces all authoritative save validators.
func (UploadField) Required ¶ added in v0.2.0
func (f UploadField) Required(values ...bool) UploadField
func (UploadField) RestrictAccess ¶ added in v0.2.0
func (f UploadField) RestrictAccess(value Access) UploadField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (UploadField) Unique ¶ added in v0.2.0
func (f UploadField) Unique(values ...bool) UploadField
func (UploadField) Validate ¶ added in v0.2.0
func (f UploadField) Validate(value Validator[operation.ID]) UploadField
Validate appends one authoritative save validator.
func (UploadField) Validators ¶ added in v0.2.0
func (f UploadField) Validators() []Validator[operation.ID]
type UploadsField ¶ added in v0.2.0
type UploadsField struct {
// contains filtered or unexported fields
}
UploadsField configures links to several files in the target upload collection.
func AsUploads ¶ added in v0.2.0
func AsUploads(node Node) (UploadsField, error)
AsUploads provides a checked concrete view of an immutable node.
func Uploads ¶ added in v0.2.0
func Uploads(name string, target schema.CollectionSlug) UploadsField
Uploads creates links to several files in the target upload collection.
func (UploadsField) Access ¶ added in v0.2.0
func (f UploadsField) Access(value Access) UploadsField
Access replaces the complete field access policy.
func (UploadsField) AccessPolicy ¶ added in v0.2.0
func (v UploadsField) AccessPolicy() Access
func (UploadsField) Admin ¶ added in v0.2.0
func (f UploadsField) Admin(value Admin) UploadsField
Admin replaces the complete admin presentation policy.
func (UploadsField) AdminPolicy ¶ added in v0.2.0
func (v UploadsField) AdminPolicy() Admin
func (UploadsField) AfterRead ¶ added in v0.2.2
func (f UploadsField) AfterRead(callbacks ...OutputTransform[[]operation.ReferenceOutput]) UploadsField
AfterRead appends response transforms in order; no callbacks does nothing.
func (UploadsField) AfterReadHooks ¶ added in v0.2.2
func (f UploadsField) AfterReadHooks() []OutputTransform[[]operation.ReferenceOutput]
AfterReadHooks returns a detached response-transform slice.
func (UploadsField) AppendHooks ¶ added in v0.2.0
func (f UploadsField) AppendHooks(value Hooks[[]operation.ID]) UploadsField
AppendHooks appends supplied callbacks after existing callbacks in each phase.
func (UploadsField) BehaviorSummary ¶ added in v0.2.0
func (v UploadsField) BehaviorSummary() PolicySummary
func (UploadsField) EditAdmin ¶ added in v0.2.0
func (f UploadsField) EditAdmin(edit func(*Admin)) UploadsField
EditAdmin updates selected admin settings while preserving the rest.
func (UploadsField) FilterOptionRules ¶ added in v0.2.0
func (f UploadsField) FilterOptionRules(rules ...RelationshipFilterRule) UploadsField
func (UploadsField) HookPolicy ¶ added in v0.2.0
func (f UploadsField) HookPolicy() Hooks[[]operation.ID]
func (UploadsField) Hooks ¶ added in v0.2.0
func (f UploadsField) Hooks(value Hooks[[]operation.ID]) UploadsField
Hooks replaces the complete field lifecycle hook group.
func (UploadsField) IsLocalized ¶ added in v0.2.0
func (v UploadsField) IsLocalized() bool
func (UploadsField) IsRequired ¶ added in v0.2.0
func (v UploadsField) IsRequired() bool
func (UploadsField) Label ¶ added in v0.2.0
func (f UploadsField) Label(value string) UploadsField
func (UploadsField) LabelTranslations ¶ added in v0.2.0
func (f UploadsField) LabelTranslations(values map[string]string) UploadsField
func (UploadsField) LiveValidate ¶ added in v0.2.0
func (f UploadsField) LiveValidate(value LiveValidator[[]operation.ID]) UploadsField
LiveValidate appends an explicitly opted-in advisory server check. It does not register a save validator; use Validate separately for authoritative checks.
func (UploadsField) LiveValidators ¶ added in v0.2.0
func (f UploadsField) LiveValidators() []LiveValidator[[]operation.ID]
LiveValidators returns a detached list of this field's advisory server checks.
func (UploadsField) Localized ¶ added in v0.2.0
func (f UploadsField) Localized(values ...bool) UploadsField
func (UploadsField) OnDelete ¶ added in v0.2.0
func (f UploadsField) OnDelete(value ReferenceDeleteAction) UploadsField
func (UploadsField) PrependHooks ¶ added in v0.2.0
func (f UploadsField) PrependHooks(value Hooks[[]operation.ID]) UploadsField
PrependHooks inserts supplied callbacks before existing callbacks in each phase.
func (UploadsField) Private ¶ added in v0.2.0
func (f UploadsField) Private(namespace string, value store.Value) UploadsField
func (UploadsField) Provenance ¶ added in v0.2.0
func (v UploadsField) Provenance() []string
func (UploadsField) Rename ¶ added in v0.2.0
func (f UploadsField) Rename(name string) UploadsField
func (UploadsField) ReplaceAfterRead ¶ added in v0.2.2
func (f UploadsField) ReplaceAfterRead(callbacks ...OutputTransform[[]operation.ReferenceOutput]) UploadsField
ReplaceAfterRead replaces response transforms; no callbacks clears them.
func (UploadsField) ReplaceLiveValidators ¶ added in v0.2.0
func (f UploadsField) ReplaceLiveValidators(values ...LiveValidator[[]operation.ID]) UploadsField
ReplaceLiveValidators replaces this field's advisory checks, preserving its save validators and every unrelated policy. An empty list disables live checks.
func (UploadsField) ReplaceValidators ¶ added in v0.2.0
func (f UploadsField) ReplaceValidators(values ...Validator[[]operation.ID]) UploadsField
ReplaceValidators replaces all authoritative save validators.
func (UploadsField) Required ¶ added in v0.2.0
func (f UploadsField) Required(values ...bool) UploadsField
func (UploadsField) RestrictAccess ¶ added in v0.2.0
func (f UploadsField) RestrictAccess(value Access) UploadsField
RestrictAccess combines supplied rules with existing access rules; both must allow.
func (UploadsField) Validate ¶ added in v0.2.0
func (f UploadsField) Validate(value Validator[[]operation.ID]) UploadsField
Validate appends one authoritative save validator.
func (UploadsField) Validators ¶ added in v0.2.0
func (f UploadsField) Validators() []Validator[[]operation.ID]
type Validator ¶ added in v0.2.0
Validator checks a field before saving, after built-in checks and write hooks. Root and Siblings include retained values and earlier write transformations; Prior remains the persisted enclosing object or row. LiveValidationContext instead describes sparse input before defaults and save transformations. Return issues for values the author needs to fix, or an error if the check could not run. An issue belongs to this field unless its Target names a child.
type ValueType ¶
type ValueType string
ValueType identifies the generated and runtime value contract of a virtual field.
type View ¶ added in v0.2.0
type View struct {
// contains filtered or unexported fields
}
View is a read-only snapshot of a canonical immutable node. Its readers detach mutable values; author fields through their concrete fluent facades.
func Snapshot ¶ added in v0.2.0
Snapshot captures even pointer-to-facade inputs by value. Invalid nil nodes become diagnostic definitions, so composition never panics on caller input.
func (View) AccessPolicy ¶ added in v0.2.0
AccessPolicy returns the immutable function group; closure captures remain author-owned.
func (View) AdminComponent ¶ added in v0.2.0
func (d View) AdminComponent() (pluginKey, component string, config json.RawMessage, ok bool)
AdminComponent returns the optional statically registered admin plugin renderer selected for this field. The returned configuration is detached from the immutable definition.
func (View) AdminPolicy ¶ added in v0.2.0
AdminPolicy returns a detached complete presentation policy draft.
func (View) BehaviorSummary ¶ added in v0.2.0
func (d View) BehaviorSummary() PolicySummary
BehaviorSummary describes the attached policies without exposing function addresses.
func (View) BlockReferences ¶ added in v0.2.0
BlockReferences returns the declared registry slugs, never expanded definitions.
func (View) Boundary ¶ added in v0.2.0
Boundary reports a node's value/traversal semantics, not just its broad kind.
func (View) Branches ¶ added in v0.2.0
Branches exposes only schema-owned children, including published embedded payload cases. Arbitrary plugin JSON is never interpreted as fields.
func (View) Category ¶ added in v0.2.0
Category returns the behavioral category for the definition's field kind.
func (View) CodeLanguage ¶ added in v0.2.0
CodeLanguage is the editor language hint for a code field.
func (View) Columns ¶ added in v0.2.0
Columns returns the requested one-to-twelve-column admin grid width, or zero.
func (View) DateFormat ¶ added in v0.2.0
func (d View) DateFormat() DateFormat
DateFormat returns the accepted date value format, defaulting to DateOnly.
func (View) Default ¶ added in v0.2.0
func (d View) Default() (DefaultValue, bool)
Default returns the configured typed literal default. List defaults use canonical JSON arrays. Dynamic defaults are executable policies and are not evaluated by this reader.
func (View) Description ¶ added in v0.2.0
Description returns the configured author-facing supporting text.
func (View) DescriptionTranslations ¶ added in v0.2.0
DescriptionTranslations returns localized supporting text by admin language.
func (View) Editor ¶ added in v0.2.0
func (d View) Editor() (string, json.RawMessage)
Editor returns a detached application editor selection.
func (View) EmbeddedTrees ¶ added in v0.2.0
func (d View) EmbeddedTrees() []EmbeddedTree
EmbeddedTrees returns detached declarative embedded schema definitions.
func (View) HasBehavior ¶ added in v0.2.0
HasBehavior identifies executable policies owned by this field.
func (View) Hidden ¶ added in v0.2.0
Hidden reports whether the admin should omit this field from presentation.
func (View) Index ¶ added in v0.2.0
Index reports whether the field should have a non-unique database index. Unique fields already receive a unique index even when this is false.
func (View) InitiallyCollapsed ¶ added in v0.2.0
InitiallyCollapsed reports whether a collapsible presentation group starts closed.
func (View) IsNamedTab ¶ added in v0.2.0
IsNamedTab distinguishes a stored object with tab presentation from layout.
func (View) IsUnnamedTab ¶ added in v0.2.0
IsUnnamedTab distinguishes a single presentation section from a tab group.
func (View) Issues ¶ added in v0.2.0
Issues validates the current declaration without executing behavior.
func (View) JoinAllowCreate ¶ added in v0.2.0
JoinAllowCreate reports whether the admin may offer inline target creation.
func (View) JoinCollection ¶ added in v0.2.0
JoinCollection is the collection queried by an inverse join.
func (View) JoinDefaultColumns ¶ added in v0.2.0
JoinDefaultColumns returns the target fields shown by the inverse-join table.
func (View) JoinDefaultSort ¶ added in v0.2.0
JoinDefaultSort returns the target sort expression, including an optional descending prefix.
func (View) JoinLimit ¶ added in v0.2.0
JoinLimit is the maximum related documents returned for an inverse join.
func (View) JoinOn ¶ added in v0.2.0
JoinOn is the target relationship path matched against the source document ID.
func (View) Label ¶ added in v0.2.0
Label returns the explicit author-facing label, if one was configured.
func (View) LabelTranslations ¶ added in v0.2.0
LabelTranslations returns localized author-facing labels by admin language.
func (View) LocalRowLabel ¶ added in v0.2.0
func (d View) LocalRowLabel() (string, json.RawMessage)
LocalRowLabel returns a detached application row heading selection.
func (View) Localized ¶ added in v0.2.0
Localized reports whether the field stores an independent value for each configured application locale.
func (View) MaxLength ¶ added in v0.2.0
MaxLength returns the maximum accepted Unicode code-point length.
func (View) MaxRows ¶ added in v0.2.0
MaxRows is the maximum accepted length for an array or blocks list, or zero when unbounded.
func (View) MinLength ¶ added in v0.2.0
MinLength returns the minimum accepted Unicode code-point length.
func (View) MinRows ¶ added in v0.2.0
MinRows is the minimum accepted length for an array or blocks list.
func (View) Placeholder ¶ added in v0.2.0
Placeholder returns the canonical empty-state prompt for compatible admin controls.
func (View) PlaceholderTranslations ¶ added in v0.2.0
PlaceholderTranslations returns localized placeholder text by admin language.
func (View) PluginConfig ¶ added in v0.2.0
func (d View) PluginConfig() json.RawMessage
PluginConfig returns a copy of the plugin-owned serialized configuration.
func (View) PluginKey ¶ added in v0.2.0
PluginKey returns the compiled plugin responsible for a custom field.
func (View) PluginReferenceKeys ¶ added in v0.2.0
PluginReferenceKeys returns JSON property names whose string values contain public collection slugs and therefore participate in content renames and persisted reference-shape migration safety.
func (View) Private ¶ added in v0.2.0
Private returns immutable finite owner metadata, never manifest content.
func (View) Provenance ¶ added in v0.2.0
Provenance returns declaration/transform sources for diagnostics.
func (View) ReadOnly ¶ added in v0.2.0
ReadOnly reports whether the admin should prevent editing this field.
func (View) ReferenceDeleteAction ¶ added in v0.2.0
func (d View) ReferenceDeleteAction() ReferenceDeleteAction
ReferenceDeleteAction returns the explicitly authored hard-delete policy. An empty action means config resolution must apply the deterministic default for the reference shape.
func (View) RelationshipFilters ¶ added in v0.2.0
func (d View) RelationshipFilters() []RelationshipFilterRule
RelationshipFilters returns configured multi-rule and polymorphic option filters.
func (View) RelationshipHasMany ¶ added in v0.2.0
RelationshipHasMany reports whether the field stores multiple references.
func (View) RelationshipTarget ¶ added in v0.2.0
RelationshipTarget returns the first configured target slug, or an empty string.
func (View) RelationshipTargets ¶ added in v0.2.0
RelationshipTargets returns a copy of all configured target slugs.
func (View) Required ¶ added in v0.2.0
Required reports whether validation rejects a missing, null, or field-type-specific empty value.
func (View) RowLabel ¶ added in v0.2.0
RowLabel is the child property used to label array rows in the admin.
func (View) RowLabelComponent ¶ added in v0.2.0
func (d View) RowLabelComponent() (pluginKey, component string, config json.RawMessage, ok bool)
RowLabelComponent returns the optional statically registered admin plugin component selected for array or blocks row headings. The returned configuration is detached from the immutable definition.
func (View) RowLabels ¶ added in v0.2.0
RowLabels returns optional singular and plural author-facing array row names.
func (View) SelectDefaults ¶ added in v0.2.0
SelectDefaults returns the configured literal default options for a multi-select. Dynamic defaults are executable policies and are not evaluated by this reader.
func (View) SelectHasMany ¶ added in v0.2.0
SelectHasMany reports whether a select stores an ordered list of options.
func (View) Sidebar ¶ added in v0.2.0
Sidebar reports whether a root field belongs in the document editor's right rail.
func (View) SlugSource ¶ added in v0.2.0
SlugSource returns the source field path for a text-backed slug helper. The boolean distinguishes an invalid empty source from an ordinary text field.
func (View) Step ¶ added in v0.2.0
Step returns the positive admin input increment for a number field. It is presentation metadata and does not impose divisibility validation.
func (View) TabTranslations ¶ added in v0.2.0
TabTranslations returns localized direct-tab labels by admin language.
type Visit ¶ added in v0.2.0
type Visit struct {
Node Node
Branches []BranchSelector
Index int
// Path is the stored schema placement, including block slugs and embedded branches.
Path []string
// DefinitionSlug identifies the nearest shared definition, if any.
DefinitionSlug string
}
Visit carries authored structural breadcrumbs; occurrence binding happens later.