Expand description
The Didbot namespace a document is written against: the entity types,
the four actions with their contexts, and the per-collection record
shapes that give context.value and context.existing a type.
One Cedar schema cannot type context.value differently per
collection, since a context type belongs to an action. So there is one
schema per described collection, each the same namespace with
record.write’s context carrying that collection’s record type, plus a
base schema with no record type at all for statements that never touch
record.write. crate::Document::load picks which to validate a
statement against.
Structs§
- Described 🔒
- Field
- One field of a record shape.
- Shape
- The fields a collection’s records carry, as a closed Cedar record type.
- Shape
Error - A shape that does not make a Cedar schema.
- Shapes
- The collections this engine knows the shape of, each with the schema that shape produces, plus the base schema for everything else.
Enums§
- Action
Name - The actions a document can forbid, one per gate.
- Field
Type - The Cedar type of one record field.
Constants§
- NAMESPACE
- The Cedar namespace every type and action lives in.
Functions§
- schema_
json - The schema
schema_textwrites, in Cedar’s JSON schema format: its entity types with their attributes, and its actions with what each applies to. For a tool that reads the schema’s parts, not its text. - schema_
text - The schema text for the namespace, with
record.write’s context typed forrecordwhen there is one. - uid 🔒
- Build an entity reference in the
Didbotnamespace.