type

Field

The resolved contract for one field.

Properties

PropertyTypeDescription
IDStableIDThe ID value.
NamestringThe Name value.
Pathquery.PathThe Path value.
TypeFieldTypeThe Type value.
CategoryFieldCategoryThe Category value.
RequiredboolThe Required value.
UniqueboolThe Unique value.
IndexboolThe Index value.
LocalizedboolThe Localized value.
QueryRestrictedboolQueryRestricted records an attached read policy's static prohibition on caller filtering, sorting and distinct queries. It is not an access verdict.
Default*stringThe Default value.
DynamicDefaultboolDynamicDefault permits omitted input to reach server initialization. It does not contain executable code or promise that the callback supplies a value.
LiveValidationboolLiveValidation enables explicit advisory server feedback without serializing callbacks.
AdminFieldAdminThe Admin value.
Text*TextFieldThe Text value.
Textarea*TextFieldThe Textarea value.
Code*CodeFieldThe Code value.
Number*NumberFieldThe Number value.
Date*DateFieldThe Date value.
Select*SelectFieldThe Select value.
Point*PointFieldThe Point value.
UI*UIFieldThe UI value.
Join*JoinFieldThe Join value.
Virtual*VirtualFieldThe Virtual value.
Relationship*RelationshipFieldThe Relationship value.
List*PrimitiveListFieldItem-count constraints for text and number lists; Text or Number carries their element constraints.
Upload*UploadFieldThe Upload value.
Nested*NestedFieldThe Nested value.
Blocks*BlocksFieldThe Blocks value.
Plugin*PluginFieldThe Plugin value.

How it works

Typed kinds carry their matching detail: Text, Textarea, Code, Number, Date, Select, Point, UI, Join, Virtual, Relationship, Upload, Nested, Blocks, or Plugin. Primitive lists carry List plus Text or Number for element constraints. Checkbox, email, and simple JSON fields need no extra detail.

Full signature

type Field struct { ID StableID `json:"id"` Name string `json:"name"` Path query.Path `json:"path"` Type FieldType `json:"type"` Category FieldCategory `json:"category"` Required bool `json:"required"` Unique bool `json:"unique"` Index bool `json:"index,omitempty"` Localized bool `json:"localized,omitempty"` // QueryRestricted records an attached read policy's static prohibition on // caller filtering, sorting and distinct queries. It is not an access verdict. QueryRestricted bool `json:"queryRestricted,omitempty"` Default *string `json:"default,omitempty"` // DynamicDefault permits omitted input to reach server initialization. It does // not contain executable code or promise that the callback supplies a value. DynamicDefault bool `json:"dynamicDefault,omitempty"` // LiveValidation enables explicit advisory server feedback without serializing callbacks. LiveValidation bool `json:"liveValidation,omitempty"` Admin FieldAdmin `json:"admin"` Text *TextField `json:"text,omitempty"` Textarea *TextField `json:"textarea,omitempty"` Code *CodeField `json:"code,omitempty"` Number *NumberField `json:"number,omitempty"` Date *DateField `json:"date,omitempty"` Select *SelectField `json:"select,omitempty"` Point *PointField `json:"point,omitempty"` UI *UIField `json:"ui,omitempty"` Join *JoinField `json:"join,omitempty"` Virtual *VirtualField `json:"virtual,omitempty"` Relationship *RelationshipField `json:"relationship,omitempty"` List *PrimitiveListField `json:"list,omitempty"` Upload *UploadField `json:"upload,omitempty"` Nested *NestedField `json:"nested,omitempty"` Blocks *BlocksField `json:"blocks,omitempty"` Plugin *PluginField `json:"plugin,omitempty"` }

Source schema/manifest.go:344