vocabulary

package
v0.0.0-...-1d9b48a Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoRepository

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

func NewMongoRepository

func NewMongoRepository(db *mongo.Database) MongoRepository

func (MongoRepository) AddWord

func (r MongoRepository) AddWord(ctx context.Context, userID models.UserID, spell, definition, lexicalCategory string, lang models.Language, exercises []models.SentenceExercise) (models.Word, error)

type Repository

type Repository interface {
	AddWord(ctx context.Context, userID models.UserID, spell, definition, lexicalCategory string, lang models.Language, exercises []models.SentenceExercise) (models.Word, error)
}

type SentencesGenerator

type SentencesGenerator interface {
	Generate(ctx context.Context, spell, definition, lexicalCategory string, sentencesCount int) ([]sentences.Sentence, error)
}

type Service

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

func NewService

func NewService(repo Repository, sentences SentencesGenerator, sentencesCount int) Service

func (Service) AddWord

func (s Service) AddWord(ctx context.Context, userID models.UserID, spell, definition, lexicalCategory string, lang models.Language, exercises []models.SentenceExercise) (models.Word, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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