Documentation
¶
Index ¶
- func NewCardService(storage storage.Storage) service.CardService
- type CardService
- func (service CardService) CreateAssociations(ctx context.Context, conditions storage.CreateAssociationConditions) error
- func (service CardService) CreateCard(ctx context.Context, card protomodels.Card) error
- func (service CardService) EditCard(ctx context.Context, card protomodels.Card) error
- func (service CardService) GetAssociations(ctx context.Context, cardIndex protomodels.CardIndex) (protomodels.RelatedCards, error)
- func (service CardService) GetCard(ctx context.Context, condition protomodels.CardIndex) (protomodels.Card, error)
- func (service CardService) ListCards(ctx context.Context, req storage.ListCardsRequest) ([]protomodels.Card, error)
- func (service CardService) ListIndices(ctx context.Context) ([]protomodels.CardIndex, error)
- func (service CardService) SearchWithDictionary(ctx context.Context, cardIndex protomodels.CardIndex) ([]string, error)
- type ExerciseService
- type IOService
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)
Click to show internal directories.
Click to hide internal directories.