sqlite

package
v0.0.0-...-a18ed04 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MediaLinks model.MediaLinks

func (*MediaLinks) Scan

func (m *MediaLinks) Scan(src any) error

func (MediaLinks) Value

func (m MediaLinks) Value() (driver.Value, 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) GetFeed

func (s *SQLiteStorage) GetFeed(id int64) *model.Feed

func (*SQLiteStorage) GetFeedState

func (s *SQLiteStorage) GetFeedState(feedID int64) (*model.FeedState, error)

func (*SQLiteStorage) GetItem

func (s *SQLiteStorage) GetItem(id int64) *model.Item

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL