Documentation ¶
Index ¶
Constants ¶
View Source
const ( ON = "on" OFF = "off" )
Constants to represent a status of the pomo.
Variables ¶
View Source
var DEFAULT_DURATION, _ = time.ParseDuration("25m")
Functions ¶
This section is empty.
Types ¶
type Pomo ¶
type Pomo struct { Status string // status running or not could be ON or OFF Time time.Duration Emoji string // default tomato emoji Blink [2]string // array of 2 emoji to create an animation Cancel chan bool // channel for cancelation a running timer goroutine }
Pomo struct represents a pomodoro.
func (*Pomo) GetDuration ¶
GetDuration returns the current duration.
func (*Pomo) Restart ¶
func (pomo *Pomo) Restart()
Restart restarts the pomo timer to default value.
func (*Pomo) SetDuration ¶
SetDuration sets the duration of pomo timer it accepts time.Duration parsable format.
type PomoAPI ¶
type PomoAPI struct {
Pomo *Pomo
}
PomoAPI type for interaction with pomo. This type exposed and registered as specified in RPC.
func (*PomoAPI) GetDuration ¶
GetDuration API call. The first argument provided by caller is always nil.
func (*PomoAPI) SetDuration ¶
SetDuration API call. Takes a duration time format and calls SetDuration pomo's method.
Click to show internal directories.
Click to hide internal directories.