service

package
v0.0.0-...-d3349d2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const EnglishSentenceProblemType = "english_sentence"
View Source
const EnglishWordProblemType = "english_word"

Variables

View Source
var (
	EnglishSentenceProblemQuotaSizeUnit                     = appS.QuotaUnitPersitance
	EnglishSentenceProblemQuotaSizeLimit                    = 5000
	EnglishSentenceProblemQuotaUpdateUnit                   = appS.QuotaUnitDay
	EnglishSentenceProblemQuotaUpdateLimit                  = 100
	EnglishSentenceProblemAddPropertyAudioID                = "audioId"
	EnglishSentenceProblemAddPropertyLang2                  = "lang2"
	EnglishSentenceProblemAddPropertyText                   = "text"
	EnglishSentenceProblemAddPropertyTranslated             = "translated"
	EnglishSentenceProblemAddPropertyProvider               = "provider"
	EnglishSentenceProblemAddPropertyTatoebaSentenceNumber1 = "tatoebaSentenceNumber1"
	EnglishSentenceProblemAddPropertyTatoebaSentenceNumber2 = "tatoebaSentenceNumber2"
	EnglishSentenceProblemAddPropertyTatoebaAuthor1         = "tatoebaAuthor1"
	EnglishSentenceProblemAddPropertyTatoebaAuthor2         = "tatoebaAuthor2"
)
View Source
var (
	EnglishWordProblemQuotaSizeUnit            = appS.QuotaUnitPersitance
	EnglishWordProblemQuotaSizeLimit           = 5000
	EnglishWordProblemQuotaUpdateUnit          = appS.QuotaUnitDay
	EnglishWordProblemQuotaUpdateLimit         = 100
	EnglishWordProblemUpdatePropertyText       = "text"
	EnglishWordProblemUpdatePropertyTranslated = "translated"
	EnglishWordProblemUpdatePropertyAudioID    = "audioId"
	// EnglishWordProblemUpdatePropertyTatoebaSentenceNumber1 = "tatoebaSentenceNumber1"
	// EnglishWordProblemUpdatePropertyTatoebaSentenceNumber2 = "tatoebaSentenceNumber2"
	EnglishWordProblemUpdatePropertySentenceID1 = "sentenceId1"

	EnglishWordProblemAddPropertyAudioID    = "audioId"
	EnglishWordProblemAddPropertyLang2      = "lang2"
	EnglishWordProblemAddPropertyText       = "text"
	EnglishWordProblemAddPropertyTranslated = "translated"
	EnglishWordProblemAddPropertyPos        = "pos"
)

Functions

This section is empty.

Types

type EnglishPhraseProblem

type EnglishPhraseProblem interface {
	domain.EnglishPhraseProblemModel
	service.ProblemFeature
}

func NewEnglishPhraseProblem

func NewEnglishPhraseProblem(problemModel domain.EnglishPhraseProblemModel, problem service.ProblemFeature) (EnglishPhraseProblem, error)

type EnglishPhraseProblemProcessor

type EnglishPhraseProblemProcessor interface {
	appS.ProblemAddProcessor
	appS.ProblemRemoveProcessor
}

func NewEnglishPhraseProblemProcessor

func NewEnglishPhraseProblemProcessor(synthesizerClient appS.SynthesizerClient, translatorClient pluginS.TranslatorClient) EnglishPhraseProblemProcessor

type EnglishSentenceProblem

type EnglishSentenceProblem interface {
	domain.EnglishSentenceProblemModel
	service.ProblemFeature
}

type EnglishSentenceProblemProcessor

func NewEnglishSentenceProblemProcessor

func NewEnglishSentenceProblemProcessor(synthesizerClient appS.SynthesizerClient, translatorClient pluginS.TranslatorClient, newProblemAddParameterCSVReader func(workbookID appD.WorkbookID, reader io.Reader) appS.ProblemAddParameterIterator) EnglishSentenceProblemProcessor

type EnglishWordProblem

type EnglishWordProblem interface {
	domain.EnglishWordProblemModel
	service.ProblemFeature
}

func NewEnglishWordProblem

func NewEnglishWordProblem(problemModel domain.EnglishWordProblemModel, problem service.ProblemFeature) (EnglishWordProblem, error)

type EnglishWordProblemAddParemeter

type EnglishWordProblemAddParemeter struct {
	Number     int            `validate:"required"`
	Lang2      appD.Lang2     `validate:"required"`
	Text       string         `validate:"required"`
	Pos        plugin.WordPos `validate:"required"`
	Translated string
}

func NewEnglishWordProblemAddParemeter

func NewEnglishWordProblemAddParemeter(param appD.ProblemAddParameter) (*EnglishWordProblemAddParemeter, error)

type EnglishWordProblemProcessor

func NewEnglishWordProblemProcessor

func NewEnglishWordProblemProcessor(synthesizerClient appS.SynthesizerClient, translatorClient pluginS.TranslatorClient, tatoebaClient pluginS.TatoebaClient, newProblemAddParameterCSVReader func(workbookID appD.WorkbookID, reader io.Reader) appS.ProblemAddParameterIterator) EnglishWordProblemProcessor

type EnglishWordProblemUpdateParemeter

type EnglishWordProblemUpdateParemeter struct {
	Number                    int
	Lang2                     appD.Lang2 `validate:"required"`
	Text                      string     `validate:"required"`
	Translated                string
	SentenceProvider          string
	TatoebaSentenceNumberFrom int
	TatoebaSentenceNumberTo   int
}

type ToEnglishWordProblemAddParameter

type ToEnglishWordProblemAddParameter interface {
	Run(ctx context.Context) ([]appD.ProblemAddParameter, error)
}

func NewToMultipleEnglishWordProblemAddParameter

func NewToMultipleEnglishWordProblemAddParameter(translatorClient pluginS.TranslatorClient, workbookID appD.WorkbookID, param *EnglishWordProblemAddParemeter, audioID appD.AudioID) ToEnglishWordProblemAddParameter

func NewToSingleEnglishWordProblemAddParameter

func NewToSingleEnglishWordProblemAddParameter(translatorClient pluginS.TranslatorClient, workbookID appD.WorkbookID, param *EnglishWordProblemAddParemeter, audioID appD.AudioID) ToEnglishWordProblemAddParameter

type ToEnglishWordProblemUpdateParameter

type ToEnglishWordProblemUpdateParameter interface {
	Run(ctx context.Context) ([]appD.ProblemUpdateParameter, error)
}

func NewToSingleEnglishWordProblemUpdateParameter

func NewToSingleEnglishWordProblemUpdateParameter(translatorClient pluginS.TranslatorClient, number int, param *EnglishWordProblemUpdateParemeter, audioID appD.AudioID, sentenceID1 appD.ProblemID) ToEnglishWordProblemUpdateParameter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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