Documentation
¶
Index ¶
- Constants
- func DecodeFieldDefinitionInto(data *FieldDefinition, sub *cst.Value) error
- func DecodeReferencesConfigInto(data *ReferencesConfig, sub *cst.Value) error
- func DecodeTomlV0Into(data *TomlV0, sub *cst.Value) error
- func DecodeTomlV1Into(data *TomlV1, sub *cst.Value) error
- func DecodeTomlV2Into(data *TomlV2, sub *cst.Value) error
- func EncodeFieldDefinitionFrom(data *FieldDefinition, doc *document.Document, container *cst.Node) error
- func EncodeReferencesConfigFrom(data *ReferencesConfig, doc *document.Document, container *cst.Node) error
- func EncodeTomlV0From(data *TomlV0, doc *document.Document, container *cst.Node) error
- func EncodeTomlV1From(data *TomlV1, doc *document.Document, container *cst.Node) error
- func EncodeTomlV2From(data *TomlV2, doc *document.Document, container *cst.Node) error
- type Blob
- type FieldDefinition
- type FieldDefinitionDocument
- func (d *FieldDefinitionDocument) Comment(key string) string
- func (d *FieldDefinitionDocument) Data() *FieldDefinition
- func (d *FieldDefinitionDocument) Encode() ([]byte, error)
- func (d *FieldDefinitionDocument) InlineComment(key string) string
- func (d *FieldDefinitionDocument) SetComment(key, comment string)
- func (d *FieldDefinitionDocument) SetInlineComment(key, comment string)
- func (d *FieldDefinitionDocument) Undecoded() []string
- type ReferencesConfig
- type ReferencesConfigDocument
- func (d *ReferencesConfigDocument) Comment(key string) string
- func (d *ReferencesConfigDocument) Data() *ReferencesConfig
- func (d *ReferencesConfigDocument) Encode() ([]byte, error)
- func (d *ReferencesConfigDocument) InlineComment(key string) string
- func (d *ReferencesConfigDocument) SetComment(key, comment string)
- func (d *ReferencesConfigDocument) SetInlineComment(key, comment string)
- func (d *ReferencesConfigDocument) Undecoded() []string
- type TomlV0
- func (blob *TomlV0) GetBinary() bool
- func (blob *TomlV0) GetFileExtension() string
- func (blob *TomlV0) GetFormatterUTIGroups() map[string]UTIGroup
- func (blob *TomlV0) GetFormatters() map[string]script_config.WithOutputFormat
- func (blob *TomlV0) GetMimeType() string
- func (blob *TomlV0) GetReferences() *ReferencesConfig
- func (blob *TomlV0) GetStringLuaHooks() string
- func (blob *TomlV0) GetVimSyntaxType() string
- func (blob *TomlV0) Reset()
- type TomlV0Document
- func (d *TomlV0Document) Comment(key string) string
- func (d *TomlV0Document) Data() *TomlV0
- func (d *TomlV0Document) Encode() ([]byte, error)
- func (d *TomlV0Document) InlineComment(key string) string
- func (d *TomlV0Document) SetComment(key, comment string)
- func (d *TomlV0Document) SetInlineComment(key, comment string)
- func (d *TomlV0Document) Undecoded() []string
- type TomlV1
- func (blob *TomlV1) GetBinary() bool
- func (blob *TomlV1) GetFileExtension() string
- func (blob *TomlV1) GetFormatterUTIGroups() map[string]UTIGroup
- func (blob *TomlV1) GetFormatters() map[string]script_config.WithOutputFormat
- func (blob *TomlV1) GetMimeType() string
- func (blob *TomlV1) GetReferences() *ReferencesConfig
- func (blob *TomlV1) GetStringLuaHooks() string
- func (blob *TomlV1) GetVimSyntaxType() string
- func (blob *TomlV1) Reset()
- type TomlV1Document
- func (d *TomlV1Document) Comment(key string) string
- func (d *TomlV1Document) Data() *TomlV1
- func (d *TomlV1Document) Encode() ([]byte, error)
- func (d *TomlV1Document) InlineComment(key string) string
- func (d *TomlV1Document) SetComment(key, comment string)
- func (d *TomlV1Document) SetInlineComment(key, comment string)
- func (d *TomlV1Document) Undecoded() []string
- type TomlV2
- func (blob *TomlV2) GetBinary() bool
- func (blob *TomlV2) GetFieldDefinitions() []FieldDefinition
- func (blob *TomlV2) GetFieldsReader() *script_config.ScriptConfig
- func (blob *TomlV2) GetFieldsWriter() *script_config.ScriptConfig
- func (blob *TomlV2) GetFileExtension() string
- func (blob *TomlV2) GetFormatterUTIGroups() map[string]UTIGroup
- func (blob *TomlV2) GetFormatters() map[string]script_config.WithOutputFormat
- func (blob *TomlV2) GetMimeType() string
- func (blob *TomlV2) GetReferences() *ReferencesConfig
- func (blob *TomlV2) GetStringLuaHooks() string
- func (blob *TomlV2) GetVimSyntaxType() string
- func (blob *TomlV2) Reset()
- type TomlV2Document
- func (d *TomlV2Document) Comment(key string) string
- func (d *TomlV2Document) Data() *TomlV2
- func (d *TomlV2Document) Encode() ([]byte, error)
- func (d *TomlV2Document) InlineComment(key string) string
- func (d *TomlV2Document) SetComment(key, comment string)
- func (d *TomlV2Document) SetInlineComment(key, comment string)
- func (d *TomlV2Document) Undecoded() []string
- type UTIGroup
- type WithFields
- type WithFormatterUTIGroups
- type WithFormatters
- type WithReferences
- type WithStringLuaHooks
Constants ¶
const ArchiveTag = "zz-archive"
ArchiveTag is the tag the built-in actionable hooks add to archive an object on a terminal status. Genesis seeds it into the dormant index (when the built-in actionable types are included) so a carrying object becomes dormant. The "zz-" prefix follows the repo's archive-tag convention and keeps it sorted last.
COUPLING: the "zz-archive" string literal in the blob-backed actionable-common.lua module (romeo/local_working_copy/embedded/actionable/actionable-common.lua) MUST match this const. The archive logic lives in that lua module now (delivered as a blob reference on the actionable type objects); this const is still used by genesis to seed the dormant index.
Variables ¶
This section is empty.
Functions ¶
func DecodeFieldDefinitionInto ¶
func DecodeFieldDefinitionInto(data *FieldDefinition, sub *cst.Value) error
func DecodeReferencesConfigInto ¶
func DecodeReferencesConfigInto(data *ReferencesConfig, sub *cst.Value) error
func EncodeFieldDefinitionFrom ¶
func EncodeReferencesConfigFrom ¶
func EncodeTomlV0From ¶
func EncodeTomlV1From ¶
Types ¶
type Blob ¶
type Blob interface {
GetFileExtension() string
GetBinary() bool
GetMimeType() string
GetVimSyntaxType() string
WithFormatters
WithFormatterUTIGroups
WithStringLuaHooks
WithReferences
}
type FieldDefinition ¶
type FieldDefinition struct {
Name string `toml:"name"`
Kind string `toml:"kind"`
Values []string `toml:"values,omitempty"`
Default string `toml:"default,omitempty"`
// Required rejects commits whose projected value for this field is
// missing or empty, and rejects blobless commits of the declaring type
// entirely (see oscar/store tryReadFields). omitempty keeps existing
// blobs byte-identical: absent stays absent, false is never emitted.
Required bool `toml:"required,omitempty"`
}
func (*FieldDefinition) ToDefinition ¶
func (fd *FieldDefinition) ToDefinition() fields.Definition
type FieldDefinitionDocument ¶
type FieldDefinitionDocument struct {
// contains filtered or unexported fields
}
func DecodeFieldDefinition ¶
func DecodeFieldDefinition(input []byte) (*FieldDefinitionDocument, error)
func (*FieldDefinitionDocument) Comment ¶
func (d *FieldDefinitionDocument) Comment(key string) string
func (*FieldDefinitionDocument) Data ¶
func (d *FieldDefinitionDocument) Data() *FieldDefinition
func (*FieldDefinitionDocument) Encode ¶
func (d *FieldDefinitionDocument) Encode() ([]byte, error)
func (*FieldDefinitionDocument) InlineComment ¶
func (d *FieldDefinitionDocument) InlineComment(key string) string
func (*FieldDefinitionDocument) SetComment ¶
func (d *FieldDefinitionDocument) SetComment(key, comment string)
func (*FieldDefinitionDocument) SetInlineComment ¶
func (d *FieldDefinitionDocument) SetInlineComment(key, comment string)
func (*FieldDefinitionDocument) Undecoded ¶
func (d *FieldDefinitionDocument) Undecoded() []string
type ReferencesConfig ¶
type ReferencesConfig struct {
script_config.ScriptConfig
Optional bool `toml:"optional,omitempty"`
}
type ReferencesConfigDocument ¶
type ReferencesConfigDocument struct {
// contains filtered or unexported fields
}
func DecodeReferencesConfig ¶
func DecodeReferencesConfig(input []byte) (*ReferencesConfigDocument, error)
func (*ReferencesConfigDocument) Comment ¶
func (d *ReferencesConfigDocument) Comment(key string) string
func (*ReferencesConfigDocument) Data ¶
func (d *ReferencesConfigDocument) Data() *ReferencesConfig
func (*ReferencesConfigDocument) Encode ¶
func (d *ReferencesConfigDocument) Encode() ([]byte, error)
func (*ReferencesConfigDocument) InlineComment ¶
func (d *ReferencesConfigDocument) InlineComment(key string) string
func (*ReferencesConfigDocument) SetComment ¶
func (d *ReferencesConfigDocument) SetComment(key, comment string)
func (*ReferencesConfigDocument) SetInlineComment ¶
func (d *ReferencesConfigDocument) SetInlineComment(key, comment string)
func (*ReferencesConfigDocument) Undecoded ¶
func (d *ReferencesConfigDocument) Undecoded() []string
type TomlV0 ¶
type TomlV0 struct {
InlineBlob bool `toml:"inline-akte,omitempty"`
Archived bool `toml:"archived,omitempty"`
FileExtension string `toml:"file-extension,omitempty"`
ExecCommand *script_config.ScriptConfig `toml:"exec-command,omitempty"`
VimSyntaxType string `toml:"vim-syntax-type"`
// TODO-P4 rename to uti-groups
FormatterUTIGroups map[string]UTIGroup `toml:"formatter-uti-groups"`
Formatters map[string]script_config.WithOutputFormat `toml:"formatters,omitempty"`
Actions map[string]script_config.ScriptConfig `toml:"actions,omitempty"`
Hooks string `toml:"hooks"`
}
func (*TomlV0) GetFormatterUTIGroups ¶
func (*TomlV0) GetFormatters ¶
func (blob *TomlV0) GetFormatters() map[string]script_config.WithOutputFormat
func (*TomlV0) GetReferences ¶
func (blob *TomlV0) GetReferences() *ReferencesConfig
type TomlV0Document ¶
type TomlV0Document struct {
// contains filtered or unexported fields
}
func DecodeTomlV0 ¶
func DecodeTomlV0(input []byte) (*TomlV0Document, error)
func (*TomlV0Document) Comment ¶
func (d *TomlV0Document) Comment(key string) string
func (*TomlV0Document) Data ¶
func (d *TomlV0Document) Data() *TomlV0
func (*TomlV0Document) Encode ¶
func (d *TomlV0Document) Encode() ([]byte, error)
func (*TomlV0Document) InlineComment ¶
func (d *TomlV0Document) InlineComment(key string) string
func (*TomlV0Document) SetComment ¶
func (d *TomlV0Document) SetComment(key, comment string)
func (*TomlV0Document) SetInlineComment ¶
func (d *TomlV0Document) SetInlineComment(key, comment string)
func (*TomlV0Document) Undecoded ¶
func (d *TomlV0Document) Undecoded() []string
type TomlV1 ¶
type TomlV1 struct {
Binary bool `toml:"binary,omitempty"`
FileExtension string `toml:"file-extension,omitempty"`
MimeType string `toml:"mime-type,omitempty"`
ExecCommand *script_config.ScriptConfig `toml:"exec-command,omitempty"`
VimSyntaxType string `toml:"vim-syntax-type"`
UTIGroups map[string]UTIGroup `toml:"uti-groups"`
Formatters map[string]script_config.WithOutputFormat `toml:"formatters,omitempty"`
Hooks string `toml:"hooks"`
References *ReferencesConfig `toml:"references,omitempty"`
}
func (*TomlV1) GetFormatterUTIGroups ¶
func (*TomlV1) GetFormatters ¶
func (blob *TomlV1) GetFormatters() map[string]script_config.WithOutputFormat
func (*TomlV1) GetReferences ¶
func (blob *TomlV1) GetReferences() *ReferencesConfig
type TomlV1Document ¶
type TomlV1Document struct {
// contains filtered or unexported fields
}
func DecodeTomlV1 ¶
func DecodeTomlV1(input []byte) (*TomlV1Document, error)
func (*TomlV1Document) Comment ¶
func (d *TomlV1Document) Comment(key string) string
func (*TomlV1Document) Data ¶
func (d *TomlV1Document) Data() *TomlV1
func (*TomlV1Document) Encode ¶
func (d *TomlV1Document) Encode() ([]byte, error)
func (*TomlV1Document) InlineComment ¶
func (d *TomlV1Document) InlineComment(key string) string
func (*TomlV1Document) SetComment ¶
func (d *TomlV1Document) SetComment(key, comment string)
func (*TomlV1Document) SetInlineComment ¶
func (d *TomlV1Document) SetInlineComment(key, comment string)
func (*TomlV1Document) Undecoded ¶
func (d *TomlV1Document) Undecoded() []string
type TomlV2 ¶
type TomlV2 struct {
Binary bool `toml:"binary,omitempty"`
FileExtension string `toml:"file-extension,omitempty"`
MimeType string `toml:"mime-type,omitempty"`
ExecCommand *script_config.ScriptConfig `toml:"exec-command,omitempty"`
VimSyntaxType string `toml:"vim-syntax-type"`
UTIGroups map[string]UTIGroup `toml:"uti-groups"`
Formatters map[string]script_config.WithOutputFormat `toml:"formatters,omitempty"`
Hooks string `toml:"hooks"`
References *ReferencesConfig `toml:"references,omitempty"`
Fields []FieldDefinition `toml:"fields,omitempty"`
FieldsReader *script_config.ScriptConfig `toml:"fields-reader,omitempty"`
FieldsWriter *script_config.ScriptConfig `toml:"fields-writer,omitempty"`
}
func DefaultChoreType ¶
func DefaultChoreType() TomlV2
DefaultChoreType returns the built-in !chore type blob. !chore is a recurring actionable type, so it carries the recurrence field on top of the actionable triple; calendar-to-type binding stays a workspace config concern (the CalDAV haustoria's tasks calendar binds to !task and chores binds to !chore). Future !actionable abstract type will replace the duplication.
func DefaultHabitType ¶ added in v0.2.7
func DefaultHabitType() TomlV2
DefaultHabitType returns the built-in !habit type blob. It is structurally identical to !chore (the recurring field set + recurring reader/writer) and shares the actionable recurrence hook; the semantic distinction (a consistency practice vs a periodic obligation) surfaces in the per-instance recurrence cadence and the type description, not in the field schema.
func DefaultTaskType ¶
func DefaultTaskType() TomlV2
DefaultTaskType returns the built-in !task type blob, used by genesis when BigBang.IncludeBuiltinActionableTypes is set. !task instances are stored as TOML blobs mirroring the field values; the reader script projects them into the index on commit, the writer script projects user edits back into the blob during organize mutations. The CalDAV haustoria emits these blobs directly during compile.
func DefaultWithPandocFormatter ¶
func DefaultWithPandocFormatter() TomlV2
DefaultWithPandocFormatter is the builtin pandoc-backed !md type blob. Its formatters split into two pipelines: the EDIT pipeline (dodder-edit.lua: typed code blocks are normalized inline as text — safe for checkout/editing and for any type, used by text/html/html-gdoc/pdf-beamer) and the RENDER pipeline (dodder-render.lua: typed code blocks are replaced with rendered images via `dodder format-object -stdin png <type>`, so the referenced type must ship a png formatter — used by text-render/html-partial). The output-flavored html/html-gdoc formatters deliberately stay on the edit filter: builtin types ship no png formatter, so the render filter would hard-fail any document embedding a builtin-typed code block, and its image-file side effects don't fit stdout-pipe formatters.
func (*TomlV2) GetFieldDefinitions ¶
func (blob *TomlV2) GetFieldDefinitions() []FieldDefinition
func (*TomlV2) GetFieldsReader ¶
func (blob *TomlV2) GetFieldsReader() *script_config.ScriptConfig
func (*TomlV2) GetFieldsWriter ¶
func (blob *TomlV2) GetFieldsWriter() *script_config.ScriptConfig
func (*TomlV2) GetFormatterUTIGroups ¶
func (*TomlV2) GetFormatters ¶
func (blob *TomlV2) GetFormatters() map[string]script_config.WithOutputFormat
func (*TomlV2) GetReferences ¶
func (blob *TomlV2) GetReferences() *ReferencesConfig
type TomlV2Document ¶
type TomlV2Document struct {
// contains filtered or unexported fields
}
func DecodeTomlV2 ¶
func DecodeTomlV2(input []byte) (*TomlV2Document, error)
func (*TomlV2Document) Comment ¶
func (d *TomlV2Document) Comment(key string) string
func (*TomlV2Document) Data ¶
func (d *TomlV2Document) Data() *TomlV2
func (*TomlV2Document) Encode ¶
func (d *TomlV2Document) Encode() ([]byte, error)
func (*TomlV2Document) InlineComment ¶
func (d *TomlV2Document) InlineComment(key string) string
func (*TomlV2Document) SetComment ¶
func (d *TomlV2Document) SetComment(key, comment string)
func (*TomlV2Document) SetInlineComment ¶
func (d *TomlV2Document) SetInlineComment(key, comment string)
func (*TomlV2Document) Undecoded ¶
func (d *TomlV2Document) Undecoded() []string
type UTIGroup ¶
type WithFields ¶
type WithFields interface {
GetFieldDefinitions() []FieldDefinition
GetFieldsReader() *script_config.ScriptConfig
GetFieldsWriter() *script_config.ScriptConfig
}
type WithFormatterUTIGroups ¶
type WithFormatters ¶
type WithFormatters interface {
GetFormatters() map[string]script_config.WithOutputFormat
}
type WithReferences ¶
type WithReferences interface {
GetReferences() *ReferencesConfig
}
Source Files
¶
- field_definition.go
- field_definition_tommy.go
- main.go
- references_config.go
- references_config_tommy.go
- toml_v0.go
- toml_v0_tommy.go
- toml_v1.go
- toml_v1_tommy.go
- toml_v2.go
- toml_v2_tommy.go
- uti_group.go