Documentation
¶
Index ¶
- func ApplyLaneAction(src *task.Task, action LaneAction, currentUser string) (*task.Task, error)
- func SortTasks(tasks []*task.Task, rules []SortRule)
- type ActionField
- type ActionOperator
- type BasePlugin
- type DokiPlugin
- type LaneAction
- type LaneActionOp
- type Plugin
- type PluginAction
- type PluginActionConfig
- type PluginLaneConfig
- type SortRule
- type TikiLane
- type TikiPlugin
- type WorkflowFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyLaneAction ¶ added in v0.1.2
ApplyLaneAction applies a parsed action to a task clone.
Types ¶
type ActionField ¶ added in v0.0.4
type ActionField string
ActionField identifies a supported action field.
const ( ActionFieldStatus ActionField = "status" ActionFieldType ActionField = "type" ActionFieldPriority ActionField = "priority" ActionFieldAssignee ActionField = "assignee" ActionFieldPoints ActionField = "points" ActionFieldTags ActionField = "tags" )
type ActionOperator ¶ added in v0.0.4
type ActionOperator string
ActionOperator identifies a supported action operator.
const ( ActionOperatorAssign ActionOperator = "=" ActionOperatorAdd ActionOperator = "+=" ActionOperatorRemove ActionOperator = "-=" )
type BasePlugin ¶
type BasePlugin struct {
Name string // display name shown in caption
Key tcell.Key // tcell key constant (e.g. KeyCtrlH)
Rune rune // printable character (e.g. 'L')
Modifier tcell.ModMask // modifier keys (Alt, Shift, Ctrl, etc.)
Foreground tcell.Color // caption text color
Background tcell.Color // caption background color
FilePath string // source file path (for error messages)
ConfigIndex int // index in workflow.yaml views array (-1 if not from a config file)
Type string // plugin type: "tiki" or "doki"
Default bool // true if this view should open on startup
}
BasePlugin holds the common fields for all plugins
func (*BasePlugin) GetActivationKey ¶
func (*BasePlugin) GetConfigIndex ¶
func (p *BasePlugin) GetConfigIndex() int
func (*BasePlugin) GetFilePath ¶
func (p *BasePlugin) GetFilePath() string
func (*BasePlugin) GetName ¶
func (p *BasePlugin) GetName() string
func (*BasePlugin) GetType ¶
func (p *BasePlugin) GetType() string
func (*BasePlugin) IsDefault ¶ added in v0.1.3
func (p *BasePlugin) IsDefault() bool
type DokiPlugin ¶
type DokiPlugin struct {
BasePlugin
Fetcher string // "file" or "internal"
Text string // content text (for internal)
URL string // resource URL (for file)
}
DokiPlugin is a documentation-based plugin
type LaneAction ¶ added in v0.1.2
type LaneAction struct {
Ops []LaneActionOp
}
LaneAction represents parsed lane actions.
func ParseLaneAction ¶ added in v0.1.2
func ParseLaneAction(input string) (LaneAction, error)
ParseLaneAction parses a lane action string into operations.
type LaneActionOp ¶ added in v0.1.2
type LaneActionOp struct {
Field ActionField
Operator ActionOperator
StrValue string
IntValue int
Tags []string
}
LaneActionOp represents a single action operation.
type Plugin ¶
type Plugin interface {
GetName() string
GetActivationKey() (tcell.Key, rune, tcell.ModMask)
GetFilePath() string
GetConfigIndex() int
GetType() string
IsDefault() bool
}
Plugin interface defines the common methods for all plugins
func DefaultPlugin ¶ added in v0.1.3
DefaultPlugin returns the first plugin marked as default, or the first plugin in the list if none are marked. The caller must ensure plugins is non-empty.
func LoadPlugins ¶
LoadPlugins loads all plugins from workflow.yaml files: user config (base) + project config (overrides). Files are discovered via config.FindWorkflowFiles() which returns user config first, then project config. Plugins from later files override same-named plugins from earlier files via field merging. Returns an error when workflow files were found but no valid plugins could be loaded.
type PluginAction ¶ added in v0.1.2
type PluginAction struct {
Rune rune
Label string
Action LaneAction
}
PluginAction represents a parsed shortcut action bound to a key.
type PluginActionConfig ¶ added in v0.1.2
type PluginActionConfig struct {
Key string `yaml:"key" mapstructure:"key"`
Label string `yaml:"label" mapstructure:"label"`
Action string `yaml:"action" mapstructure:"action"`
}
PluginActionConfig represents a shortcut action in YAML or config definitions.
type PluginLaneConfig ¶ added in v0.1.2
type PluginLaneConfig struct {
Name string `yaml:"name" mapstructure:"name"`
Columns int `yaml:"columns" mapstructure:"columns"`
Filter string `yaml:"filter" mapstructure:"filter"`
Action string `yaml:"action" mapstructure:"action"`
}
PluginLaneConfig represents a lane in YAML or config definitions.
type SortRule ¶
type SortRule struct {
Field string // "Assignee", "Points", "Priority", "CreatedAt", "UpdatedAt", "Status", "Type", "Title"
Descending bool // true for DESC, false for ASC (default)
}
SortRule represents a single sort criterion
type TikiLane ¶ added in v0.1.2
type TikiLane struct {
Name string
Columns int
Filter filter.FilterExpr
Action LaneAction
}
TikiLane represents a parsed lane definition.
type TikiPlugin ¶
type TikiPlugin struct {
BasePlugin
Lanes []TikiLane // lane definitions for this plugin
Sort []SortRule // parsed sort rules (nil = default sort)
ViewMode string // default view mode: "compact" or "expanded" (empty = compact)
Actions []PluginAction // shortcut actions applied to the selected task
}
TikiPlugin is a task-based plugin (like default Kanban board)
type WorkflowFile ¶ added in v0.1.2
type WorkflowFile struct {
Plugins []pluginFileConfig `yaml:"views"`
}
WorkflowFile represents the YAML structure of a workflow.yaml file