Documentation
¶
Index ¶
- func Exists() (bool, error)
- func GetConfigPath() (string, error)
- func SaveConfig(cfg *Config) error
- type CalendarIntegration
- type Command
- type Config
- type GitIntegration
- type Integrations
- type NotificationSettings
- type Project
- type RitualSet
- type Rituals
- type Settings
- type SlackIntegration
- type TelemetryIntegration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigPath ¶
GetConfigPath returns the path to the configuration file
Types ¶
type CalendarIntegration ¶
type CalendarIntegration struct {
Provider string `yaml:"provider" mapstructure:"provider"`
BlockCalendar bool `yaml:"block_calendar" mapstructure:"block_calendar"`
}
CalendarIntegration contains calendar-related settings
type Command ¶
type Command struct {
Name string `yaml:"name" mapstructure:"name"`
Command string `yaml:"command" mapstructure:"command"`
Optional bool `yaml:"optional" mapstructure:"optional"`
Background bool `yaml:"background" mapstructure:"background"`
}
Command represents a ritual command
type Config ¶
type Config struct {
Version int `yaml:"version" mapstructure:"version"`
UserID string `yaml:"user_id" mapstructure:"user_id"`
Settings Settings `yaml:"settings" mapstructure:"settings"`
Projects []Project `yaml:"projects" mapstructure:"projects"`
Rituals Rituals `yaml:"rituals" mapstructure:"rituals"`
Integrations Integrations `yaml:"integrations" mapstructure:"integrations"`
}
Config represents the main configuration structure
type GitIntegration ¶
type GitIntegration struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
AutoDetectProject bool `yaml:"auto_detect_project" mapstructure:"auto_detect_project"`
}
GitIntegration contains Git-related settings
type Integrations ¶
type Integrations struct {
Git GitIntegration `yaml:"git" mapstructure:"git"`
Slack SlackIntegration `yaml:"slack" mapstructure:"slack"`
Calendar CalendarIntegration `yaml:"calendar" mapstructure:"calendar"`
Telemetry TelemetryIntegration `yaml:"telemetry" mapstructure:"telemetry"`
}
Integrations contains external service integrations
type NotificationSettings ¶
type NotificationSettings struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
BreakReminders bool `yaml:"break_reminders" mapstructure:"break_reminders"`
EndOfDayReminders bool `yaml:"end_of_day_reminders" mapstructure:"end_of_day_reminders"`
SessionComplete bool `yaml:"session_complete" mapstructure:"session_complete"`
IdleDetection bool `yaml:"idle_detection" mapstructure:"idle_detection"`
Sound bool `yaml:"sound" mapstructure:"sound"`
}
NotificationSettings contains notification preferences
type Project ¶
type Project struct {
Name string `yaml:"name" mapstructure:"name"`
Detect []string `yaml:"detect" mapstructure:"detect"`
}
Project represents a project configuration
type RitualSet ¶
type RitualSet struct {
Global []Command `yaml:"global" mapstructure:"global"`
PerProject map[string][]Command `yaml:"per_project" mapstructure:"per_project"`
}
RitualSet contains global and per-project rituals
type Rituals ¶
type Rituals struct {
Start RitualSet `yaml:"start" mapstructure:"start"`
Stop RitualSet `yaml:"stop" mapstructure:"stop"`
}
Rituals contains start and stop ritual configurations
type Settings ¶
type Settings struct {
WorkHours float64 `yaml:"work_hours" mapstructure:"work_hours"`
BreakInterval time.Duration `yaml:"break_interval" mapstructure:"break_interval"`
IdleThreshold time.Duration `yaml:"idle_threshold" mapstructure:"idle_threshold"`
Notifications NotificationSettings `yaml:"notifications" mapstructure:"notifications"`
}
Settings contains global application settings
type SlackIntegration ¶
type SlackIntegration struct {
Workspace string `yaml:"workspace" mapstructure:"workspace"`
DNDOnStart bool `yaml:"dnd_on_start" mapstructure:"dnd_on_start"`
}
SlackIntegration contains Slack-related settings
type TelemetryIntegration ¶
type TelemetryIntegration struct {
Enabled bool `yaml:"enabled" mapstructure:"enabled"`
SegmentWriteKey string `yaml:"segment_write_key" mapstructure:"segment_write_key"`
SentryDSN string `yaml:"sentry_dsn" mapstructure:"sentry_dsn"`
}
TelemetryIntegration contains telemetry-related settings