database

package
v0.0.0-...-c55a1d0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CacheTime time.Duration

CacheTime is the duration that feeds should be cached for.

Functions

func InitDatabase

func InitDatabase(dbPath string) (*sql.DB, error)

InitDatabase creates a cache database at dbPath and returns a connection to it.

func ListFeedsOlderThan

func ListFeedsOlderThan(ctx context.Context, db *sql.DB, olderThan time.Time) ([]string, error)

ListFeedsOlderThan lists feeds older than time so that they can be updated.

func OpenCached

func OpenCached(ctx context.Context, db *sql.DB, name string, uncachedFn feed.Open, search feed.Search) (feed.Feed, error)

OpenCached returns a feed that is either already cached or one that will cache the uncached in the database one as it is iterated through.

Types

This section is empty.

Jump to

Keyboard shortcuts

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