Documentation
¶
Index ¶
- type InMemoryStore
- func (store *InMemoryStore) BuildInitialIndex() error
- func (store *InMemoryStore) ClearCache() error
- func (store *InMemoryStore) ClearOutputs() error
- func (store *InMemoryStore) Close() error
- func (store *InMemoryStore) CountFeeds() (int, error)
- func (store *InMemoryStore) DeleteFeed(id string) (*model.FeedDef, error)
- func (store *InMemoryStore) DeleteOutput(ID string) (*model.OutputDef, error)
- func (store *InMemoryStore) EvictFromCache(before time.Time) error
- func (store *InMemoryStore) ExistsFeed(url string) bool
- func (store *InMemoryStore) ForEachFeed(cb func(*model.FeedDef) error) error
- func (store *InMemoryStore) ForEachOutput(cb func(*model.OutputDef) error) error
- func (store *InMemoryStore) GetFeed(id string) (*model.FeedDef, error)
- func (store *InMemoryStore) GetFromCache(key string) (*model.CacheItem, error)
- func (store *InMemoryStore) GetOutput(ID string) (*model.OutputDef, error)
- func (store *InMemoryStore) ListFeeds(page, size int) (*model.FeedDefPage, error)
- func (store *InMemoryStore) ListOutputs(page, limit int) (*model.OutputDefCollection, error)
- func (store *InMemoryStore) SaveFeed(feed *model.FeedDef) error
- func (store *InMemoryStore) SaveOutput(output model.OutputDef) (*model.OutputDef, error)
- func (store *InMemoryStore) SearchFeeds(query string, page, size int) (*model.FeedDefPage, 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) BuildInitialIndex ¶
func (store *InMemoryStore) BuildInitialIndex() error
BuildInitialIndex create initial index (only if empty)
func (*InMemoryStore) ClearCache ¶
func (store *InMemoryStore) ClearCache() error
ClearCache removes all items from the cache.
func (*InMemoryStore) ClearOutputs ¶
func (store *InMemoryStore) ClearOutputs() error
ClearOutputs clear all outputs
func (*InMemoryStore) CountFeeds ¶
func (store *InMemoryStore) CountFeeds() (int, error)
CountFeeds returns total numer of feeds.
func (*InMemoryStore) DeleteFeed ¶
func (store *InMemoryStore) DeleteFeed(id string) (*model.FeedDef, error)
DeleteFeed removes a feed.
func (*InMemoryStore) DeleteOutput ¶
func (store *InMemoryStore) DeleteOutput(ID string) (*model.OutputDef, error)
DeleteOutput removes a output.
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(*model.FeedDef) error) error
ForEachFeed iterates over all feeds
func (*InMemoryStore) ForEachOutput ¶
func (store *InMemoryStore) ForEachOutput(cb func(*model.OutputDef) error) error
ForEachOutput iterates over all outputs
func (*InMemoryStore) GetFeed ¶
func (store *InMemoryStore) GetFeed(id string) (*model.FeedDef, 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) GetOutput ¶
func (store *InMemoryStore) GetOutput(ID string) (*model.OutputDef, error)
GetOutput returns a stored Output.
func (*InMemoryStore) ListFeeds ¶
func (store *InMemoryStore) ListFeeds(page, size int) (*model.FeedDefPage, error)
ListFeeds returns a paginated list of feeds.
func (*InMemoryStore) ListOutputs ¶
func (store *InMemoryStore) ListOutputs(page, limit int) (*model.OutputDefCollection, error)
ListOutputs returns a paginated list of outputs.
func (*InMemoryStore) SaveFeed ¶
func (store *InMemoryStore) SaveFeed(feed *model.FeedDef) error
SaveFeed stores a feed.
func (*InMemoryStore) SaveOutput ¶
SaveOutput stores a output.
func (*InMemoryStore) SearchFeeds ¶
func (store *InMemoryStore) SearchFeeds(query string, page, size int) (*model.FeedDefPage, error)
SearchFeeds search feeds using search index
func (*InMemoryStore) StoreToCache ¶
func (store *InMemoryStore) StoreToCache(key string, item *model.CacheItem) error
StoreToCache stores a item into the cache.