Documentation
¶
Index ¶
- type BookmarkManager
- func (m *BookmarkManager) AddBookmark(bm *entity.Bookmark) error
- func (m *BookmarkManager) AllBookmarks() ([]entity.Bookmark, error)
- func (m *BookmarkManager) DeleteBookmark(bm *entity.Bookmark) error
- func (m *BookmarkManager) ExportBookmarks(w io.Writer) error
- func (m *BookmarkManager) LoadBookmarkByID(id uint64) entity.Bookmark
- func (m *BookmarkManager) QueueScrape(bm *entity.Bookmark)
- func (m *BookmarkManager) RunQueue()
- func (m *BookmarkManager) SaveBookmark(bm *entity.Bookmark) error
- func (m *BookmarkManager) ScrapeAndIndex(bm *entity.Bookmark) error
- func (m *BookmarkManager) Search(opts SearchOptions) ([]entity.BookmarkSearchResult, error)
- func (m *BookmarkManager) Stats() (entity.DBStats, error)
- func (m *BookmarkManager) UpdateContent()
- func (m *BookmarkManager) UpdateIndexForBookmark(bm *entity.Bookmark)
- type ConfigManager
- type DB
- type SearchOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookmarkManager ¶
type BookmarkManager struct {
// contains filtered or unexported fields
}
func NewBookmarkManager ¶
func NewBookmarkManager(db *DB) *BookmarkManager
func (*BookmarkManager) AddBookmark ¶
func (m *BookmarkManager) AddBookmark(bm *entity.Bookmark) error
AddBookmark adds a bookmark to the database. It returns an error if this bookmark already exists (based on URL match). The entity.Bookmark ID field will be updated.
func (*BookmarkManager) AllBookmarks ¶ added in v0.1.0
func (m *BookmarkManager) AllBookmarks() ([]entity.Bookmark, error)
AllBookmarks returns all bookmarks. It does not use the index for this operation.
func (*BookmarkManager) DeleteBookmark ¶
func (m *BookmarkManager) DeleteBookmark(bm *entity.Bookmark) error
func (*BookmarkManager) ExportBookmarks ¶
func (m *BookmarkManager) ExportBookmarks(w io.Writer) error
ExportBookmarks exports all bookmarks to an io.Writer
func (*BookmarkManager) LoadBookmarkByID ¶
func (m *BookmarkManager) LoadBookmarkByID(id uint64) entity.Bookmark
func (*BookmarkManager) QueueScrape ¶
func (m *BookmarkManager) QueueScrape(bm *entity.Bookmark)
func (*BookmarkManager) RunQueue ¶
func (m *BookmarkManager) RunQueue()
func (*BookmarkManager) SaveBookmark ¶
func (m *BookmarkManager) SaveBookmark(bm *entity.Bookmark) error
func (*BookmarkManager) ScrapeAndIndex ¶
func (m *BookmarkManager) ScrapeAndIndex(bm *entity.Bookmark) error
func (*BookmarkManager) Search ¶
func (m *BookmarkManager) Search(opts SearchOptions) ([]entity.BookmarkSearchResult, error)
func (*BookmarkManager) Stats ¶ added in v0.0.31
func (m *BookmarkManager) Stats() (entity.DBStats, error)
func (*BookmarkManager) UpdateContent ¶
func (m *BookmarkManager) UpdateContent()
func (*BookmarkManager) UpdateIndexForBookmark ¶ added in v0.0.17
func (m *BookmarkManager) UpdateIndexForBookmark(bm *entity.Bookmark)
type ConfigManager ¶
type ConfigManager struct {
// contains filtered or unexported fields
}
func NewConfigManager ¶
func NewConfigManager(db *DB) *ConfigManager
func (*ConfigManager) DefaultConfig ¶
func (cmm *ConfigManager) DefaultConfig() entity.Config
func (*ConfigManager) LoadConfig ¶
func (cmm *ConfigManager) LoadConfig() (entity.Config, error)
func (*ConfigManager) SaveConfig ¶
func (cmm *ConfigManager) SaveConfig(conf *entity.Config) error
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) IncrementSearches ¶ added in v0.0.30
IncrementSearches increments the number of searches we have ever performed by one.
func (*DB) InitIndices ¶
func (db *DB) InitIndices()
func (*DB) Open ¶
Open opens the bookmark boltdb, and the bleve index. It returns true if the index was newly created, so the caller knows all bookmarks need to be re-scraped
func (*DB) UpdateBookmarkStats ¶ added in v0.0.30
UpdateBookmarkStats updates the history on the number of bookmarks and words indexed.
type SearchOptions ¶ added in v0.0.21
Click to show internal directories.
Click to hide internal directories.