storage

package
v0.0.0-...-0d4bba6 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLite3Storage

type SQLite3Storage struct {
	*sql.DB
	// contains filtered or unexported fields
}

func New

func New(logger log.Logger, path string) (*SQLite3Storage, error)

func (*SQLite3Storage) Add

func (db *SQLite3Storage) Add(url string, title string, date time.Time) error

func (*SQLite3Storage) Count

func (db *SQLite3Storage) Count() (int, error)

func (*SQLite3Storage) Export

func (db *SQLite3Storage) Export(enc *json.Encoder, limit int, offset int) error

func (*SQLite3Storage) Import

func (db *SQLite3Storage) Import(dec *json.Decoder) error

func (*SQLite3Storage) List

func (db *SQLite3Storage) List(limit int, offset int) ([]entry.Entry, error)

func (*SQLite3Storage) Search

func (db *SQLite3Storage) Search(q string) ([]entry.Entry, error)

Jump to

Keyboard shortcuts

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