Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrProviderNotSupported = errors.New("Unsupported database provider")
ErrProviderNotSupported database provider given is not supported
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface {
GetAllNotes(sortBy, order string) (note.Notes, error)
GetAllBookNotes(book *note.Book, sortBy, order string) (note.Notes, error)
GetNoteByID(id int64) (*note.Note, error)
GetNoteByNote(n *note.Note) error
GetAllNotesByIDs(ids []int64) (note.Notes, error)
CreateNote(n *note.Note) error
EditNote(n *note.Note) error
DeleteNote(n *note.Note) error
GetAllBooks() (note.Books, error)
GetOrCreateBookByName(name string) (*note.Book, error)
GetBookByName(name string) (*note.Book, error)
CreateBook(b *note.Book) error
MergeBooks(b1 *note.Book, b2 *note.Book) error
EditNoteByIDBook(ids []int64, bk *note.Book) error
EditBook(b1 *note.Book) error
LoadBook(b *note.Book) error
DeleteBook(bk *note.Book) error
GetAllBookTags(bk *note.Book) (note.Tags, error)
GetAllTags() (note.Tags, error)
CreateTag(t *note.Tag) error
LoadNoteTags(n *note.Note) error
GetOrCreateTagByName(name string) (*note.Tag, error)
GetTagByName(name string) (*note.Tag, error)
Close() error
}
DB interface for the database providers
Click to show internal directories.
Click to hide internal directories.