collectiontype

package
v0.4.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package collectiontype is the built-in `collection` meta-type — the shape of collection objects. A collection is a type without parts: property definitions only, what an object is filed under rather than what it is. An object has one type (`any.type`) and any number of collections (`any.collections`).

Directory is internal/types/collection/; the package is declared `collectiontype` to sit next to `typetype`.

A collection object owns the same `properties` and `shortIds` datasets a type object does (typetype.PropertyHandler serves both); it never writes the `datasets` dataset.

Index

Constants

View Source
const (
	MetaMarker = "__collection__"
	TypeId     = "collection"
)

MetaMarker is the reserved value every collection object carries in `any.type`; TypeId is the meta-collection's id — the namespace its collection-only values live under (`record.collection.xkey`) and the id surfaced through Space.Collections(). Both reserved, like the meta-type's pair (typetype.MetaTypeMarker / typetype.TypeId).

View Source
const (
	Name        = "Collection"
	Description = "A collection — defines properties for the objects filed under it"
)

Display metadata for the `collection` meta-type object.

View Source
const WellKnownDeriveSeed = "builtin:collection"

WellKnownDeriveSeed mints the same `collection` meta-type object id on every peer.

Variables

View Source
var Properties = []typetype.BuiltInProperty{
	{Id: typetype.FieldXKeyProp, Name: "XKey", Kind: schema.KindString, Scope: schema.ScopeSynced,
		Description: "Programmatic handle of the collection; consumers keep it unique per space."},
	{Id: typetype.FieldHiddenProp, Name: "Hidden", Kind: schema.KindBoolean, Scope: schema.ScopeSynced,
		Description: "Keeps the collection out of default listings and pickers.",
		XFormat:     map[string]any{"type": "checkbox"}},
	{Id: typetype.FieldMetaProp, Name: "Meta", Kind: schema.KindObject, Scope: schema.ScopeSynced,
		Description: "Consumer flags, one scalar per key."},
}

Properties lists the meta-collection's hardcoded property definitions: the type-side subset that describes a definition rather than how its objects render — the handle, the listing flag and the consumer flag bag. Same field ids as the meta-type's, so the two namespaces read alike.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL