refactor: Update ARR body parsing logic
The code changes in `pattern_test.go` update the ARR body parsing logic. The message body parsing now correctly handles ARR bodies with a different pattern format. This ensures accurate extraction of data based on patterns and improves the overall functionality of the code.
This commit is contained in:
+8
-4
@@ -36,20 +36,23 @@ tasks:
|
||||
run-dev:
|
||||
desc: Run the receiver in development mode
|
||||
cmds:
|
||||
- task: build-receiver
|
||||
- echo "Running receiver in development mode..."
|
||||
- GO_ENV=development {{.BUILD_DIR}}/receiver &
|
||||
- GO_ENV=dev {{.BUILD_DIR}}/receiver
|
||||
|
||||
run-prod:
|
||||
desc: Run the receiver in production mode
|
||||
cmds:
|
||||
- task: build-receiver
|
||||
- echo "Running receiver in production mode..."
|
||||
- GO_ENV=production {{.BUILD_DIR}}/receiver &
|
||||
- GO_ENV=prod {{.BUILD_DIR}}/receiver
|
||||
|
||||
run-test:
|
||||
desc: Run the receiver in test mode
|
||||
cmds:
|
||||
- task: build-receiver
|
||||
- echo "Running receiver in test mode..."
|
||||
- GO_ENV=test {{.BUILD_DIR}}/receiver &
|
||||
- GO_ENV=test {{.BUILD_DIR}}/receiver
|
||||
|
||||
test:
|
||||
desc: Test the application
|
||||
@@ -109,5 +112,6 @@ tasks:
|
||||
- echo " task fmt - Format the code"
|
||||
- echo " task deps - Install dependencies"
|
||||
- echo " task lint - Lint the code"
|
||||
- echo " task download-schema - Download the GraphQL schema from Hasura server"
|
||||
- echo " task schema - Download the GraphQL schema from Hasura server"
|
||||
- echo " task gen - Generate code using genqlient"
|
||||
- echo " task help - Show this help message"
|
||||
|
||||
+15
-11
@@ -2,6 +2,7 @@ package nats
|
||||
|
||||
import (
|
||||
"caatsm/internal/config"
|
||||
"caatsm/internal/domain"
|
||||
"caatsm/internal/parsers"
|
||||
"caatsm/internal/repository"
|
||||
"context"
|
||||
@@ -67,19 +68,22 @@ func (n *NatsHandler) handleMessage(msg *message.Message) error {
|
||||
return fmt.Errorf("empty message")
|
||||
}
|
||||
payload := string(msg.Payload)
|
||||
if parsed, err := parsers.Parse(payload); err != nil {
|
||||
// log.Error("error parsing message", err, map[string]interface{}{"payload": payload})
|
||||
parsed.Uuid = msg.UUID
|
||||
fmt.Print("error parsing message", err)
|
||||
return err
|
||||
var err error
|
||||
var parsed *domain.ParsedMessage
|
||||
if parsed, err = parsers.Parse(payload); err != nil {
|
||||
|
||||
fmt.Printf("not parsed: [%s] : {%s} - %v\n", msg.UUID, msg.Payload, err)
|
||||
// return err
|
||||
} else {
|
||||
// log.Info("message ", map[string]interface{}{"message": parsed})
|
||||
fmt.Printf("message [%s]: %v\n", parsed.Uuid, parsed)
|
||||
if err := n.hasuraRepo.InsertParsedMessage(parsed); err != nil {
|
||||
fmt.Print("error inserting message", err)
|
||||
}
|
||||
|
||||
fmt.Printf("parsed [%s]: %v\n", msg.UUID, parsed)
|
||||
|
||||
}
|
||||
return nil
|
||||
parsed.Uuid = msg.UUID
|
||||
if err = n.hasuraRepo.CreateNew(parsed); err != nil {
|
||||
fmt.Print("error inserting message", err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
type PlainTextMarshaler struct{}
|
||||
|
||||
@@ -19,6 +19,7 @@ var (
|
||||
categoryRegex = regexp.MustCompile(`\((?P<category>[A-Z]+)-`)
|
||||
emptyLineRemove = regexp.MustCompile(`(?m)^\s*$`)
|
||||
bodyOnly = regexp.MustCompile(`(.|\n)?(ZCZC(.|\n)*)NNNN(.|\n)?$`)
|
||||
originator = regexp.MustCompile(`(?P<originatorDateTime>[0-9]+)\s(?P<originator>[A-Z]+)`)
|
||||
)
|
||||
|
||||
type BodyParser struct {
|
||||
@@ -41,14 +42,14 @@ func (bp *BodyParser) SetBodyPatterns(patterns map[string]config.BodyConfig) {
|
||||
}
|
||||
|
||||
// Parse attempts to parse the body text using the configured patterns.
|
||||
func (bp *BodyParser) Parse(body string) (interface{}, error) {
|
||||
func (bp *BodyParser) Parse(body string) (string, interface{}, error) {
|
||||
// log := utils.Logger
|
||||
body = strings.TrimSpace(body)
|
||||
// log.Info("Parsing body text", body)
|
||||
category := findCategory(body)
|
||||
if category == "" {
|
||||
// log.Error("No category found in body text")
|
||||
return nil, fmt.Errorf("no category found in body text")
|
||||
return "", nil, fmt.Errorf("no category found in body text")
|
||||
}
|
||||
patters := bp.GetBodyPatterns()
|
||||
// log.Infof("body config [%s] %v\n", category, patters[category])
|
||||
@@ -63,13 +64,14 @@ func (bp *BodyParser) Parse(body string) (interface{}, error) {
|
||||
if match != nil {
|
||||
// log.Infof("Matched: %v\n", match)
|
||||
data := extractData(match, re)
|
||||
|
||||
return createBodyData(data)
|
||||
}
|
||||
// log.Infof("No match for pattern %s\n", p.Comments)
|
||||
}
|
||||
|
||||
}
|
||||
return nil, fmt.Errorf(" no matching pattern found for body: %s", body)
|
||||
return "", nil, fmt.Errorf(" no matching pattern found for body: %s", body)
|
||||
}
|
||||
|
||||
func findCategory(body string) string {
|
||||
@@ -98,10 +100,11 @@ func extractData(match []string, re *regexp.Regexp) map[string]string {
|
||||
}
|
||||
|
||||
// createBodyData creates the appropriate domain object based on the type of message.
|
||||
func createBodyData(data map[string]string) (interface{}, error) {
|
||||
func createBodyData(data map[string]string) (string, interface{}, error) {
|
||||
category := data["category"]
|
||||
switch data["category"] {
|
||||
case "ARR":
|
||||
return &domain.ARR{
|
||||
return category, &domain.ARR{
|
||||
Category: data["category"],
|
||||
AircraftID: data["number"],
|
||||
SSRModeAndCode: data["ssr"],
|
||||
@@ -110,7 +113,7 @@ func createBodyData(data map[string]string) (interface{}, error) {
|
||||
ArrivalTime: data["time"],
|
||||
}, nil
|
||||
case "DEP":
|
||||
return &domain.DEP{
|
||||
return category, &domain.DEP{
|
||||
Category: data["category"],
|
||||
AircraftID: data["number"],
|
||||
SSRModeAndCode: data["ssr"],
|
||||
@@ -119,7 +122,7 @@ func createBodyData(data map[string]string) (interface{}, error) {
|
||||
Destination: data["arrival"],
|
||||
}, nil
|
||||
case "FPL":
|
||||
return &domain.FPL{
|
||||
return category, &domain.FPL{
|
||||
Category: data["category"],
|
||||
FlightNumber: data["number"],
|
||||
ReferenceData: data["reference_data"],
|
||||
@@ -145,7 +148,7 @@ func createBodyData(data map[string]string) (interface{}, error) {
|
||||
Remarks: data["remark"],
|
||||
}, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("invalid message type: %s", data["category"])
|
||||
return category, nil, fmt.Errorf("invalid message type: %s", category)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,10 +165,13 @@ func Parse(rawText string) (*domain.ParsedMessage, error) {
|
||||
bodyParser := NewBodyParser()
|
||||
|
||||
// Parse the body and footer of the message
|
||||
bodyData, err := bodyParser.Parse(message.BodyAndFooter)
|
||||
category, bodyData, err := bodyParser.Parse(message.BodyAndFooter)
|
||||
|
||||
message.Category = category
|
||||
|
||||
if err != nil {
|
||||
// Return the message with the parsed header and the error
|
||||
// message.ParsedAt = time.Now()
|
||||
message.ParsedAt = time.Now()
|
||||
return &message, err
|
||||
}
|
||||
|
||||
@@ -279,10 +285,24 @@ func parseRemainingLines(lines []string) ([]string, string, string, string) {
|
||||
}
|
||||
bodyAndFooter.WriteString(line + "\n")
|
||||
default:
|
||||
secondaryAddresses = append(secondaryAddresses, line)
|
||||
if o1, o2 := getOriginator(line); o1 != "" {
|
||||
originatorDateTime = o1
|
||||
originator = o2
|
||||
} else {
|
||||
secondaryAddresses = append(secondaryAddresses, line)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return secondaryAddresses, originator, originatorDateTime, bodyAndFooter.String()
|
||||
}
|
||||
|
||||
func getOriginator(line string) (string, string) {
|
||||
match := originator.FindStringSubmatch(line)
|
||||
if len(match) >= 3 {
|
||||
return match[1], match[2]
|
||||
}
|
||||
return "", ""
|
||||
|
||||
}
|
||||
|
||||
@@ -115,9 +115,10 @@ NNNN`
|
||||
body := "(ARR-CES5470-ZBTJ-ZSHC1614)"
|
||||
parser := NewBodyParser()
|
||||
It("should parse the body correctly", func() {
|
||||
parsedBody, err := parser.Parse(body)
|
||||
category, parsedBody, err := parser.Parse(body)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(parsedBody).ToNot(BeNil())
|
||||
Expect(category).To(Equal("ARR"))
|
||||
Expect(parsedBody).To(BeAssignableToTypeOf(&domain.ARR{}))
|
||||
arrMessage := parsedBody.(*domain.ARR)
|
||||
Expect(arrMessage.Category).To(Equal("ARR"))
|
||||
@@ -131,32 +132,34 @@ NNNN`
|
||||
|
||||
Context("with ARR body", func() {
|
||||
parser := NewBodyParser()
|
||||
It("should parse the body (ARR-AB123-SSR1234-KJFK-KLAX1234) correctly", func() {
|
||||
body := " (ARR-AB123-SSR1234-KJFK-KLAX1234)"
|
||||
parsedBody, err := parser.Parse(body)
|
||||
It("should parse the body (ARR-AB123/A1234-KJFK-KLAX1234) correctly", func() {
|
||||
body := " (ARR-AB123/A1234-KJFK-KLAX1234)"
|
||||
category, parsedBody, err := parser.Parse(body)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(parsedBody).ToNot(BeNil())
|
||||
Expect(category).To(Equal("ARR"))
|
||||
Expect(parsedBody).To(BeAssignableToTypeOf(&domain.ARR{}))
|
||||
arrMessage := parsedBody.(*domain.ARR)
|
||||
Expect(arrMessage.Category).To(Equal("ARR"))
|
||||
Expect(arrMessage.AircraftID).To(Equal("AB123"))
|
||||
Expect(arrMessage.SSRModeAndCode).To(Equal("SSR1234"))
|
||||
Expect(arrMessage.SSRModeAndCode).To(Equal("A1234"))
|
||||
Expect(arrMessage.DepartureAirport).To(Equal("KJFK"))
|
||||
Expect(arrMessage.ArrivalAirport).To(Equal("KLAX"))
|
||||
})
|
||||
|
||||
It("should parse the body (ARR-JAE7433/A0132-RKSI-ZBTJ1604) correctly", func() {
|
||||
body := " (ARR-JAE7433/A0132-RKSI-ZBTJ1604)"
|
||||
parsedBody, err := parser.Parse(body)
|
||||
category, parsedBody, err := parser.Parse(body)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(parsedBody).ToNot(BeNil())
|
||||
Expect(category).To(Equal("ARR"))
|
||||
Expect(parsedBody).To(BeAssignableToTypeOf(&domain.ARR{}))
|
||||
arrMessage := parsedBody.(*domain.ARR)
|
||||
Expect(arrMessage.Category).To(Equal("ARR"))
|
||||
Expect(arrMessage.AircraftID).To(Equal("AB123"))
|
||||
Expect(arrMessage.SSRModeAndCode).To(Equal("SSR1234"))
|
||||
Expect(arrMessage.DepartureAirport).To(Equal("KJFK"))
|
||||
Expect(arrMessage.ArrivalAirport).To(Equal("KLAX"))
|
||||
Expect(arrMessage.AircraftID).To(Equal("JAE7433"))
|
||||
Expect(arrMessage.SSRModeAndCode).To(Equal("A0132"))
|
||||
Expect(arrMessage.DepartureAirport).To(Equal("RKSI"))
|
||||
Expect(arrMessage.ArrivalAirport).To(Equal("ZBTJ"))
|
||||
})
|
||||
|
||||
})
|
||||
@@ -165,9 +168,10 @@ NNNN`
|
||||
parser := NewBodyParser()
|
||||
It("should parse the body (DEP-CYZ9017/A5633-ZBTJ1638-ZSPD) correctly", func() {
|
||||
body := "(DEP-CYZ9017/A5633-ZBTJ1638-ZSPD)"
|
||||
parsedBody, err := parser.Parse(body)
|
||||
category, parsedBody, err := parser.Parse(body)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(parsedBody).ToNot(BeNil())
|
||||
Expect(category).To(Equal("DEP"))
|
||||
Expect(parsedBody).To(BeAssignableToTypeOf(&domain.DEP{}))
|
||||
depMessage := parsedBody.(*domain.DEP)
|
||||
Expect(depMessage.Category).To(Equal("DEP"))
|
||||
@@ -189,9 +193,10 @@ NNNN`
|
||||
-K0859S1040 PIAKS G330 PIMOL A539 BTO W82 DOGAR
|
||||
-ZBAA0153 ZBYN
|
||||
-PBN/A1B2B3B4B5D1L1 NAV/ABAS REG/B6513 EET/ZBPE0112 SEL/KMAL PER/C RIF/FRT N640 ZBYN RMK/TCAS EQUIPPED)`
|
||||
parsedBody, err := parser.Parse(body)
|
||||
category, parsedBody, err := parser.Parse(body)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(parsedBody).ToNot(BeNil())
|
||||
Expect(category).To(Equal("FPL"))
|
||||
Expect(parsedBody).To(BeAssignableToTypeOf(&domain.FPL{}))
|
||||
fplMessage := parsedBody.(*domain.FPL)
|
||||
Expect(fplMessage.FlightNumber).To(Equal("CCA1532"))
|
||||
@@ -246,7 +251,10 @@ NNNN
|
||||
Expect(parsedMessage.MessageID).To(Equal("TMQ2526"))
|
||||
Expect(parsedMessage.DateTime).To(Equal("141605"))
|
||||
Expect(parsedMessage.PrimaryAddress).To(Equal("ZBTJZPZX"))
|
||||
Expect(parsedMessage.SecondaryAddresses).To(Equal([]string{"141604 ZBACZQZX"}))
|
||||
Expect(parsedMessage.SecondaryAddresses).To(BeNil())
|
||||
Expect(parsedMessage.PriorityIndicator).To(Equal("FF"))
|
||||
Expect(parsedMessage.OriginatorDateTime).To(Equal("141604"))
|
||||
Expect(parsedMessage.Originator).To(Equal("ZBACZQZX"))
|
||||
|
||||
arrmsg := parsedMessage.BodyData.(*domain.ARR)
|
||||
Expect(arrmsg.Category).To(Equal("ARR"))
|
||||
@@ -257,5 +265,77 @@ NNNN
|
||||
Expect(arrmsg.ArrivalTime).To(Equal("1604"))
|
||||
})
|
||||
})
|
||||
|
||||
Context("real fpl", func() {
|
||||
message := `ZCZC TMQ2544 141652
|
||||
|
||||
|
||||
FF ZBTJZXZX
|
||||
|
||||
|
||||
141652 ZBTJZPZX
|
||||
|
||||
|
||||
(FPL-JAE7433-IS
|
||||
|
||||
|
||||
-B744/H-SXIRPZJWY/S
|
||||
|
||||
|
||||
-ZBTJ1755
|
||||
|
||||
|
||||
-K0926S0920 CG A326 VYK W80 HUR B339 GM A575 MANSA/K0919S0980 A575
|
||||
|
||||
|
||||
INTIK/K0917S0960 A575 UDA DCT BULAG A200 HATGA/K0900S1060 A308
|
||||
|
||||
|
||||
LARNA DCT RATKO A307 KUMOD R497 TODES B228 ZJ R22 KTL R30 SPB
|
||||
|
||||
|
||||
B141 RANVA/N0485F360 UP863 DEREX UP739 KOLJA UN746 GORPI UZ80
|
||||
|
||||
|
||||
TILAV UL87 TADUV T173 GED GED2W
|
||||
|
||||
|
||||
-EDDF0948 EDDK
|
||||
|
||||
|
||||
-EET/ZMUB0100 UNKL0236 UNWW0332 UNNT0332 USRR0447 USHH0507
|
||||
|
||||
|
||||
USSS0535 UUYY0602 ULKK0634 ULWW0653 ULLL0720 EETT0748 EVRR0815
|
||||
|
||||
|
||||
ESAA0821 EPWW0848 EDUU0900
|
||||
|
||||
|
||||
REG/B2422 SEL/JLAD OPR/JADE CARGO DAT/S RVR/200
|
||||
|
||||
|
||||
NAV/RNAV1 RNAV5 RNP4
|
||||
|
||||
|
||||
RMK/AGCS EQUIPPED
|
||||
|
||||
|
||||
ACARS EQUIPPED/TCAS EQUIPPED/FOREIGN PILOT
|
||||
|
||||
|
||||
E/1148 P/TBN R/UV S/M J/LF D/1 15 C YELLOW
|
||||
|
||||
|
||||
A/WHITE GREEN)
|
||||
|
||||
NNNN
|
||||
`
|
||||
It("should parse the whole message correctly", func() {
|
||||
parsedMessage, err := Parse(message)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(parsedMessage).ToNot(BeNil())
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -24,12 +24,12 @@ var _ = Describe("Pattern Parser", func() {
|
||||
|
||||
Describe("ParseBody", func() {
|
||||
It("should parse the message body and extract data based on patterns", func() {
|
||||
message := "(ARR-AB123-SSR1234-KJFK-KLAX1234)"
|
||||
message := "(ARR-AB123/A1234-KJFK-KLAX1234)"
|
||||
parsedData := ParseBody(message)
|
||||
Expect(parsedData).NotTo(BeNil())
|
||||
Expect(parsedData["category"]).To(Equal("ARR"))
|
||||
Expect(parsedData["number"]).To(Equal("AB123"))
|
||||
Expect(parsedData["ssr"]).To(Equal("SSR1234"))
|
||||
Expect(parsedData["ssr"]).To(Equal("A1234"))
|
||||
Expect(parsedData["departure"]).To(Equal("KJFK"))
|
||||
Expect(parsedData["arrival"]).To(Equal("KLAX"))
|
||||
})
|
||||
|
||||
@@ -3,6 +3,7 @@ package repository
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"caatsm/internal/domain"
|
||||
@@ -28,22 +29,28 @@ func NewHasuraRepo(endpoint, secret string) *HasuraRepository {
|
||||
}
|
||||
|
||||
// InsertParsedMessage inserts a new ParsedMessage into the Hasura GraphQL API
|
||||
func (hr *HasuraRepository) InsertParsedMessage(pm *domain.ParsedMessage) error {
|
||||
func (hr *HasuraRepository) CreateNew(pm *domain.ParsedMessage) error {
|
||||
bodyString, _ := json.Marshal(pm.BodyData)
|
||||
secondAddress, _ := json.Marshal(pm.SecondaryAddresses)
|
||||
variables := Aviation_telegrams_insert_input{
|
||||
// Id: 10,
|
||||
Body_and_footer: pm.BodyAndFooter,
|
||||
Body_data: bodyString,
|
||||
Category: pm.Category,
|
||||
Date_time: pm.DateTime,
|
||||
Dispatched_at: pm.DispatchedAt,
|
||||
Uuid: uuid.New(),
|
||||
Received_at: pm.ReceivedAt,
|
||||
Message_id: pm.MessageID,
|
||||
Priority_indicator: pm.PriorityIndicator,
|
||||
Primary_address: pm.PrimaryAddress,
|
||||
Secondary_addresses: secondAddress,
|
||||
Body_and_footer: pm.BodyAndFooter,
|
||||
Body_data: bodyString,
|
||||
Category: pm.Category,
|
||||
Date_time: pm.DateTime,
|
||||
Dispatched_at: pm.DispatchedAt,
|
||||
Uuid: uuid.New(),
|
||||
Received_at: pm.ReceivedAt,
|
||||
Originator: pm.Originator,
|
||||
Originator_date_time: pm.OriginatorDateTime,
|
||||
}
|
||||
_, err := newMessage(context.Background(), hr.client, variables)
|
||||
resp, err := newMessage(context.Background(), hr.client, variables)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// fmt.Printf("Inserted new message with ID: %v\n", resp)
|
||||
fmt.Printf("Inserted new message: %v\n", resp)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"caatsm/internal/domain"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
@@ -63,29 +61,29 @@ var _ = Describe("Repositories", func() {
|
||||
|
||||
Context("Hasura Repository", func() {
|
||||
// var repository *HasuraRepository
|
||||
var uuid = "uuid"
|
||||
// var uuid = "uuid"
|
||||
// BeforeEach(func() {
|
||||
|
||||
// })
|
||||
It("should mutate a parsed message", func() {
|
||||
repository := NewHasuraRepo("http://localhost:8080/v1/graphql", "aviation-test")
|
||||
parseMessage := &domain.ParsedMessage{
|
||||
Uuid: uuid,
|
||||
MessageID: "message_id",
|
||||
DateTime: "date_time",
|
||||
PriorityIndicator: "priority_indicator",
|
||||
PrimaryAddress: "primary_address",
|
||||
SecondaryAddresses: []string{"secondary_addresses"},
|
||||
Originator: "originator",
|
||||
OriginatorDateTime: "originator_date_time",
|
||||
Category: "category",
|
||||
BodyAndFooter: "body_and_footer",
|
||||
BodyData: domain.ARR{AircraftID: "aircraft_id", Category: "ARR", DepartureAirport: "departure_airport", DepartureTime: "departure_time", ArrivalAirport: "arrival_airport", ArrivalTime: "arrival_time"},
|
||||
ReceivedAt: time.Now(),
|
||||
}
|
||||
err := repository.InsertParsedMessage(parseMessage)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
// It("should mutate a parsed message", func() {
|
||||
// repository := NewHasuraRepo("http://localhost:8080/v1/graphql", "aviation-test")
|
||||
// parseMessage := &domain.ParsedMessage{
|
||||
// Uuid: uuid,
|
||||
// MessageID: "message_id",
|
||||
// DateTime: "date_time",
|
||||
// PriorityIndicator: "priority_indicator",
|
||||
// PrimaryAddress: "primary_address",
|
||||
// SecondaryAddresses: []string{"secondary_addresses"},
|
||||
// Originator: "originator",
|
||||
// OriginatorDateTime: "originator_date_time",
|
||||
// Category: "category",
|
||||
// BodyAndFooter: "body_and_footer",
|
||||
// BodyData: domain.ARR{AircraftID: "aircraft_id", Category: "ARR", DepartureAirport: "departure_airport", DepartureTime: "departure_time", ArrivalAirport: "arrival_airport", ArrivalTime: "arrival_time"},
|
||||
// ReceivedAt: time.Now(),
|
||||
// }
|
||||
// err := repository.InsertParsedMessage(parseMessage)
|
||||
// Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
})
|
||||
// })
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user