Documentation ¶
Index ¶
- Constants
- Variables
- type Card
- type Deck
- type Trana
- func (t *Trana) Close() error
- func (t *Trana) CreateCard(ctx context.Context, deck int64, front, back string) error
- func (t *Trana) CreateDeck(ctx context.Context, name string) error
- func (t *Trana) DeleteCard(ctx context.Context, id int64) error
- func (t *Trana) DeleteDeck(ctx context.Context, id int64) error
- func (t *Trana) GetCard(ctx context.Context, id int64) (*Card, error)
- func (t *Trana) GetDeck(ctx context.Context, id int64) (*Deck, error)
- func (t *Trana) Import(ctx context.Context, deck int64, cards []Card) error
- func (t *Trana) ListCards(ctx context.Context, deck int64) ([]Card, error)
- func (t *Trana) ListDecks(ctx context.Context) ([]Deck, error)
- func (t *Trana) NextCard(ctx context.Context, deck int64) (*Card, error)
- func (t *Trana) ReviewCard(ctx context.Context, id int64, comfort float64) error
- func (t *Trana) UpdateCard(ctx context.Context, card *Card) error
- func (t *Trana) UpdateDeck(ctx context.Context, deck *Deck) error
Constants ¶
View Source
const ( ComfortReviewMin = 1 ComfortReviewMax = 3 ComfortMin = ComfortReviewMin - 1 ComfortMax = ComfortReviewMax + 1 ComfortStddev = 0.25 )
Variables ¶
View Source
var ErrBadComfort = fmt.Errorf("trana: comfort must be from %d to %d", ComfortReviewMax, ComfortReviewMax)
Functions ¶
This section is empty.
Types ¶
type Trana ¶
type Trana struct {
// contains filtered or unexported fields
}
func (*Trana) CreateCard ¶
func (*Trana) ReviewCard ¶
Click to show internal directories.
Click to hide internal directories.