Documentation ¶
Index ¶
Constants ¶
View Source
const ( CategoryPomodoro = "Pomodoro" CategoryShortBreak = "ShortBreak" CategoryLongBreak = "LongBreak" )
Category constants
View Source
const ( StateNotStarted = iota StateRunning StatePaused StateDone StateCancelled )
State constants
Variables ¶
Functions ¶
func DailySummary ¶
Types ¶
type Interval ¶
type Interval struct { ID int64 StartTime time.Time PlannedDuration time.Duration ActualDuration time.Duration Category string State int }
func GetInterval ¶
func GetInterval(config *IntervalConfig) (Interval, error)
func (Interval) Pause ¶
func (i Interval) Pause(config *IntervalConfig) error
type IntervalConfig ¶
type IntervalConfig struct { PomodoroDuration time.Duration ShortBreakDuration time.Duration LongBreakDuration time.Duration // contains filtered or unexported fields }
func NewConfig ¶
func NewConfig(repo Repository, pomodoro, shortBreak, longBreak time.Duration) *IntervalConfig
type LineSeries ¶
func RangeSummary ¶
func RangeSummary(start time.Time, n int, config *IntervalConfig) ([]LineSeries, error)
Click to show internal directories.
Click to hide internal directories.