service

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 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 domain.Deck) ([]domain.Card, error)
	FindCardsByWord(word string) ([]domain.Card, error)
	FindCardsByWordInDeck(word string, deck domain.Deck) ([]domain.Card, error)
	FilterCards(filterFunc func(domain.Card) bool) ([]domain.Card, error)
	SaveCard(card domain.Card) (*domain.Card, error)
	PutCardInDeck(card domain.Card, deck domain.Deck) (*domain.Card, error)
	DeleteCard(card domain.Card) error
	DeleteAllCardsInDeck(deck domain.Deck) error
}

type DeckService

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

DeckService to operate decks.

type FlashcardService

type FlashcardService interface {
	CardService
	DeckService

	GetStorage() *storage.Storage
}

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