Documentation
¶
Overview ¶
Package blockspec builds the Ridu configuration of the block-heavy benchmark from the framework-neutral JSON spec written by ../spec.ts. The serving fixture (../ridu) and the migration-planning probe (../planning) share it, so both measure the same schema.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Field ¶
type Field struct {
Type string `json:"type"`
Name string `json:"name"`
Required bool `json:"required,omitempty"`
Options []string `json:"options,omitempty"`
RelationTo string `json:"relationTo,omitempty"`
Fields []Field `json:"fields,omitempty"`
Blocks []string `json:"blocks,omitempty"`
}
Field is one field of a block or resource.
type Resource ¶
type Resource struct {
Slug string `json:"slug"`
Drafts bool `json:"drafts"`
Fields []Field `json:"fields"`
}
Resource is a collection or global.
type Spec ¶
type Spec struct {
Scenario string `json:"scenario"`
References bool `json:"references"`
// Hooks gives the first text field of every leaf block executable behavior; see hookedField.
Hooks bool `json:"hooks"`
Blocks []Block `json:"blocks"`
Collections []Resource `json:"collections"`
Globals []Resource `json:"globals"`
}
Spec is one scenario and declaration variant.
Click to show internal directories.
Click to hide internal directories.