Commit Graph
29 Commits
Author SHA1 Message Date
windyboy 2a1dc1eebe refactor: Update parsing of flight schedule data for improved accuracy and functionality 2024-07-31 16:04:52 +08:00
windyboy 8593f6ce9d refactor: Add FlightSchedule.Index field and update parsers
The code changes introduce a new `Index` field in the `FlightSchedule` struct and update the parsers in `aviation_parser.go` and `schedule_parser.go` to handle this field. This addition allows for the extraction and parsing of the `Index` value from flight schedule messages. The changes improve the functionality and accuracy of the code when working with flight schedules.
2024-07-29 17:54:52 +08:00
windyboy e3aa6b9600 refactor: Update CNL pattern in config.go 2024-07-29 15:39:59 +08:00
windyboy dd75f0f705 refactor: Improve CNL message parsing in BodyParser
The code changes in `aviation_parser.go` and `aviation_parser_test.go` enhance the CNL message parsing logic in the `BodyParser` module. This ensures accurate extraction of data from CNL messages, including the category, aircraft ID, departure airport, and destination airport. The improvements improve the overall functionality and accuracy of the code.
2024-07-26 12:49:01 +08:00
windyboy bfb7f79b16 refactor: Update CNL pattern in config.go
The code changes in `config.go` update the CNL pattern to correctly match CNL messages. The previous pattern did not properly capture the arrival location, resulting in incorrect parsing of CNL messages. This update ensures accurate extraction of data from CNL messages and improves the overall functionality of the code.
2024-07-26 09:59:38 +08:00
windyboy 5d62b8dc77 refactor: Add DLA message parsing logic to BodyParser 2024-07-24 17:38:39 +08:00
windyboy e58fa3bb36 refactor: Add CNL message parsing logic to BodyParser
The code changes in `aviation_parser.go` and `aviation_parser_test.go` add CNL message parsing logic to the `BodyParser` module. This allows for the correct extraction and parsing of CNL messages, including the category, aircraft ID, departure airport, and destination airport. This enhancement improves the overall functionality and accuracy of the code.
2024-07-24 17:15:35 +08:00
windyboy 1715591ef5 refactor: Update BodyParser constructor to accept body parameter 2024-07-24 16:53:30 +08:00
windyboy 6a45244694 refactor: Update BodyParser constructor to accept body parameter 2024-07-24 16:38:22 +08:00
windyboy ee646d5a23 refactor: Update BodyParser constructor to accept body parameter
The code changes in `aviation_parser.go` modify the `NewBodyParser` constructor to accept a `body` parameter. This allows for the initialization of `BodyParser` instances with a specific body value, improving flexibility and testability. The `body` parameter is now stored in the `body` field of the `BodyParser` struct. This change enhances the overall functionality and maintainability of the code.
2024-07-24 16:03:45 +08:00
windyboy b2857003d9 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.

group of more  than one alternative in fpl
2024-07-24 15:20:00 +08:00
windyboy 15f15ec146 refactor: Rename clean function to cleanMessage for clarity and consistency
The code changes in `aviation_parser.go` and `aviation_parser_test.go` rename the `clean` function to `cleanMessage` to improve clarity and consistency in function naming. This change ensures that the function's purpose is more accurately reflected in its name, making it easier for developers to understand and maintain the code.
2024-07-24 14:38:32 +08:00
windyboy 5a61d52fc4 refactor: Improve ARR body parsing logic 2024-07-24 14:21:02 +08:00
windyboy 496dc2b9d0 refactor: Update go.mod dependencies
This commit updates the go.mod file to include the latest versions of the following dependencies:
- github.com/Khan/genqlient v0.7.0
- github.com/google/uuid v1.6.0

These updates ensure that the project is using the most recent and stable versions of the dependencies, improving the overall reliability and functionality of the code.
2024-07-24 10:33:12 +08:00
windyboy d5dc935d19 refactor: Improve ARR body parsing logic 2024-07-23 19:36:11 +08:00
windyboy e5492c20ca refactor: Update ARR body parsing logic 2024-07-23 19:12:08 +08:00
windyboy 6d1364df7e 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.
2024-07-23 16:45:03 +08:00
windyboy 53f03bbc0a refactor: Update config.dev.toml and sub.go for Hasura integration
The code changes in config.dev.toml and sub.go update the configuration and message handling for integrating with Hasura. The config.dev.toml file now includes a new section for Hasura configuration, specifying the endpoint and secret. In sub.go, the UUID field is set to the UUID of the received message, ensuring proper tracking of parsed messages. This refactor enables seamless integration with Hasura and improves the functionality of the code.
2024-07-22 16:23:15 +08:00
windyboy 3115162454 refactor: Update ARR body parsing logic 2024-07-22 14:43:35 +08:00
windyboy 0391f9f481 refactor: Update ARR body parsing logic
The code changes in `aviation_parser_test.go` update the ARR body parsing logic. The `ParseHeader` function now correctly handles ARR bodies with optional time components. This ensures accurate parsing of ARR bodies and improves the overall functionality of the aviation parser.
2024-07-22 12:42:30 +08:00
windyboy bfba859630 refactor: Improve clean function in aviation_parser.go
The code changes in aviation_parser.go refactor the clean function to improve its functionality. The changes include updating variable names for clarity and handling the case where the bodyOnly match is empty. This refactor enhances the cleanliness and readability of the code.
2024-07-22 08:49:21 +08:00
windyboy 12b1b47d96 refactor: Update ARR body parsing logic
The code changes in `aviation_parser_test.go` update the ARR body parsing logic. The `ParseHeader` function now correctly handles ARR bodies with optional time components. This ensures accurate parsing of ARR bodies and improves the overall functionality of the aviation parser.
2024-07-22 08:12:18 +08:00
windyboy 497a33a99a refactor: Update regular expression pattern for ARR body parsing
The code changes in `config.go` update the regular expression pattern for parsing ARR bodies. The previous pattern did not account for the optional time component in the body. The updated pattern now correctly captures the category, number, SSR, departure, arrival, and time components of the ARR body. This refactor ensures accurate parsing of ARR bodies and improves the overall functionality of the aviation parser.
2024-07-22 00:01:27 +08:00
windyboy 607518b677 refactor: Update AFTN message parsing logic 2024-07-21 00:25:16 +08:00
windyboy e8be157bd3 refactor: Update AFTN message parsing logic
The code changes in `aviation_parser_test.go` update the AFTN message parsing logic. The `ParseHeader` function now returns an additional error value, allowing for better error handling. The tests have been updated to reflect this change, ensuring that the parsing function handles errors correctly. This refactor improves the reliability and maintainability of the AFTN message parsing functionality.
2024-07-20 22:33:22 +08:00
windyboy 135ef12c4d ```text
feat: Add timestamp fields to ParsedMessage struct

The code changes in `aviation_parser.go` add the `ParsedAt` and `ReceivedAt` fields to the `ParsedMessage` struct. These fields store the timestamps when the message was parsed and received, respectively. This enhancement provides valuable information for tracking and analyzing message processing times.
2024-07-20 22:25:28 +08:00
windyboy 2b83d9b785 refactor: Update AFTN message parsing logic 2024-07-20 22:21:12 +08:00
windyboy b9e021d3ab refactor: Update AFTN message parsing logic
The code changes in `aviation_parser_test.go` update the AFTN message parsing logic. The `ParseHeader` function now returns an additional error value, allowing for better error handling. The tests have been updated to reflect this change, ensuring that the parsing function handles errors correctly. This refactor improves the reliability and maintainability of the AFTN message parsing functionality.
2024-07-20 18:55:28 +08:00
windyboy 4bb79e92dd refactor: Rename AFTN struct field from "Text" to "Body" 2024-07-20 18:26:17 +08:00