config

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Repository  string       `yaml:"repository"`
	Preferences *Preferences `yaml:"preferences,omitempty"` // User preferences (optional)
	Groups      []Group      `yaml:"groups,omitempty"`
	// contains filtered or unexported fields
}

func LoadFromPath added in v0.3.0

func LoadFromPath(path string) (*Config, error)

LoadFromPath loads a config from a specific path

func LoadMerged added in v0.3.1

func LoadMerged(paths []string) (*Config, error)

LoadMerged loads and merges configuration from multiple paths. Paths should be provided in order of precedence (lowest to highest). Later configs overwrite earlier ones.

func (*Config) GetAllPinnedWorkflows

func (c *Config) GetAllPinnedWorkflows() []PinnedWorkflow

func (*Config) GetConfigPath added in v0.3.0

func (c *Config) GetConfigPath() string

GetConfigPath returns the path to this config file

func (*Config) GetRefreshInterval added in v0.3.0

func (c *Config) GetRefreshInterval() int

GetRefreshInterval returns the refresh interval from preferences

func (*Config) Merge added in v0.3.1

func (c *Config) Merge(other *Config)

Merge merges another config into this one. Fields from 'other' take precedence over this config.

func (*Config) Save

func (c *Config) Save(path string) error

func (*Config) SaveToRepoDefault added in v0.3.0

func (c *Config) SaveToRepoDefault(p *paths.Paths) error

SaveToRepoDefault saves the config to the repository default location

func (*Config) SaveToUserConfig added in v0.3.0

func (c *Config) SaveToUserConfig(p *paths.Paths) error

SaveToUserConfig saves the config to the user's config file

func (*Config) SaveWithHeader added in v0.3.0

func (c *Config) SaveWithHeader(path string, includeHeader bool) error

SaveWithHeader saves the config with an optional header

func (*Config) SetRefreshInterval added in v0.3.0

func (c *Config) SetRefreshInterval(interval int)

SetRefreshInterval sets the refresh interval in preferences

func (*Config) Validate

func (c *Config) Validate() error

type Group

type Group struct {
	ID               string     `yaml:"id"`
	Name             string     `yaml:"name"`
	Description      string     `yaml:"description,omitempty"`
	Workflows        []string   `yaml:"workflows,omitempty"`
	WorkflowDefs     []Workflow `yaml:"workflowDefs,omitempty"`
	WorkflowPatterns []string   `yaml:"workflowPatterns,omitempty"`
	Jobs             []string   `yaml:"jobs,omitempty"`
	Groups           []Group    `yaml:"groups,omitempty"`
	PinnedWorkflows  []string   `yaml:"pinnedWorkflows,omitempty"`
}

func (*Group) GetAllWorkflows

func (g *Group) GetAllWorkflows() []string

func (*Group) GetWorkflowDef

func (g *Group) GetWorkflowDef(filename string) *Workflow

func (*Group) HasWorkflows

func (g *Group) HasWorkflows() bool

func (*Group) IsLeaf

func (g *Group) IsLeaf() bool

func (*Group) IsPinned

func (g *Group) IsPinned(workflowName string) bool

func (*Group) TogglePin

func (g *Group) TogglePin(workflowName string)

type PinnedWorkflow

type PinnedWorkflow struct {
	WorkflowName string
	GroupPath    []string
	Group        *Group
}

type Preferences added in v0.3.0

type Preferences struct {
	RefreshInterval int               `yaml:"refreshInterval,omitempty"` // in seconds, 0 = disabled
	Theme           string            `yaml:"theme,omitempty"`           // Theme preference (e.g., "dark", "light")
	Keybindings     string            `yaml:"keybindings,omitempty"`     // Keybinding style (e.g., "vim", "emacs")
	CustomSettings  map[string]string `yaml:"customSettings,omitempty"`  // Extensible custom settings
}

Preferences contains user-specific settings that should not be shared

type Workflow

type Workflow struct {
	File string `yaml:"file"`
	Name string `yaml:"name,omitempty"`
}

func (*Workflow) DisplayName

func (w *Workflow) DisplayName() string

Jump to

Keyboard shortcuts

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