store

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

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

DB is the data store

func Configure

func Configure(datasource string) (DB, error)

Configure the data store regarding the datasource URI

type FeedRepository

type FeedRepository interface {
	ListFeeds(page, limit int) (*app.FeedCollection, error)
	CountFeeds() (int, error)
	ExistsFeed(url string) bool
	GetFeed(id string) (*app.Feed, error)
	DeleteFeed(id string) (*app.Feed, error)
	SaveFeed(feed *app.Feed) error
	ForEachFeed(cb func(*app.Feed) error) error
}

FeedRepository interface to manage feeds

type FilterRepository

type FilterRepository interface {
	ListFilters(page, limit int) (*model.FilterDefCollection, error)
	GetFilter(ID int) (*model.FilterDef, error)
	DeleteFilter(ID int) (*model.FilterDef, error)
	SaveFilter(filter model.FilterDef) (*model.FilterDef, error)
	ForEachFilter(cb func(*model.FilterDef) error) error
	ClearFilters() error
}

FilterRepository interface to manage feeds

type OutputRepository

type OutputRepository interface {
	ListOutputs(page, limit int) (*model.OutputDefCollection, error)
	GetOutput(ID int) (*model.OutputDef, error)
	DeleteOutput(ID int) (*model.OutputDef, error)
	SaveOutput(output model.OutputDef) (*model.OutputDef, error)
	ForEachOutput(cb func(*model.OutputDef) error) error
	ClearOutputs() error
}

OutputRepository interface to manage feeds

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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