Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDefaultConfig ¶
func CopyDefaultConfig() error
Types ¶
type Config ¶
type Config struct { PomodoroDuration time.Duration `mapstructure:"pomodoro_duration"` BreakDuration time.Duration `mapstructure:"break_duration"` RefreshRate time.Duration `mapstructure:"refresh_rate"` LockFile string `mapstructure:"lock_file"` Outputs OutputsConfig `mapstructure:"outputs"` }
func ReadConfig ¶
type FileConfig ¶
type FileConfig struct {
Path string `mapstructure:"path"`
}
func (FileConfig) Instantiate ¶
func (c FileConfig) Instantiate() *outputs.Output
func (*FileConfig) IsActivated ¶
func (c *FileConfig) IsActivated() bool
type OutputConfig ¶
type OutputsConfig ¶
type OutputsConfig struct { Stdout *StdoutConfig `mapstructure:"stdout"` File *FileConfig `mapstructure:"file"` Slack *SlackConfig `mapstructure:"slack"` }
func DefaultOutputsConfig ¶
func DefaultOutputsConfig() OutputsConfig
func (OutputsConfig) GetOutputsConfig ¶
func (o OutputsConfig) GetOutputsConfig() []OutputConfig
type SlackConfig ¶ added in v0.2.0
type SlackConfig struct { Token string `mapstructure:"token"` DoNotDisturb bool `mapstructure:"do_not_disturb"` Emoji string `mapstructure:"emoji"` }
func (SlackConfig) Instantiate ¶ added in v0.2.0
func (c SlackConfig) Instantiate() *outputs.Output
func (*SlackConfig) IsActivated ¶ added in v0.2.0
func (c *SlackConfig) IsActivated() bool
type StdoutConfig ¶
type StdoutConfig struct { ShowPercent bool `mapstructure:"show_percent"` Size int `mapstructure:"size"` }
func (StdoutConfig) Instantiate ¶
func (c StdoutConfig) Instantiate() *outputs.Output
func (*StdoutConfig) IsActivated ¶
func (c *StdoutConfig) IsActivated() bool
Click to show internal directories.
Click to hide internal directories.