plugin

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortTasks

func SortTasks(tasks []*task.Task, rules []SortRule)

SortTasks sorts tasks according to the given sort rules

Types

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 config.yaml plugins array (-1 if embedded/not in config)
	Type        string        // plugin type: "tiki" or "doki"
}

BasePlugin holds the common fields for all plugins

func (*BasePlugin) GetActivationKey

func (p *BasePlugin) GetActivationKey() (tcell.Key, rune, tcell.ModMask)

func (*BasePlugin) GetBackground

func (p *BasePlugin) GetBackground() tcell.Color

func (*BasePlugin) GetConfigIndex

func (p *BasePlugin) GetConfigIndex() int

func (*BasePlugin) GetFilePath

func (p *BasePlugin) GetFilePath() string

func (*BasePlugin) GetForeground

func (p *BasePlugin) GetForeground() tcell.Color

func (*BasePlugin) GetName

func (p *BasePlugin) GetName() string

func (*BasePlugin) GetType

func (p *BasePlugin) GetType() string

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 Plugin

type Plugin interface {
	GetName() string
	GetActivationKey() (tcell.Key, rune, tcell.ModMask)
	GetForeground() tcell.Color
	GetBackground() tcell.Color
	GetFilePath() string
	GetConfigIndex() int
	GetType() string
}

Plugin interface defines the common methods for all plugins

func LoadPlugins

func LoadPlugins() ([]Plugin, error)

LoadPlugins loads all plugins: embedded defaults (Recent, Roadmap) plus configured plugins from config.yaml Configured plugins with the same name as embedded plugins will be merged (configured fields override embedded)

type PluginRef

type PluginRef struct {
	// File reference (for file-based and hybrid modes)
	File string `mapstructure:"file"`

	// Inline definition fields (for inline and hybrid modes)
	Name       string `mapstructure:"name"`
	Foreground string `mapstructure:"foreground"`
	Background string `mapstructure:"background"`
	Key        string `mapstructure:"key"`
	Filter     string `mapstructure:"filter"`
	Sort       string `mapstructure:"sort"`
	View       string `mapstructure:"view"`
	Type       string `mapstructure:"type"`
	Fetcher    string `mapstructure:"fetcher"`
	Text       string `mapstructure:"text"`
	URL        string `mapstructure:"url"`
}

PluginRef is the entry in config.yaml that references a plugin file or defines it inline

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

func ParseSort

func ParseSort(expr string) ([]SortRule, error)

ParseSort parses a sort expression like "Assignee, Points DESC, Priority DESC, CreatedAt"

type TikiPlugin

type TikiPlugin struct {
	BasePlugin
	Filter   filter.FilterExpr // parsed filter expression AST (nil = no filtering)
	Sort     []SortRule        // parsed sort rules (nil = default sort)
	ViewMode string            // default view mode: "compact" or "expanded" (empty = compact)
}

TikiPlugin is a task-based plugin (like default Kanban board)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL