service

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: 3 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 {
	GetCard(ctx context.Context, condition protomodels.CardIndex) (protomodels.Card, error)
	CreateCard(ctx context.Context, card protomodels.Card) error
	// renew the review date
	EditCard(ctx context.Context, card protomodels.Card) error
	ListCards(ctx context.Context, req storage.ListCardsRequest) ([]protomodels.Card, error)
	ListIndices(ctx context.Context) ([]protomodels.CardIndex, error)
	GetAssociations(ctx context.Context, cardIndex protomodels.CardIndex) (protomodels.RelatedCards, error)
	CreateAssociations(ctx context.Context, conditions storage.CreateAssociationConditions) error

	// return url
	SearchWithDictionary(ctx context.Context, cardIndex protomodels.CardIndex) ([]string, error)
}

type ExerciseService

type ExerciseService interface {
	CreateChoiceProblems(ctx context.Context, cards []protomodels.CardIndex) (problems []string, answers []string, err error)
	CreateFillingProblems(ctx context.Context, cards []protomodels.CardIndex) (problems []string, answers []string, err error)
}

type IOService

type IOService interface {
	ImportFromURL(ctx context.Context, url string) (string, error)
}

type LogService

type LogService interface {
	GetLogStatus(ctx context.Context) (LogStatus, error)
}

type LogStatus

type LogStatus struct {
	CardsShouldBeReviewed    []protomodels.CardIndex
	FamiliarityDistribution  [10]int
	Streak                   int
	NewCardCountToday        int
	ReviewedCardCountToday   int
	NewCardCountForWeek      [7]int
	ReviewedCardCountForWeek [7]int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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