config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: MIT Imports: 4 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 {
	Journal          JournalConfig `mapstructure:"journal"`
	Standup          StandupConfig `mapstructure:"standup"`
	SearchWindowDays int           `mapstructure:"search_window_days"`
	CompanyTag       string        `mapstructure:"company_tag"`
}

Config represents the complete application configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a configuration with sensible defaults

func Load

func Load(configPath string) (*Config, error)

Load loads configuration from file, environment variables, and defaults Precedence: CLI flags (passed separately) > env vars > config file > defaults

func (*Config) ExpandPath

func (c *Config) ExpandPath(path string) (string, error)

ExpandPath expands relative paths to absolute paths

func (*Config) JournalDir

func (c *Config) JournalDir() (string, error)

JournalDir returns the absolute path to the journal directory

func (*Config) StandupDir

func (c *Config) StandupDir() (string, error)

StandupDir returns the absolute path to the standup directory

func (*Config) Validate

func (c *Config) Validate() error

Validate checks if the configuration is valid

type CreateCommand

type CreateCommand struct {
	Cmd string `mapstructure:"cmd"`
}

CreateCommand contains the command to create new notes

type JournalConfig

type JournalConfig struct {
	Dir                string        `mapstructure:"dir"`
	WorkDoneSections   []string      `mapstructure:"work_done_sections"`
	SkipText           []string      `mapstructure:"skip_text"`
	LinkPreviousTitles []string      `mapstructure:"link_previous_titles"`
	LinkNextTitles     []string      `mapstructure:"link_next_titles"`
	Create             CreateCommand `mapstructure:"create"`
}

JournalConfig contains configuration for journal notes

type StandupConfig

type StandupConfig struct {
	Dir                string        `mapstructure:"dir"`
	WorkDoneSection    string        `mapstructure:"work_done_section"`
	SkipText           []string      `mapstructure:"skip_text"`
	LinkPreviousTitles []string      `mapstructure:"link_previous_titles"`
	LinkNextTitles     []string      `mapstructure:"link_next_titles"`
	Create             CreateCommand `mapstructure:"create"`
}

StandupConfig contains configuration for standup notes

Jump to

Keyboard shortcuts

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