Documentation
¶
Index ¶
- func DecodeFieldDefinitionInto(data *FieldDefinition, doc *document.Document, container *cst.Node, ...) error
- func DecodeReferencesConfigInto(data *ReferencesConfig, doc *document.Document, container *cst.Node, ...) error
- func DecodeTomlV0Into(data *TomlV0, doc *document.Document, container *cst.Node, ...) error
- func DecodeTomlV1Into(data *TomlV1, doc *document.Document, container *cst.Node, ...) error
- func DecodeTomlV2Into(data *TomlV2, doc *document.Document, container *cst.Node, ...) 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 ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeFieldDefinitionInto ¶
func DecodeReferencesConfigInto ¶
func DecodeTomlV0Into ¶
func DecodeTomlV1Into ¶
func DecodeTomlV2Into ¶
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"`
}
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. Same field set as !task; 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 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 (*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