Documentation ¶
Index ¶
- type Client
- type Hub
- type Item
- type Message
- type Server
- type SqliteStore
- func (store *SqliteStore) AllLists() []*Item
- func (store *SqliteStore) Bootstrap()
- func (store *SqliteStore) Create(item *Item) *Item
- func (store *SqliteStore) Delete(listID string, itemID int64) error
- func (store *SqliteStore) Find(listID string, itemID int64) *Item
- func (store *SqliteStore) FindAll(listID string) []*Item
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { ID int // contains filtered or unexported fields }
Client stores a connected client.
type Item ¶
type Item struct { ItemID int64 `db:"itemId" json:"itemId"` ListID string `db:"listId" json:"listId"` Text string `db:"contentText" json:"text"` IsChecked bool `db:"isChecked" json:"isChecked"` }
Item is a stored list item
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds the server implementation.
type SqliteStore ¶
SqliteStore is the SQLite storge implementaion
func (*SqliteStore) AllLists ¶
func (store *SqliteStore) AllLists() []*Item
func (*SqliteStore) Bootstrap ¶
func (store *SqliteStore) Bootstrap()
Bootstrap the store, to create the necessary tables.
func (*SqliteStore) Create ¶
func (store *SqliteStore) Create(item *Item) *Item
Create insert (or update) the given item.
func (*SqliteStore) Delete ¶
func (store *SqliteStore) Delete(listID string, itemID int64) error
Delete the given item
func (*SqliteStore) Find ¶
func (store *SqliteStore) Find(listID string, itemID int64) *Item
Find returns the item matching the given ID
func (*SqliteStore) FindAll ¶
func (store *SqliteStore) FindAll(listID string) []*Item
FindAll returns all items matching the given list ID
Click to show internal directories.
Click to hide internal directories.