Documentation ¶
Overview ¶
Package config gomodoro configuration
Index ¶
Constants ¶
View Source
const ( // DefaultWorkSec default working second DefaultWorkSec = 1500 // DefaultShortBreakSec default short break second DefaultShortBreakSec = 300 // DefaultLongBreakSec default long break second DefaultLongBreakSec = 900 // DefaultLogFile default log file path DefaultLogFile = "~/.gomodoro/gomodoro.log" // DefaultTaskFile default task file path DefaultTaskFile = "~/.gomodoro/tasks.yaml" // DefaultUnixDomainScoketPath default unix domain socket file path DefaultUnixDomainScoketPath = "~/.gomodoro/gomodoro.sock" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Pomodoro PomodoroConfig `mapstructure:"pomodoro"` Toggl TogglConfig `mapstructure:"toggl"` LogFile string `mapstructure:"log_file"` TaskFile string `mapstructure:"task_file"` UnixDomainScoketPath string `mapstructure:"unix_domain_socket_path"` }
Config config for gomodoro
func (*Config) ExpandLogFile ¶ added in v0.9.4
ExpandLogFile get expand log file
func (*Config) ExpandTaskFile ¶ added in v0.9.4
ExpandTaskFile get expand task file
func (*Config) ExpandUnixDomainSocketPath ¶ added in v0.9.4
ExpandUnixDomainSocketPath get expand UnixDomainScoketPath
type PomodoroConfig ¶ added in v0.9.1
type PomodoroConfig struct { WorkSec int `mapstructure:"work_sec" validate:"gt=0,lte=3600"` ShortBreakSec int `mapstructure:"short_break_sec" validate:"gt=0,lte=3600"` LongBreakSec int `mapstructure:"long_break_sec" validate:"gt=0,lte=3600"` }
PomodoroConfig config for pomodoro
type TogglConfig ¶ added in v0.9.1
type TogglConfig struct { APIToken string `mapstructure:"api_token"` ProjectID int `mapstructure:"project_id"` }
TogglConfig config for Toggl
func (TogglConfig) Enable ¶ added in v0.9.1
func (tc TogglConfig) Enable() bool
Enable confirm toggl client is enable
Click to show internal directories.
Click to hide internal directories.