-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
509 additions
and
434 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package main | ||
|
||
type Board struct { | ||
ID int `json:"id"` | ||
ID uint64 `json:"id,string"` | ||
Title string `json:"title"` | ||
Lists []List `json:"lists,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
package main | ||
|
||
type List struct { | ||
ID int `json:"id"` | ||
Title string `json:"title"` | ||
Notes []Note `json:"notes"` | ||
} | ||
ID uint64 `json:"id,string"` | ||
BoardID uint64 `json:"board_id,string"` | ||
Title string `json:"title"` | ||
Order uint `json:"order"` | ||
Notes []Note `json:"notes"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,85 @@ | ||
package main | ||
|
||
type Command string | ||
|
||
const ( | ||
CommandGetBoardList Command = "GET_BOARD_LIST" | ||
CommandGetBoard Command = "GET_BOARD" | ||
CommandBoard Command = "BOARD" | ||
CommandBoardList Command = "BOARD_LIST" | ||
CommandAddNote Command = "ADD_NOTE" | ||
CommandDeleteNote Command = "DELETE_NOTE" | ||
CommandEditNote Command = "EDIT_NOTE" | ||
CommandEditList Command = "EDIT_LIST" | ||
CommandEditBoard Command = "EDIT_BOARD" | ||
CommandAddList Command = "ADD_LIST" | ||
CommandDeleteList Command = "DELETE_LIST" | ||
CommandAddBoard Command = "ADD_BOARD" | ||
CommandDeleteBoard Command = "DELETE_BOARD" | ||
CommandMoveList Command = "MOVE_LIST" | ||
CommandGetBoard Command = "GET_BOARD" | ||
CommandBoard Command = "BOARD" | ||
CommandBoardList Command = "BOARD_LIST" | ||
CommandAddNote Command = "ADD_NOTE" | ||
CommandDeleteNote Command = "DELETE_NOTE" | ||
CommandEditNote Command = "EDIT_NOTE" | ||
CommandEditList Command = "EDIT_LIST" | ||
CommandEditBoard Command = "EDIT_BOARD" | ||
CommandAddList Command = "ADD_LIST" | ||
CommandDeleteList Command = "DELETE_LIST" | ||
CommandAddBoard Command = "ADD_BOARD" | ||
CommandDeleteBoard Command = "DELETE_BOARD" | ||
CommandMoveList Command = "MOVE_LIST" | ||
) | ||
|
||
type Message struct { | ||
Command Command `json:"command"` | ||
Data interface{} `json:"data"` | ||
Command Command `json:"command"` | ||
Data interface{} `json:"data"` | ||
} | ||
|
||
type MessageMoveList struct { | ||
Id int `json:"id"` | ||
BoardId int `json:"board_id"` | ||
Direction string `json:"direction"` | ||
Id uint64 `json:"id,string"` | ||
BoardId uint64 `json:"board_id,string"` | ||
Direction string `json:"direction"` | ||
ListIds []string `json:"list_ids"` | ||
} | ||
|
||
type MessageGetBoard struct { | ||
Id int `json:"id"` | ||
Id uint64 `json:"id,string"` | ||
} | ||
|
||
type MessageDeleteBoard struct { | ||
Id int `json:"id"` | ||
Id uint64 `json:"id,string"` | ||
} | ||
|
||
type MessageAddBoard struct { | ||
Id int `json:"id,omitempty"` | ||
Id uint64 `json:"id,string,omitempty"` | ||
Title string `json:"title"` | ||
} | ||
|
||
type MessageAddList struct { | ||
Id int `json:"id,omitempty"` | ||
Title string `json:"title"` | ||
BoardId int `json:"board_id"` | ||
Id uint64 `json:"id,string,omitempty"` | ||
Title string `json:"title"` | ||
BoardId uint64 `json:"board_id,string"` | ||
} | ||
|
||
type MessageDeleteList struct { | ||
Id int `json:"id"` | ||
Id uint64 `json:"id,string"` | ||
} | ||
|
||
type MessageAddNote struct { | ||
Id int `json:"id,omitempty"` | ||
Uuid string `json:"uuid"` | ||
Text string `json:"text"` | ||
ListId int `json:"list_id"` | ||
Id uint64 `json:"id,string,omitempty"` | ||
Uuid string `json:"uuid"` | ||
Text string `json:"text"` | ||
ListId uint64 `json:"list_id,string"` | ||
} | ||
|
||
type MessageDeleteNote struct { | ||
Id int `json:"id"` | ||
Id uint64 `json:"id,string"` | ||
} | ||
|
||
type MessageEditNote struct { | ||
Id int `json:"id"` | ||
ListId int `json:"list_id,omitempty"` | ||
Text string `json:"text,omitempty"` | ||
Raw *bool `json:"raw,omitempty"` | ||
Minimized *bool `json:"minimized,omitempty"` | ||
PreviousNoteId *int `json:"previous_note_id,omitempty"` | ||
Id uint64 `json:"id,string"` | ||
ListId uint64 `json:"list_id,string,omitempty"` | ||
Text string `json:"text,omitempty"` | ||
Raw *bool `json:"raw,omitempty"` | ||
Minimized *bool `json:"minimized,omitempty"` | ||
PreviousNoteId *string `json:"previous_note_id,omitempty"` | ||
} | ||
|
||
type MessageEditList struct { | ||
Id int `json:"id"` | ||
Id uint64 `json:"id,string"` | ||
Title string `json:"title"` | ||
} | ||
|
||
type MessageEditBoard struct { | ||
Id int `json:"id"` | ||
Id uint64 `json:"id,string"` | ||
Title string `json:"title"` | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
package main | ||
|
||
type Note struct { | ||
ID int `json:"id"` | ||
Minimized bool `json:"min"` | ||
Raw bool `json:"raw"` | ||
Text string `json:"text"` | ||
order int | ||
ID uint64 `json:"id,string"` | ||
ListID uint64 `json:"list_id,string"` | ||
Minimized bool `json:"min"` | ||
Raw bool `json:"raw"` | ||
Text string `json:"text"` | ||
Order uint | ||
} |
Oops, something went wrong.