service

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CardService

type CardService interface {
	ListAllCards(inDeck value.Deck) ([]value.Card, error)

	FindCards(front, back string) ([]value.Card, error)
	FindCardsInDeck(front, back string, inDeck value.Deck) ([]value.Card, error)
	FindCardsByFront(front string) ([]value.Card, error)
	FindCardsByFrontInDeck(front string, deck value.Deck) ([]value.Card, error)

	FilterCards(filterFunc func(value.Card) bool) ([]value.Card, error)
	FilterCardsInDeck(filterFunc func(value.Card) bool, deck value.Deck) ([]value.Card, error)

	SaveCard(card value.Card) (*value.Card, error)
	PutCardInDeck(card value.Card, deck value.Deck) (*value.Card, error)

	DeleteCard(card value.Card) error
	DeleteAllCardsInDeck(deck value.Deck) error
}

type DeckService

type DeckService interface {
	ListAllDecks() ([]value.Deck, error)
	FindDeckByName(name string) (*value.Deck, error)
	FilterDecks(filterFunc func(value.Deck) bool) ([]value.Deck, error)
	SaveDeck(deck value.Deck) (*value.Deck, error)
	DeleteDeckByName(name string) error
	DeleteDeck(deck value.Deck) error
}

DeckService to operate decks.

type FlashcardService

type FlashcardService interface {
	CardService
	DeckService
}

func NewFlashcard

func NewFlashcard(storage storage.Storage) FlashcardService

Jump to

Keyboard shortcuts

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