Documentation ¶
Index ¶
- type AccountAuth
- type AuthService
- type AuthServiceOp
- type Client
- type FilesService
- type FilesServiceOp
- type Note
- type NoteFile
- type Notebook
- type NotebooksService
- type NotebooksServiceOp
- func (s NotebooksServiceOp) AddNotebook(title string, parentId string, seq int) (*Notebook, error)
- func (s NotebooksServiceOp) DeleteNotebook(notebookId string, usn int) error
- func (s NotebooksServiceOp) GetNotebook(notebookId string) (*Notebook, error)
- func (s NotebooksServiceOp) GetNotebooks() ([]Notebook, error)
- func (s NotebooksServiceOp) GetSyncNotebooks(afterUsn, maxEntry int) ([]Notebook, error)
- func (s NotebooksServiceOp) UpdateNotebook(notebookId string, title string, parentId string, seq int) (*Notebook, error)
- type NotesService
- type NotesServiceOp
- type ReUpdate
- type SyncState
- type Tag
- type TagsService
- type TagsServiceOp
- type User
- type UserService
- type UserServiceOp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountAuth ¶
type AuthService ¶
type AuthServiceOp ¶
type AuthServiceOp struct {
// contains filtered or unexported fields
}
func (AuthServiceOp) Logout ¶
func (s AuthServiceOp) Logout() error
type Client ¶
type Client struct { APIHost string Username string Account AccountAuth Auth AuthService Notes NotesService Notebooks NotebooksService Tags TagsService User UserService Files FilesService // contains filtered or unexported fields }
type FilesService ¶
type FilesServiceOp ¶
type FilesServiceOp struct {
// contains filtered or unexported fields
}
func (FilesServiceOp) GetAllAttachs ¶
func (s FilesServiceOp) GetAllAttachs(noteId string) error
func (FilesServiceOp) GetAttach ¶
func (s FilesServiceOp) GetAttach(fileId string) error
func (FilesServiceOp) GetImage ¶
func (s FilesServiceOp) GetImage(fileId string) error
type Note ¶
type Note struct { NoteId string `json:"NoteId"` NotebookId string `json:"NotebookId"` UserId string `json:"UserId"` Title string `json:"Title"` Tags []string `json:"Tags"` Content string `json:"Content"` IsMarkdown bool `json:"IsMarkdown"` IsBlog bool `json:"IsBlog"` IsTrash bool `json:"IsBlog"` Files []NoteFile `json:"Files"` CreatedTime time.Time `json:"CreatedTime"` UpdatedTime time.Time `json:"UpdateTime"` PublicTime time.Time `json:"PublicTime"` Usn int `json:"Usn"` }
type Notebook ¶
type Notebook struct { CreatedTime string `json:"CreatedTime"` IsBlog bool `json:"IsBlog"` IsDeleted bool `json:"IsDeleted"` NotebookId string `json:"NotebookId"` ParentNotebookId string `json:"ParentNotebookId"` Seq int `json:"Seq"` Title string `json:"Title"` UpdatedTime string `json:"UpdatedTime"` UrlTitle string `json:"UrlTitle"` UserId string `json:"UserId"` Usn int `json:"Usn"` }
type NotebooksService ¶
type NotebooksService interface { AddNotebook(string, string, int) (*Notebook, error) DeleteNotebook(string, int) error UpdateNotebook(string, string, string, int) (*Notebook, error) GetNotebooks() ([]Notebook, error) GetNotebook(string) (*Notebook, error) GetSyncNotebooks(int, int) ([]Notebook, error) }
type NotebooksServiceOp ¶
type NotebooksServiceOp struct {
// contains filtered or unexported fields
}
func (NotebooksServiceOp) AddNotebook ¶
func (NotebooksServiceOp) DeleteNotebook ¶
func (s NotebooksServiceOp) DeleteNotebook(notebookId string, usn int) error
func (NotebooksServiceOp) GetNotebook ¶
func (s NotebooksServiceOp) GetNotebook(notebookId string) (*Notebook, error)
func (NotebooksServiceOp) GetNotebooks ¶
func (s NotebooksServiceOp) GetNotebooks() ([]Notebook, error)
func (NotebooksServiceOp) GetSyncNotebooks ¶
func (s NotebooksServiceOp) GetSyncNotebooks(afterUsn, maxEntry int) ([]Notebook, error)
func (NotebooksServiceOp) UpdateNotebook ¶
type NotesService ¶
type NotesServiceOp ¶
type NotesServiceOp struct {
// contains filtered or unexported fields
}
func (NotesServiceOp) GetNoteAndContent ¶
func (s NotesServiceOp) GetNoteAndContent(noteId string) (*Note, error)
func (NotesServiceOp) GetNotes ¶
func (s NotesServiceOp) GetNotes() ([]Note, error)
func (NotesServiceOp) GetSyncNotes ¶
func (s NotesServiceOp) GetSyncNotes(afterUsn, maxEntry int) ([]Note, error)
func (NotesServiceOp) NotesFromNotebook ¶
func (s NotesServiceOp) NotesFromNotebook(notebookId string) ([]Note, error)
type TagsService ¶
type TagsServiceOp ¶
type TagsServiceOp struct {
// contains filtered or unexported fields
}
func (TagsServiceOp) GetSyncTags ¶
func (s TagsServiceOp) GetSyncTags(afterUsn, maxEntry int) ([]Tag, error)
type UserService ¶
type UserServiceOp ¶
type UserServiceOp struct {
// contains filtered or unexported fields
}
func (UserServiceOp) GetSyncState ¶
func (s UserServiceOp) GetSyncState() (*SyncState, error)
func (UserServiceOp) Info ¶
func (s UserServiceOp) Info() (*User, error)
func (UserServiceOp) UpdateLogo ¶
func (s UserServiceOp) UpdateLogo(path string) error
func (UserServiceOp) UpdatePwd ¶
func (s UserServiceOp) UpdatePwd(oldPwd, newPwd string) error
func (UserServiceOp) UpdateUsername ¶
func (s UserServiceOp) UpdateUsername(name string) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.