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.
Click to show internal directories.
Click to hide internal directories.