Documentation ¶
Index ¶
- func SetLogger(logger zerolog.Logger)
- type Datastore
- type ID
- type Parser
- type SQLite
- func (db *SQLite) AddFeed(ctx context.Context, feedURL string, title *string, desc *string, ...) (*entity.Feed, bool, error)
- func (db *SQLite) DeleteFeeds(ctx context.Context, ids []entity.ID) error
- func (db *SQLite) EditEntries(ctx context.Context, ops []*entity.EntryEditOp) ([]*entity.Entry, error)
- func (db *SQLite) EditFeeds(ctx context.Context, ops []*entity.FeedEditOp) ([]*entity.Feed, error)
- func (db *SQLite) ExportSubscription(ctx context.Context, title *string) (*entity.Subscription, error)
- func (db *SQLite) GetEntry(ctx context.Context, id entity.ID) (*entity.Entry, error)
- func (db *SQLite) GetGlobalStats(ctx context.Context) (*entity.Stats, error)
- func (db *SQLite) ImportSubscription(ctx context.Context, sub *entity.Subscription) (processed int, imported int, err error)
- func (db *SQLite) ListEntries(ctx context.Context, feedIDs []entity.ID, isBookmarked *bool) ([]*entity.Entry, error)
- func (db *SQLite) ListFeeds(ctx context.Context, maxEntriesPerFeed *uint32) ([]*entity.Feed, error)
- func (db *SQLite) PullFeeds(ctx context.Context, ids []entity.ID, entryReadStatus *bool, ...) <-chan entity.PullResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Datastore ¶
type Datastore interface { AddFeed( ctx context.Context, feedURL string, title *string, desc *string, tags []string, isStarred *bool, pullTimeout *time.Duration, ) ( feed *entity.Feed, added bool, err error, ) EditFeeds( ctx context.Context, ops []*entity.FeedEditOp, ) ( feeds []*entity.Feed, err error, ) ListFeeds( ctx context.Context, maxEntriesPerFeed *uint32, ) ( feeds []*entity.Feed, err error, ) PullFeeds( ctx context.Context, ids []entity.ID, entryReadStatus *bool, maxEntriesPerFeed *uint32, timeoutPerFeed *time.Duration, ) ( results <-chan entity.PullResult, ) DeleteFeeds( ctx context.Context, ids []entity.ID, ) ( err error, ) ListEntries( ctx context.Context, feedIDs []entity.ID, isBookmarked *bool, ) ( entries []*entity.Entry, err error, ) EditEntries( ctx context.Context, ops []*entity.EntryEditOp, ) ( entries []*entity.Entry, err error, ) GetEntry( ctx context.Context, id entity.ID, ) ( entry *entity.Entry, err error, ) ExportSubscription( ctx context.Context, title *string, ) ( subscription *entity.Subscription, err error, ) ImportSubscription( ctx context.Context, sub *entity.Subscription, ) ( processed int, imported int, err error, ) GetGlobalStats( ctx context.Context, ) ( stats *entity.Stats, err error, ) }
Datastore describes the persistence layer interface.
type Parser ¶
type Parser interface {
ParseURLWithContext(feedURL string, ctx context.Context) (feed *gofeed.Feed, err error)
}
Parser captures the gofeed parser as a pluggable interface.
type SQLite ¶
type SQLite struct {
// contains filtered or unexported fields
}
func (*SQLite) AddFeed ¶
func (db *SQLite) AddFeed( ctx context.Context, feedURL string, title *string, desc *string, tags []string, isStarred *bool, pullTimeout *time.Duration, ) (*entity.Feed, bool, error)
AddFeed adds the given feed into the database.
func (*SQLite) DeleteFeeds ¶
func (*SQLite) EditEntries ¶
func (db *SQLite) EditEntries( ctx context.Context, ops []*entity.EntryEditOp, ) ([]*entity.Entry, error)
EditEntries updates fields of an entry.
func (*SQLite) EditFeeds ¶
func (db *SQLite) EditFeeds( ctx context.Context, ops []*entity.FeedEditOp, ) ([]*entity.Feed, error)
EditFeed updates fields of an feed.
func (*SQLite) ExportSubscription ¶
func (*SQLite) GetGlobalStats ¶
func (*SQLite) ImportSubscription ¶
func (*SQLite) ListEntries ¶
Source Files ¶
- datastore.go
- parser.go
- record.go
- sqlite.go
- sqlite_add_feed.go
- sqlite_delete_feeds.go
- sqlite_edit_entries.go
- sqlite_edit_feeds.go
- sqlite_export_subscription.go
- sqlite_get_entry.go
- sqlite_get_global_stats.go
- sqlite_import_subscription.go
- sqlite_list_entries.go
- sqlite_list_feeds.go
- sqlite_pull_feeds.go
Click to show internal directories.
Click to hide internal directories.