mirror of
https://github.com/SamyRai/tercul-backend.git
synced 2025-12-27 04:01:34 +00:00
This commit isolates the `Work` aggregate into its own package at `internal/domain/work`, following the first step of the refactoring plan in `refactor.md`. - The `Work` struct, related types, and the `WorkRepository` interface have been moved to the new package. - A circular dependency between `domain` and `work` was resolved by moving the `AnalyticsRepository` to the `app` layer. - All references to the moved types have been updated across the entire codebase to fix compilation errors. - Test files, including mocks and integration tests, have been updated to reflect the new structure.
18 lines
382 B
Go
18 lines
382 B
Go
package testutil
|
|
|
|
import (
|
|
"context"
|
|
"tercul/internal/domain/work"
|
|
)
|
|
|
|
type MockWeaviateWrapper struct {
|
|
IndexWorkFunc func(ctx context.Context, work *work.Work, content string) error
|
|
}
|
|
|
|
func (m *MockWeaviateWrapper) IndexWork(ctx context.Context, work *work.Work, content string) error {
|
|
if m.IndexWorkFunc != nil {
|
|
return m.IndexWorkFunc(ctx, work, content)
|
|
}
|
|
return nil
|
|
}
|