Documentation
¶
Index ¶
- type MediaLinks
- type SQLiteStorage
- func (s *SQLiteStorage) Close() error
- func (s *SQLiteStorage) CountItems() int
- func (s *SQLiteStorage) CreateFeed(params model.CreateFeedParams) *model.Feed
- func (s *SQLiteStorage) CreateFolder(title string) *model.Folder
- func (s *SQLiteStorage) CreateItems(items []model.Item) bool
- func (s *SQLiteStorage) DeleteFeed(feedId int64) bool
- func (s *SQLiteStorage) DeleteFolder(folderId int64) bool
- func (s *SQLiteStorage) DeleteItem(id int64) bool
- func (s *SQLiteStorage) DeleteOldItems()
- func (s *SQLiteStorage) FeedStats() []model.FeedStat
- func (s *SQLiteStorage) GetFeed(id int64) *model.Feed
- func (s *SQLiteStorage) GetFeedState(feedID int64) (*model.FeedState, error)
- func (s *SQLiteStorage) GetItem(id int64) *model.Item
- func (s *SQLiteStorage) GetSettings() model.Settings
- func (s *SQLiteStorage) ListFeedStates() ([]model.FeedState, error)
- func (s *SQLiteStorage) ListFeeds() []model.Feed
- func (s *SQLiteStorage) ListFolders() []model.Folder
- func (s *SQLiteStorage) ListItems(filter model.ItemFilter, limit int, newestFirst bool, withContent bool) []model.Item
- func (s *SQLiteStorage) MarkItemsRead(filter model.MarkFilter) bool
- func (s *SQLiteStorage) UpdateFeed(feedId int64, params model.UpdateFeedParams) (bool, error)
- func (s *SQLiteStorage) UpdateFeedState(feedID int64, params model.UpdateFeedStateParams) (bool, error)
- func (s *SQLiteStorage) UpdateFolder(folderId int64, params model.UpdateFolderParams) (bool, error)
- func (s *SQLiteStorage) UpdateItem(id int64, params model.UpdateItemParams) bool
- func (s *SQLiteStorage) UpdateItemStatus(item_id int64, status model.ItemStatus) bool
- func (s *SQLiteStorage) UpdateSettings(params model.UpdateSettingsParams) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MediaLinks ¶
type MediaLinks model.MediaLinks
func (*MediaLinks) Scan ¶
func (m *MediaLinks) Scan(src any) error
type SQLiteStorage ¶
type SQLiteStorage struct {
// contains filtered or unexported fields
}
func New ¶
func New(path string) (*SQLiteStorage, error)
func (*SQLiteStorage) Close ¶
func (s *SQLiteStorage) Close() error
func (*SQLiteStorage) CountItems ¶
func (s *SQLiteStorage) CountItems() int
func (*SQLiteStorage) CreateFeed ¶
func (s *SQLiteStorage) CreateFeed(params model.CreateFeedParams) *model.Feed
func (*SQLiteStorage) CreateFolder ¶
func (s *SQLiteStorage) CreateFolder(title string) *model.Folder
func (*SQLiteStorage) CreateItems ¶
func (s *SQLiteStorage) CreateItems(items []model.Item) bool
func (*SQLiteStorage) DeleteFeed ¶
func (s *SQLiteStorage) DeleteFeed(feedId int64) bool
func (*SQLiteStorage) DeleteFolder ¶
func (s *SQLiteStorage) DeleteFolder(folderId int64) bool
func (*SQLiteStorage) DeleteItem ¶
func (s *SQLiteStorage) DeleteItem(id int64) bool
func (*SQLiteStorage) DeleteOldItems ¶
func (s *SQLiteStorage) DeleteOldItems()
Delete old articles from the database to cleanup space.
The rules:
- Never delete starred entries.
- Keep at least 50 latest items for each feed.
- Delete entries older than 90 days relative to the latest arrived item in the same feed.
func (*SQLiteStorage) FeedStats ¶
func (s *SQLiteStorage) FeedStats() []model.FeedStat
func (*SQLiteStorage) GetFeedState ¶
func (s *SQLiteStorage) GetFeedState(feedID int64) (*model.FeedState, error)
func (*SQLiteStorage) GetSettings ¶
func (s *SQLiteStorage) GetSettings() model.Settings
func (*SQLiteStorage) ListFeedStates ¶
func (s *SQLiteStorage) ListFeedStates() ([]model.FeedState, error)
func (*SQLiteStorage) ListFeeds ¶
func (s *SQLiteStorage) ListFeeds() []model.Feed
func (*SQLiteStorage) ListFolders ¶
func (s *SQLiteStorage) ListFolders() []model.Folder
func (*SQLiteStorage) ListItems ¶
func (s *SQLiteStorage) ListItems( filter model.ItemFilter, limit int, newestFirst bool, withContent bool, ) []model.Item
func (*SQLiteStorage) MarkItemsRead ¶
func (s *SQLiteStorage) MarkItemsRead(filter model.MarkFilter) bool
func (*SQLiteStorage) UpdateFeed ¶
func (s *SQLiteStorage) UpdateFeed(feedId int64, params model.UpdateFeedParams) (bool, error)
func (*SQLiteStorage) UpdateFeedState ¶
func (s *SQLiteStorage) UpdateFeedState(feedID int64, params model.UpdateFeedStateParams) (bool, error)
func (*SQLiteStorage) UpdateFolder ¶
func (s *SQLiteStorage) UpdateFolder(folderId int64, params model.UpdateFolderParams) (bool, error)
func (*SQLiteStorage) UpdateItem ¶
func (s *SQLiteStorage) UpdateItem(id int64, params model.UpdateItemParams) bool
func (*SQLiteStorage) UpdateItemStatus ¶
func (s *SQLiteStorage) UpdateItemStatus(item_id int64, status model.ItemStatus) bool
func (*SQLiteStorage) UpdateSettings ¶
func (s *SQLiteStorage) UpdateSettings(params model.UpdateSettingsParams) bool
Click to show internal directories.
Click to hide internal directories.