Documentation
¶
Index ¶
- type API
- type CheckboxNote
- type CheckboxNoteItem
- type Headers
- type LoginResponse
- type MailServer
- type Note
- type NoteItem
- type NoteUsers
- type NotesAPI
- func (a *NotesAPI) AddCheckboxItem(ni *CheckboxNoteItem) *ResponseID
- func (a *NotesAPI) AddNote(n *Note) *ResponseID
- func (a *NotesAPI) AddNoteItem(ni *NoteItem) *ResponseID
- func (a *NotesAPI) AddUser(u *User) *Response
- func (a *NotesAPI) AddUserToNote(n *NoteUsers) *Response
- func (a *NotesAPI) DeleteCheckboxItem(id int64) *Response
- func (a *NotesAPI) DeleteNote(id int64, ownerEmail string) *Response
- func (a *NotesAPI) DeleteNoteItem(id int64) *Response
- func (a *NotesAPI) FlushFailedCache()
- func (a *NotesAPI) GetCheckboxNote(id int64) *CheckboxNote
- func (a *NotesAPI) GetFailAddCheckboxNoteItemList() []CheckboxNoteItem
- func (a *NotesAPI) GetFailAddNoteItemList() []NoteItem
- func (a *NotesAPI) GetFailUpdateCheckboxNoteItemList() []CheckboxNoteItem
- func (a *NotesAPI) GetFailUpdateNoteItemList() []NoteItem
- func (a *NotesAPI) GetNew() API
- func (a *NotesAPI) GetNote(id int64) *TextNote
- func (a *NotesAPI) GetNoteList() []Note
- func (a *NotesAPI) GetNoteUserList(noteID int64, ownerEmail string) *[]string
- func (a *NotesAPI) GetUser(email string) *User
- func (a *NotesAPI) GetUsersNotes(email string) (*[]Note, bool)
- func (a *NotesAPI) Login(u *User) *LoginResponse
- func (a *NotesAPI) OverrideProxy(proxy px.Proxy)
- func (a *NotesAPI) ResetPassword(u *User) *Response
- func (a *NotesAPI) SetAPIKey(key string)
- func (a *NotesAPI) SetHeader(head *Headers)
- func (a *NotesAPI) SetLogLevel(level int)
- func (a *NotesAPI) SetLogger(l *lg.Logger)
- func (a *NotesAPI) SetNoteList(noteList []Note)
- func (a *NotesAPI) SetRestURL(url string)
- func (a *NotesAPI) UpdateCheckboxItem(ni *CheckboxNoteItem) *Response
- func (a *NotesAPI) UpdateNote(n *Note) *Response
- func (a *NotesAPI) UpdateNoteItem(ni *NoteItem) *Response
- func (a *NotesAPI) UpdateUser(u *User) *Response
- type Response
- type ResponseID
- type TextNote
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface {
AddUser(u *User) *Response
UpdateUser(u *User) *Response
GetUser(email string) *User
Login(u *User) *LoginResponse
ResetPassword(u *User) *Response
AddUserToNote(n *NoteUsers) *Response
GetNoteUserList(noteID int64, ownerEmail string) *[]string
AddNote(n *Note) *ResponseID
UpdateNote(n *Note) *Response
GetCheckboxNote(id int64) *CheckboxNote
GetNote(id int64) *TextNote
GetUsersNotes(email string) (*[]Note, bool)
DeleteNote(id int64, ownerEmail string) *Response
AddCheckboxItem(ni *CheckboxNoteItem) *ResponseID
UpdateCheckboxItem(ni *CheckboxNoteItem) *Response
DeleteCheckboxItem(id int64) *Response
AddNoteItem(ni *NoteItem) *ResponseID
UpdateNoteItem(ni *NoteItem) *Response
DeleteNoteItem(id int64) *Response
//Offline functionality below
GetFailAddCheckboxNoteItemList() []CheckboxNoteItem
GetFailUpdateCheckboxNoteItemList() []CheckboxNoteItem
GetFailAddNoteItemList() []NoteItem
GetFailUpdateNoteItemList() []NoteItem
FlushFailedCache()
SetNoteList(noteList []Note)
GetNoteList() []Note
// contains filtered or unexported methods
}
API API
type CheckboxNote ¶
type CheckboxNote struct {
ID int64 `json:"id"`
Title string `json:"title"`
Type string `json:"type"`
OwnerEmail string `json:"ownerEmail"`
NoteItems []CheckboxNoteItem `json:"noteCheckboxItems"`
LastUsed time.Time `json:"lastUsed"`
}
CheckboxNote CheckboxNote
type CheckboxNoteItem ¶
type CheckboxNoteItem struct {
ID int64 `json:"id"`
Text string `json:"text"`
Checked bool `json:"checked"`
NoteID int64 `json:"noteId"`
}
CheckboxNoteItem CheckboxNoteItem
type LoginResponse ¶ added in v1.0.3
LoginResponse LoginResponse
type MailServer ¶ added in v1.0.3
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 Note ¶
type Note struct {
ID int64 `json:"id"`
Title string `json:"title"`
Type string `json:"type"`
OwnerEmail string `json:"ownerEmail"`
NoteTextItems []NoteItem `json:"noteTextItems"`
NoteCheckboxItems []CheckboxNoteItem `json:"noteCheckboxItems"`
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 NoteUsers ¶
type NoteUsers struct {
OwnerEmail string `json:"ownerEmail"`
NoteID int64 `json:"noteId"`
UserEmail string `json:"userEmail"`
}
NoteUsers NoteUsers
type NotesAPI ¶
type NotesAPI struct {
FailAddCheckboxNoteItemList []CheckboxNoteItem
FailUpdateCheckboxNoteItemList []CheckboxNoteItem
FailAddNoteItemList []NoteItem
FailUpdateNoteItemList []NoteItem
// contains filtered or unexported fields
}
NotesAPI NotesAPI
func (*NotesAPI) AddCheckboxItem ¶
func (a *NotesAPI) AddCheckboxItem(ni *CheckboxNoteItem) *ResponseID
AddCheckboxItem AddCheckboxItem
func (*NotesAPI) AddNoteItem ¶
func (a *NotesAPI) AddNoteItem(ni *NoteItem) *ResponseID
AddNoteItem AddNoteItem
func (*NotesAPI) AddUserToNote ¶
AddUserToNote AddUserToNote
func (*NotesAPI) DeleteCheckboxItem ¶
DeleteCheckboxItem DeleteCheckboxItem
func (*NotesAPI) DeleteNote ¶
DeleteNote DeleteNote
func (*NotesAPI) DeleteNoteItem ¶
DeleteNoteItem DeleteNoteItem
func (*NotesAPI) FlushFailedCache ¶ added in v1.0.16
func (a *NotesAPI) FlushFailedCache()
FlushFailedCache FlushFailedCache
func (*NotesAPI) GetCheckboxNote ¶
func (a *NotesAPI) GetCheckboxNote(id int64) *CheckboxNote
GetCheckboxNote GetCheckboxNote
func (*NotesAPI) GetFailAddCheckboxNoteItemList ¶ added in v1.0.6
func (a *NotesAPI) GetFailAddCheckboxNoteItemList() []CheckboxNoteItem
GetFailAddCheckboxNoteItemList GetFailAddCheckboxNoteItemList
func (*NotesAPI) GetFailAddNoteItemList ¶ added in v1.0.6
GetFailAddNoteItemList GetFailAddNoteItemList
func (*NotesAPI) GetFailUpdateCheckboxNoteItemList ¶ added in v1.0.6
func (a *NotesAPI) GetFailUpdateCheckboxNoteItemList() []CheckboxNoteItem
GetFailUpdateCheckboxNoteItemList GetFailUpdateCheckboxNoteItemList
func (*NotesAPI) GetFailUpdateNoteItemList ¶ added in v1.0.6
GetFailUpdateNoteItemList GetFailUpdateNoteItemList
func (*NotesAPI) GetNoteList ¶ added in v1.0.15
GetNoteList GetNoteList
func (*NotesAPI) GetNoteUserList ¶ added in v1.0.1
GetNoteUserList GetNoteUserList
func (*NotesAPI) GetUsersNotes ¶
GetUsersNotes GetUsersNotes
func (*NotesAPI) Login ¶ added in v1.0.3
func (a *NotesAPI) Login(u *User) *LoginResponse
Login Login
func (*NotesAPI) OverrideProxy ¶
OverrideProxy OverrideProxy
func (*NotesAPI) ResetPassword ¶ added in v1.0.4
ResetPassword ResetPassword
func (*NotesAPI) SetNoteList ¶ added in v1.0.9
SetNoteList SetNoteList
func (*NotesAPI) UpdateCheckboxItem ¶
func (a *NotesAPI) UpdateCheckboxItem(ni *CheckboxNoteItem) *Response
UpdateCheckboxItem UpdateCheckboxItem
func (*NotesAPI) UpdateNote ¶
UpdateNote UpdateNote
func (*NotesAPI) UpdateNoteItem ¶
UpdateNoteItem UpdateNoteItem
func (*NotesAPI) UpdateUser ¶
UpdateUser UpdateUser
type Response ¶
type Response struct {
Success bool `json:"success"`
Code int64 `json:"code"`
Message string `json:"message"`
}
Response Response
type ResponseID ¶
type ResponseID struct {
ID int64 `json:"id"`
Success bool `json:"success"`
Code int64 `json:"code"`
Message string `json:"message"`
}
ResponseID ResponseID