Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheRepository ¶
type CacheRepository interface {
GetFromCache(key string) (*model.CacheItem, error)
StoreToCache(key string, item *model.CacheItem) error
ClearCache() error
EvictFromCache(before time.Time) error
}
CacheRepository interface to manage cache
type DB ¶
type DB interface {
FeedRepository
OutputRepository
CacheRepository
SearchRepository
Close() error
}
DB is the interface with the database
type FeedRepository ¶
type FeedRepository interface {
ListFeeds(page, size int) (*model.FeedDefPage, error)
CountFeeds() (int, error)
ExistsFeed(url string) bool
GetFeed(id string) (*model.FeedDef, error)
DeleteFeed(id string) (*model.FeedDef, error)
SaveFeed(feed *model.FeedDef) error
ForEachFeed(cb func(*model.FeedDef) error) error
}
FeedRepository interface to manage feeds
type OutputRepository ¶
type OutputRepository interface {
ListOutputs(page, limit int) (*model.OutputDefCollection, error)
GetOutput(ID string) (*model.OutputDef, error)
DeleteOutput(ID string) (*model.OutputDef, error)
SaveOutput(output model.OutputDef) (*model.OutputDef, error)
ForEachOutput(cb func(*model.OutputDef) error) error
ClearOutputs() error
}
OutputRepository interface to manage feeds
type SearchRepository ¶
type SearchRepository interface {
BuildInitialIndex() error
SearchFeeds(query string, page, size int) (*model.FeedDefPage, error)
}
SearchRepository interface to manage search index
Click to show internal directories.
Click to hide internal directories.