Documentation ¶
Index ¶
- Variables
- type Storage
- func (st *Storage) ClearFeeds() error
- func (st *Storage) ClearWebhookStats() error
- func (st *Storage) CullItems(cf config.ConfigFeed, limit int) error
- func (st *Storage) DB() *bolt.DB
- func (st *Storage) GetFeedStats(name string) (*app.FeedStats, error)
- func (st *Storage) GetItemState(cf config.ConfigFeed, item *gofeed.Item) (app.ItemState, error)
- func (st *Storage) GetWebhookStats(name string) (*app.WebhookStats, error)
- func (st *Storage) Init() error
- func (st *Storage) ItemCount(cf config.ConfigFeed) int
- func (st *Storage) ListFeeds() ([]string, error)
- func (st *Storage) ListItems(feed string) ([]*app.ProcessedItem, error)
- func (st *Storage) RecordItem(cf config.ConfigFeed, item *gofeed.Item) error
- func (st *Storage) UpdateFeedStats(name string, f func(fs *app.FeedStats) error) error
- func (st *Storage) UpdateWebhookStats(name string, f func(ws *app.WebhookStats) error) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) ClearFeeds ¶
func (*Storage) ClearWebhookStats ¶ added in v0.2.3
func (*Storage) CullItems ¶
func (st *Storage) CullItems(cf config.ConfigFeed, limit int) error
CullItems deletes the oldest items when there are more items then a limit
func (*Storage) GetFeedStats ¶
GetFeedStats returns the stats for a feed.
func (*Storage) GetItemState ¶
GetItemState return the state of an item.
func (*Storage) GetWebhookStats ¶
func (st *Storage) GetWebhookStats(name string) (*app.WebhookStats, error)
func (*Storage) RecordItem ¶
func (*Storage) UpdateFeedStats ¶
UpdateFeedStats executes a function that updates the stats for feed by name.
func (*Storage) UpdateWebhookStats ¶
UpdateWebhookStats executes a function that updates the stats for webhook by name.
Click to show internal directories.
Click to hide internal directories.