Documentation
¶
Index ¶
- type C2DB
- func (c *C2DB) AddCheckboxItem(ni *CheckboxNoteItem) (bool, int64)
- func (c *C2DB) AddNote(n *Note) (bool, int64)
- func (c *C2DB) AddNoteItem(ni *NoteItem) (bool, int64)
- func (c *C2DB) AddNoteUser(nu *NoteUsers) bool
- func (c *C2DB) AddUser(u *User) bool
- func (c *C2DB) DeleteCheckboxItem(id int64) bool
- func (c *C2DB) DeleteNote(id int64) bool
- func (c *C2DB) DeleteNoteItem(id int64) bool
- func (c *C2DB) DeleteNoteUser(nu *NoteUsers) bool
- func (c *C2DB) DeleteUser(email string) bool
- func (c *C2DB) GetCheckboxItemList(noteID int64) *[]CheckboxNoteItem
- func (c *C2DB) GetMailServerInfo() *MailServer
- func (c *C2DB) GetNew() NotesDB
- func (c *C2DB) GetNote(id int64) *Note
- func (c *C2DB) GetNoteItemList(noteID int64) *[]NoteItem
- func (c *C2DB) GetNoteUserList(noteID int64, ownerEmail string) *[]string
- func (c *C2DB) GetUser(email string) *User
- func (c *C2DB) GetUsersNotes(email string) *[]Note
- func (c *C2DB) UpdateCheckboxItem(ni *CheckboxNoteItem) bool
- func (c *C2DB) UpdateNote(n *Note) bool
- func (c *C2DB) UpdateNoteItem(ni *NoteItem) bool
- func (c *C2DB) UpdateUser(u *User) bool
- type CheckboxNoteItem
- type MailServer
- type MockC2DB
- func (c *MockC2DB) AddCheckboxItem(ni *CheckboxNoteItem) (bool, int64)
- func (c *MockC2DB) AddNote(n *Note) (bool, int64)
- func (c *MockC2DB) AddNoteItem(ni *NoteItem) (bool, int64)
- func (c *MockC2DB) AddNoteUser(nu *NoteUsers) bool
- func (c *MockC2DB) AddUser(u *User) bool
- func (c *MockC2DB) DeleteCheckboxItem(id int64) bool
- func (c *MockC2DB) DeleteNote(id int64) bool
- func (c *MockC2DB) DeleteNoteItem(id int64) bool
- func (c *MockC2DB) DeleteNoteUser(nu *NoteUsers) bool
- func (c *MockC2DB) DeleteUser(email string) bool
- func (c *MockC2DB) GetCheckboxItemList(noteID int64) *[]CheckboxNoteItem
- func (c *MockC2DB) GetMailServerInfo() *MailServer
- func (c *MockC2DB) GetNew() NotesDB
- func (c *MockC2DB) GetNote(id int64) *Note
- func (c *MockC2DB) GetNoteItemList(noteID int64) *[]NoteItem
- func (c *MockC2DB) GetNoteUserList(noteID int64, ownerEmail string) *[]string
- func (c *MockC2DB) GetUser(email string) *User
- func (c *MockC2DB) GetUsersNotes(email string) *[]Note
- func (c *MockC2DB) UpdateCheckboxItem(ni *CheckboxNoteItem) bool
- func (c *MockC2DB) UpdateNote(n *Note) bool
- func (c *MockC2DB) UpdateNoteItem(ni *NoteItem) bool
- func (c *MockC2DB) UpdateUser(u *User) bool
- type Note
- type NoteItem
- type NoteUsers
- type NotesDB
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type C2DB ¶
C2DB C2DB
func (*C2DB) AddCheckboxItem ¶
func (c *C2DB) AddCheckboxItem(ni *CheckboxNoteItem) (bool, int64)
AddCheckboxItem AddCheckboxItem
func (*C2DB) AddNoteItem ¶
AddNoteItem AddNoteItem
func (*C2DB) DeleteCheckboxItem ¶
DeleteCheckboxItem DeleteCheckboxItem
func (*C2DB) DeleteNoteItem ¶
DeleteNoteItem DeleteNoteItem
func (*C2DB) DeleteNoteUser ¶
DeleteNoteUser DeleteNoteUser
func (*C2DB) GetCheckboxItemList ¶
func (c *C2DB) GetCheckboxItemList(noteID int64) *[]CheckboxNoteItem
GetCheckboxItemList GetCheckboxItemList
func (*C2DB) GetMailServerInfo ¶
func (c *C2DB) GetMailServerInfo() *MailServer
GetMailServerInfo GetMailServerInfo
func (*C2DB) GetNoteItemList ¶
GetNoteItemList GetNoteItemList
func (*C2DB) GetNoteUserList ¶
GetNoteUserList GetNoteUserList
func (*C2DB) GetUsersNotes ¶
GetUsersNotes GetUsersNotes
func (*C2DB) UpdateCheckboxItem ¶
func (c *C2DB) UpdateCheckboxItem(ni *CheckboxNoteItem) bool
UpdateCheckboxItem UpdateCheckboxItem
func (*C2DB) UpdateNoteItem ¶
UpdateNoteItem UpdateNoteItem
type CheckboxNoteItem ¶
type CheckboxNoteItem struct { ID int64 `json:"id"` Text string `json:"text"` Checked bool `json:"checked"` NoteID int64 `json:"noteId"` }
CheckboxNoteItem CheckboxNoteItem
type MailServer ¶
type MailServer struct { ID int64 `json:"id"` Host string `json:"host"` Username string `json:"username"` Password string `json:"password"` Port string `json:"port"` SenderEmail string `json:"senderEmail"` }
MailServer MailServer
type MockC2DB ¶
type MockC2DB struct { DB dbi.Database Log *lg.Logger MockAddUserSuc bool MockUpdateUserSuc bool MockUser *User MockDeleteUserSuc bool MockAddNoteSuc bool MockAddNoteID int64 MockUpdateNoteSuc bool MockNote *Note MockNoteList *[]Note MockDeleteNoteSuc bool MockAddNoteItemSuc bool MockNoteItemID int64 MockUpdateNoteItemSuc bool MockNoteItemList *[]NoteItem MockDeleteNoteItemSuc bool MockAddCheckboxNoteItemSuc bool MockCheckboxNoteItemID int64 MockUpdateCheckboxNoteItemSuc bool MockCheckboxNoteItemList *[]CheckboxNoteItem MockDeleteCheckboxNoteItemSuc bool MockAddNoteUserSuc bool MockDeleteNoteUserSuc bool MockNoteUserList *[]string MockMailServer *MailServer }
MockC2DB MockC2DB
func (*MockC2DB) AddCheckboxItem ¶
func (c *MockC2DB) AddCheckboxItem(ni *CheckboxNoteItem) (bool, int64)
AddCheckboxItem AddCheckboxItem
func (*MockC2DB) AddNoteItem ¶
AddNoteItem AddNoteItem
func (*MockC2DB) AddNoteUser ¶
AddNoteUser AddNoteUser
func (*MockC2DB) DeleteCheckboxItem ¶
DeleteCheckboxItem DeleteCheckboxItem
func (*MockC2DB) DeleteNoteItem ¶
DeleteNoteItem DeleteNoteItem
func (*MockC2DB) DeleteNoteUser ¶
DeleteNoteUser DeleteNoteUser
func (*MockC2DB) DeleteUser ¶
DeleteUser DeleteUser
func (*MockC2DB) GetCheckboxItemList ¶
func (c *MockC2DB) GetCheckboxItemList(noteID int64) *[]CheckboxNoteItem
GetCheckboxItemList GetCheckboxItemList
func (*MockC2DB) GetMailServerInfo ¶
func (c *MockC2DB) GetMailServerInfo() *MailServer
GetMailServerInfo GetMailServerInfo
func (*MockC2DB) GetNoteItemList ¶
GetNoteItemList GetNoteItemList
func (*MockC2DB) GetNoteUserList ¶
GetNoteUserList GetNoteUserList
func (*MockC2DB) GetUsersNotes ¶
GetUsersNotes GetUsersNotes
func (*MockC2DB) UpdateCheckboxItem ¶
func (c *MockC2DB) UpdateCheckboxItem(ni *CheckboxNoteItem) bool
UpdateCheckboxItem UpdateCheckboxItem
func (*MockC2DB) UpdateNoteItem ¶
UpdateNoteItem UpdateNoteItem
type Note ¶
type Note struct { ID int64 `json:"id"` Title string `json:"title"` Type string `json:"type"` OwnerEmail string `json:"ownerEmail"` LastUsed time.Time `json:"lastUsed"` }
Note Note
type NoteItem ¶
type NoteItem struct { ID int64 `json:"id"` Text string `json:"text"` NoteID int64 `json:"noteId"` }
NoteItem NoteItem
type NotesDB ¶
type NotesDB interface { AddUser(u *User) bool UpdateUser(u *User) bool GetUser(email string) *User DeleteUser(email string) bool AddNote(n *Note) (bool, int64) UpdateNote(n *Note) bool GetNote(id int64) *Note GetUsersNotes(email string) *[]Note DeleteNote(id int64) bool AddCheckboxItem(ni *CheckboxNoteItem) (bool, int64) UpdateCheckboxItem(ni *CheckboxNoteItem) bool // //GetCheckboxItem(id int64) *CheckboxNoteItem GetCheckboxItemList(noteID int64) *[]CheckboxNoteItem DeleteCheckboxItem(id int64) bool AddNoteItem(ni *NoteItem) (bool, int64) UpdateNoteItem(ni *NoteItem) bool // //GetNoteItem(id int64) *NoteItem GetNoteItemList(noteID int64) *[]NoteItem GetNoteUserList(noteID int64, ownerEmail string) *[]string DeleteNoteItem(id int64) bool AddNoteUser(nu *NoteUsers) bool DeleteNoteUser(nu *NoteUsers) bool GetMailServerInfo() *MailServer }
NotesDB NotesDB