store

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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