store

package
v3.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: GPL-3.0 Imports: 7 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 interface with the database

func NewDB

func NewDB(datasource string, quota model.Quota) (DB, error)

NewDB creates new database access regarding the datasource URI

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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