usecase

package
v0.10.12 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LexemeUsecase added in v0.3.0

type LexemeUsecase interface {
	Create(ctx context.Context, lexeme *entity.Lexeme) (*entity.Lexeme, error)
	Update(ctx context.Context, lexeme *entity.Lexeme) (*entity.Lexeme, error)
	Get(ctx context.Context, lexemeID int64) (*entity.Lexeme, error)
	Lookup(ctx context.Context, surface string, language entity.Language) (*entity.Lexeme, error)
	List(ctx context.Context, filter *repository.ListLexemeQuery) ([]*entity.Lexeme, int64, error)
	Delete(ctx context.Context, lexemeID int64) error
}

LexemeUsecase exposes high-level dictionary operations backed by lexemes.

func NewLexemeUsecase added in v0.3.0

func NewLexemeUsecase(repo repository.LexemeRepository) LexemeUsecase

NewLexemeUsecase wires the repository with domain rules.

type WordUsecase

type WordUsecase interface {
	// Query operations (read-only, write operations removed per user request)
	GetLemma(ctx context.Context, lemmaID int64) (*entity.WordEntry, error)
	Lookup(ctx context.Context, surface string, language entity.Language) (*entity.WordEntry, error)
	List(ctx context.Context, filter *repository.ListWordsQuery) ([]*entity.WordEntry, int64, error)
	ListCategories(ctx context.Context, search string) ([]string, error)
	Stats(ctx context.Context, filter *entity.WordStatsFilter) (*entity.WordStats, error)
}

WordUsecase exposes read-only word lookup and list queries.

func NewSnapshotWordUsecase added in v0.10.0

func NewSnapshotWordUsecase(snapshots repository.LemmaSnapshotRepository) WordUsecase

NewSnapshotWordUsecase creates a WordUsecase that uses LemmaSnapshot as the data source.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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