instance

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCardService

func NewCardService(storage storage.Storage) service.CardService

Types

type CardService

type CardService struct {
	// contains filtered or unexported fields
}

func (CardService) CreateAssociations

func (service CardService) CreateAssociations(ctx context.Context, conditions storage.CreateAssociationConditions) error

func (CardService) CreateCard

func (service CardService) CreateCard(ctx context.Context, card protomodels.Card) error

func (CardService) EditCard

func (service CardService) EditCard(ctx context.Context, card protomodels.Card) error

func (CardService) GetAssociations

func (service CardService) GetAssociations(ctx context.Context, cardIndex protomodels.CardIndex) (protomodels.RelatedCards, error)

func (CardService) GetCard

func (service CardService) GetCard(ctx context.Context, condition protomodels.CardIndex) (protomodels.Card, error)

func (CardService) ListCards

func (service CardService) ListCards(ctx context.Context, req storage.ListCardsRequest) ([]protomodels.Card, error)

func (CardService) ListIndices

func (service CardService) ListIndices(ctx context.Context) ([]protomodels.CardIndex, error)

func (CardService) SearchWithDictionary

func (service CardService) SearchWithDictionary(ctx context.Context, cardIndex protomodels.CardIndex) ([]string, error)

type ExerciseService

type ExerciseService struct {
	// contains filtered or unexported fields
}

func NewExerciseService

func NewExerciseService(storage storage.Storage) *ExerciseService

func (ExerciseService) CreateChoiceProblems

func (e ExerciseService) CreateChoiceProblems(ctx context.Context, cards []protomodels.CardIndex) (problems []string, answers []string, err error)

func (ExerciseService) CreateFillingProblems

func (e ExerciseService) CreateFillingProblems(ctx context.Context, cards []protomodels.CardIndex) (problems []string, answers []string, err error)

type IOService

type IOService struct{}

func NewIOService

func NewIOService() *IOService

func (IOService) ImportFromURL

func (io IOService) ImportFromURL(ctx context.Context, url string) (string, error)

Jump to

Keyboard shortcuts

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