database

package
v0.0.0-...-9b59f43 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("url not found in database")

Functions

This section is empty.

Types

type Database

type Database struct {
	// contains filtered or unexported fields
}

func New

func New(configuration config.Configuration) (*Database, error)

func (*Database) Close

func (db *Database) Close() error

func (*Database) GetLastContent

func (db *Database) GetLastContent(ctx context.Context, name, url string) (int64, []byte, error)

func (*Database) InsertLastContent

func (db *Database) InsertLastContent(ctx context.Context, name, url string, content []byte) (int64, error)

func (*Database) PrepareDatabase

func (db *Database) PrepareDatabase(ctx context.Context, c config.Configuration) ([]config.WatchConfig, int64, error)

PrepareDatabase cleans up old entries and returns new ones

func (*Database) UpdateLastContent

func (db *Database) UpdateLastContent(ctx context.Context, id int64, content []byte) error

Jump to

Keyboard shortcuts

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