Documentation ¶
Overview ¶
Package client provides utilities for working with the pomodoro server.
Index ¶
Constants ¶
View Source
const ( // CheckTimer checks the status of the timer. CheckTimer = "is-ticking" // CloseConn tells the server to close the connection. CloseConn = "close" // StartTimer starts a new timer. StartTimer = "start" // StopTimer stops the timer. StopTimer = "stop" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Cmd Cmd // contains filtered or unexported fields }
Client is a single client connection to the server.
type Cmd ¶
type Cmd struct {
Mode string `json:"mode"`
}
Cmd is a command to send to the server.
func (Cmd) MarshalZerologObject ¶
MarshalZerologObject implements zapcore.LogObjectMarshaler.
type Resp ¶
type Resp struct { Duration string `json:"duration,omitempty"` Session string `json:"session,omitempty"` Ticking bool `json:"ticking"` TimeRemaining string `json:"timeRemaining,omitempty"` }
Resp is the data returned from the server.
func (Resp) MarshalZerologObject ¶
MarshalZerologObject implements zapcore.LogObjectMarshaler.
Click to show internal directories.
Click to hide internal directories.