db

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrDeckIdNotExists is returned when not found DeckId in the Db
	ErrDeckIdNotExists = errors.New("Deck Id does not exists")

	// ErrCardIdNotExists is returned when not found Card Id in the Db
	ErrCardIdNotExists = errors.New("Card Id does not exists.")
)

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Update(r review.Review) (review.Due, error)
	Insert(r review.Review, boxId string) (review.Due, error)
	Due(deckId string, t time.Time) (review.Due, error)
}

Handler interface abstracts the persistence of the updated Cards following a Review.

Implementations should make all methods atomic Implementation needs at the least a db backend and a srs algo.

Directories

Path Synopsis
Package badger implements the srs/db.Handler interface with a badger backend
Package badger implements the srs/db.Handler interface with a badger backend

Jump to

Keyboard shortcuts

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