✨ Refactor testing framework to utilize Ginkgo for unit tests and introduce a new test-all target for running both unit and integration tests. Update README and Taskfile to reflect changes in test execution commands and clarify dependencies. Migrate domain models to a new model package for better separation of concerns.
This commit is contained in:
@@ -2,18 +2,18 @@ package adapter
|
||||
|
||||
import (
|
||||
"context"
|
||||
"caatsm/internal/domain"
|
||||
"caatsm/internal/model"
|
||||
)
|
||||
|
||||
// Repository defines the interface for message persistence
|
||||
type Repository interface {
|
||||
// InsertOne inserts a single telegram message
|
||||
InsertOne(ctx context.Context, msg *domain.ParsedMessage) error
|
||||
InsertOne(ctx context.Context, msg *model.ParsedTelegram) error
|
||||
|
||||
// InsertBatch inserts multiple telegram messages in a batch
|
||||
InsertBatch(ctx context.Context, msgs []*domain.ParsedMessage) error
|
||||
InsertBatch(ctx context.Context, msgs []*model.ParsedTelegram) error
|
||||
|
||||
// InsertRaw captures an unparsed or failed telegram for later analysis.
|
||||
InsertRaw(ctx context.Context, msg *domain.ParsedMessage) error
|
||||
InsertRaw(ctx context.Context, msg *model.ParsedTelegram) error
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user