Documentation
¶
Index ¶
- type Item
- type SQLiteStore
- func (sls *SQLiteStore) BeginBatch() error
- func (sls SQLiteStore) CountUnread() (int, error)
- func (sls SQLiteStore) DeleteByFeedURL(feedurl string, incFavourites bool) error
- func (sls *SQLiteStore) EndBatch() error
- func (sls SQLiteStore) GetAllFeedURLs() ([]string, error)
- func (sls SQLiteStore) GetAllItems(ordering string) ([]Item, error)
- func (sls SQLiteStore) GetItemByID(ID int) (Item, error)
- func (sls SQLiteStore) MarkAllRead() error
- func (sls SQLiteStore) ToggleFavourite(ID int) error
- func (sls SQLiteStore) ToggleRead(ID int) error
- func (sls *SQLiteStore) UpsertItem(item Item) error
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
func NewSQLiteStore ¶
func NewSQLiteStore(basePath string, dbName string) (*SQLiteStore, error)
func (*SQLiteStore) BeginBatch ¶ added in v2.16.0
func (sls *SQLiteStore) BeginBatch() error
Begin a transaction. UpsertItem will use this transaction until client code calls EndBatch().
func (SQLiteStore) CountUnread ¶ added in v2.13.0
func (sls SQLiteStore) CountUnread() (int, error)
func (SQLiteStore) DeleteByFeedURL ¶
func (sls SQLiteStore) DeleteByFeedURL(feedurl string, incFavourites bool) error
func (*SQLiteStore) EndBatch ¶ added in v2.16.0
func (sls *SQLiteStore) EndBatch() error
Commit a transaction. This commits any changes made since BeginBatch() and reset sls.batch to nil so that subsequent calls to UpsertItem() will not use a transaction.
func (SQLiteStore) GetAllFeedURLs ¶
func (sls SQLiteStore) GetAllFeedURLs() ([]string, error)
func (SQLiteStore) GetAllItems ¶
func (sls SQLiteStore) GetAllItems(ordering string) ([]Item, error)
TODO: pagination
func (SQLiteStore) GetItemByID ¶ added in v2.5.0
func (sls SQLiteStore) GetItemByID(ID int) (Item, error)
func (SQLiteStore) MarkAllRead ¶ added in v2.5.0
func (sls SQLiteStore) MarkAllRead() error
func (SQLiteStore) ToggleFavourite ¶ added in v2.1.5
func (sls SQLiteStore) ToggleFavourite(ID int) error
func (SQLiteStore) ToggleRead ¶
func (sls SQLiteStore) ToggleRead(ID int) error
func (*SQLiteStore) UpsertItem ¶
func (sls *SQLiteStore) UpsertItem(item Item) error
type Store ¶
type Store interface {
UpsertItem(item Item) error
BeginBatch() error
EndBatch() error
GetAllItems(ordering string) ([]Item, error)
GetItemByID(ID int) (Item, error)
GetAllFeedURLs() ([]string, error)
ToggleRead(ID int) error
MarkAllRead() error
ToggleFavourite(ID int) error
DeleteByFeedURL(feedurl string, incFavourites bool) error
CountUnread() (int, error)
}
Click to show internal directories.
Click to hide internal directories.