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.Note, error) GetAllBookNotes(book *note.Book, sortBy, order string) ([]*note.Note, error) GetNoteByID(id int64) (*note.Note, error) GetAllNotesByIDs(ids []int64) ([]*note.Note, error) CreateNote(n *note.Note) error EditNote(n *note.Note) error DeleteNote(n *note.Note) error GetAllBooks() ([]*note.Book, 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.Tag, error) GetAllTags() ([]*note.Tag, error) CreateTag(t *note.Tag) error LoadNoteTags(n *note.Note) error GetOrCreateTagByName(name string) (*note.Tag, error) GetTagByName(name string) (*note.Tag, error) Close() }
DB interface for the database providers
Click to show internal directories.
Click to hide internal directories.