✨ Upgrade Go version to 1.23.0 and update dependencies. Introduce new application structure with Clean Architecture principles, including message processing, NATS integration, and PostgreSQL repository. Add configuration management using Koanf and structured logging with Zap. Remove legacy GraphQL integration and related files. Implement dependency injection with Google Wire.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"caatsm/internal/domain"
|
||||
"caatsm/internal/parsers"
|
||||
)
|
||||
|
||||
// AviationParser implements the Parser interface using the existing parsers package
|
||||
type AviationParser struct{}
|
||||
|
||||
// NewAviationParser creates a new aviation parser
|
||||
func NewAviationParser() *AviationParser {
|
||||
return &AviationParser{}
|
||||
}
|
||||
|
||||
// Parse parses a raw message string and returns a ParsedMessage
|
||||
func (p *AviationParser) Parse(rawText string) *domain.ParsedMessage {
|
||||
// Use the existing Parse function from internal/parsers
|
||||
return parsers.Parse(rawText)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package parser
|
||||
|
||||
import "caatsm/internal/domain"
|
||||
|
||||
// Parser defines the interface for parsing raw telegram messages
|
||||
type Parser interface {
|
||||
// Parse parses a raw message string and returns a ParsedMessage
|
||||
Parse(rawText string) *domain.ParsedMessage
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package parser
|
||||
|
||||
// ProvideParser creates a parser instance
|
||||
func ProvideParser() Parser {
|
||||
return NewAviationParser()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user