doc: add and improve comments
This commit is contained in:
parent
6187122b81
commit
f19ab81dc8
11 changed files with 31 additions and 8 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
GoTomato "git.smsvc.net/pomodoro/GoTomato/pkg/models"
|
||||
)
|
||||
|
||||
// Sends to ClientCommand to the clients websocket
|
||||
func (c Client) sendClientCommand(msg GoTomato.ClientCommand) {
|
||||
messageBytes, err := json.Marshal(msg)
|
||||
if err != nil {
|
||||
|
@ -22,6 +23,7 @@ func (c Client) sendClientCommand(msg GoTomato.ClientCommand) {
|
|||
}
|
||||
}
|
||||
|
||||
// Sends the passed command to the server
|
||||
func (c Client) SendCmd(cmd string) {
|
||||
message := GoTomato.ClientCommand{
|
||||
Command: cmd,
|
||||
|
@ -31,6 +33,7 @@ func (c Client) SendCmd(cmd string) {
|
|||
c.sendClientCommand(message)
|
||||
}
|
||||
|
||||
// Sends the new PomodoroConfig to the server
|
||||
func (c Client) SendSettingsUpdate(settings GoTomato.PomodoroConfig) {
|
||||
message := GoTomato.ClientCommand{
|
||||
Command: "updateSettings",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue