Documentation
¶
Index ¶
- type InMemoryStore
- func (store *InMemoryStore) ClearCache() error
- func (store *InMemoryStore) DeleteFeed(id string) (*app.Feed, error)
- func (store *InMemoryStore) EvictFromCache(before time.Time) error
- func (store *InMemoryStore) ExistsFeed(url string) bool
- func (store *InMemoryStore) ForEachFeed(cb func(*app.Feed) error) error
- func (store *InMemoryStore) GetFeed(id string) (*app.Feed, error)
- func (store *InMemoryStore) GetFromCache(key string) (*model.CacheItem, error)
- func (store *InMemoryStore) ListFeeds(page, limit int) (*app.FeedCollection, error)
- func (store *InMemoryStore) SaveFeed(feed *app.Feed) error
- func (store *InMemoryStore) Shutdown() error
- func (store *InMemoryStore) StoreToCache(key string, item *model.CacheItem) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryStore ¶
type InMemoryStore struct {
// contains filtered or unexported fields
}
InMemoryStore is a data store backed by InMemoryDB
func NewInMemoryStore ¶
func NewInMemoryStore() *InMemoryStore
NewInMemoryStore creates a data store backed by InMemoryDB
func (*InMemoryStore) ClearCache ¶
func (store *InMemoryStore) ClearCache() error
ClearCache removes all items from the cache.
func (*InMemoryStore) DeleteFeed ¶
func (store *InMemoryStore) DeleteFeed(id string) (*app.Feed, error)
DeleteFeed removes a feed.
func (*InMemoryStore) EvictFromCache ¶
func (store *InMemoryStore) EvictFromCache(before time.Time) error
EvictFromCache manage the cache eviction.
func (*InMemoryStore) ExistsFeed ¶
func (store *InMemoryStore) ExistsFeed(url string) bool
ExistsFeed returns true if a feed exists for this url.
func (*InMemoryStore) ForEachFeed ¶
func (store *InMemoryStore) ForEachFeed(cb func(*app.Feed) error) error
ForEachFeed iterates over all feeds
func (*InMemoryStore) GetFeed ¶
func (store *InMemoryStore) GetFeed(id string) (*app.Feed, error)
GetFeed returns a stored Feed.
func (*InMemoryStore) GetFromCache ¶
func (store *InMemoryStore) GetFromCache(key string) (*model.CacheItem, error)
GetFromCache returns a cached item.
func (*InMemoryStore) ListFeeds ¶
func (store *InMemoryStore) ListFeeds(page, limit int) (*app.FeedCollection, error)
ListFeeds returns a paginated list of feeds.
func (*InMemoryStore) SaveFeed ¶
func (store *InMemoryStore) SaveFeed(feed *app.Feed) error
SaveFeed stores a feed.
func (*InMemoryStore) Shutdown ¶ added in v1.2.0
func (store *InMemoryStore) Shutdown() error
Shutdown the DB.
func (*InMemoryStore) StoreToCache ¶
func (store *InMemoryStore) StoreToCache(key string, item *model.CacheItem) error
StoreToCache stores a item into the cache.
Click to show internal directories.
Click to hide internal directories.