config

package
v0.0.0-...-2097cc5 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultConfigPath = ".config/tsk/tsk.toml"
	DefaultConfigDir  = ".config/tsk"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgendaAgeConfig

type AgendaAgeConfig struct {
	Horizon uint32 `toml:"horizon"`
}

type AgendaBoostConfig

type AgendaBoostConfig struct {
	HalfLife  float64 `toml:"half_life"`
	Increment float64 `toml:"increment"`
}

type AgendaConfig

type AgendaConfig struct {
	ViewPort uint32               `toml:"viewport"`
	Weights  AgendaWeightConfig   `toml:"weights"`
	Deadline AgendaDeadlineConfig `toml:"deadline"`
	Schedule AgendaScheduleConfig `toml:"schedule"`
	Boost    AgendaBoostConfig    `toml:"boost"`
	Age      AgendaAgeConfig      `toml:"age"`
}

type AgendaDeadlineConfig

type AgendaDeadlineConfig struct {
	StartsAt             uint16  `toml:"starts_at"`
	FullAt               uint16  `toml:"full_at"`
	OverduePenaltyPerDay float64 `toml:"overdue_penalty_per_day"`
}

type AgendaScheduleConfig

type AgendaScheduleConfig struct {
	VisibleAt uint32 `toml:"visible_at"`
}

type AgendaWeightConfig

type AgendaWeightConfig struct {
	Deadline   float64 `toml:"deadline"`
	Importance float64 `toml:"importance"`
	Boost      float64 `toml:"boost"`
	Age        float64 `toml:"age"`
}

type Config

type Config struct {
	Root   string       `toml:"root"`
	Agenda AgendaConfig `toml:"agenda"`
}

func NewDefaultConfiguration

func NewDefaultConfiguration() (*Config, error)

type ConfigProvider

type ConfigProvider interface {
	LoadConfiguration() (*Config, error)
}

func NewDefaultConfigProvider

func NewDefaultConfigProvider(configPathFromArgs *string, env env.Env) ConfigProvider

type DefaultConfigProvider

type DefaultConfigProvider struct {
	// contains filtered or unexported fields
}

func (DefaultConfigProvider) LoadConfiguration

func (p DefaultConfigProvider) LoadConfiguration() (*Config, error)

func (DefaultConfigProvider) ResolveConfigDir

func (p DefaultConfigProvider) ResolveConfigDir() (string, error)

Jump to

Keyboard shortcuts

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