✨ Add configuration for Code Review Automation and enhance .gitignore. Introduce .coderabbit.yml for automated reviews with profiles for correctness, maintainability, security, and performance. Update paths to include relevant directories and exclude generated files. Modify .gitignore to include coverage reports and generated files. Refactor Docker Compose to use updated paths for database initialization scripts. Update Go module dependencies and enhance Makefile with new code generation tasks. Transition domain models to a new DTO structure for better separation of concerns.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package port
|
||||
|
||||
// Publisher defines the interface for publishing parsed messages
|
||||
type Publisher interface {
|
||||
// Publish publishes a parsed message
|
||||
Publish(message interface{}) error
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package port
|
||||
|
||||
import (
|
||||
"context"
|
||||
"caatsm/internal/adapter/dto"
|
||||
)
|
||||
|
||||
// Repository defines the interface for message persistence
|
||||
type Repository interface {
|
||||
// InsertOne inserts a single telegram message
|
||||
InsertOne(ctx context.Context, msg *dto.ParsedTelegram) error
|
||||
|
||||
// InsertBatch inserts multiple telegram messages in a batch
|
||||
InsertBatch(ctx context.Context, msgs []*dto.ParsedTelegram) error
|
||||
|
||||
// InsertRaw captures an unparsed or failed telegram for later analysis.
|
||||
InsertRaw(ctx context.Context, msg *dto.ParsedTelegram) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user