Commit Graph
131 Commits
Author SHA1 Message Date
windyboy 2962dee69d 3U schedule 2024-08-02 11:24:09 +08:00
windyboy a734f5f25c refactor: Improve parsing of flight schedule data 2024-08-02 11:15:23 +08:00
zhiqiang feng d91e61ab5d up 2024-08-02 10:01:49 +08:00
windyboy 7222be4b59 refactor: Add test for parsing date in schedule_parser_test.go 2024-07-31 21:46:47 +08:00
windyboy 20872710ce refactor: Improve parsing of flight schedule data 2024-07-31 17:48:36 +08:00
windyboy 54dcefb08a refactor: Improve parsing of flight schedule data
The code changes in `schedule_parser_test.go` enhance the parsing logic for flight schedule data. This improves the accuracy and functionality of the code when extracting information such as index, task, date, flight number, aircraft registration, waypoints, and departure/arrival times from the input line. The changes ensure more reliable and consistent parsing of flight schedule data.
2024-07-31 17:46:18 +08:00
windyboy 6c01443da8 refactor: Add support for parsing GS Airlines flight schedule data 2024-07-31 17:40:56 +08:00
windyboy 4bd2adda51 refactor: Add support for parsing JD Airlines flight schedule data 2024-07-31 17:27:14 +08:00
windyboy 2729e33f59 refactor: Add support for parsing JD Airlines flight schedule data 2024-07-31 17:09:41 +08:00
windyboy 48d1ad60dc refactor: Improve parsing of Hainan Airlines (HU) flight schedule data 2024-07-31 16:59:20 +08:00
windyboy b37667873f refactor: Improve parsing of flight schedule data
The code changes in `schedule_parser.go` enhance the parsing logic for flight schedule data. This improves the accuracy and functionality of the code when extracting information such as index, task, date, flight number, and aircraft registration from the input line. The changes ensure more reliable and consistent parsing of flight schedule data.
2024-07-31 16:49:36 +08:00
windyboy 2a1dc1eebe refactor: Update parsing of flight schedule data for improved accuracy and functionality 2024-07-31 16:04:52 +08:00
windyboy 34ea30b594 refactor: Remove genqlient.yaml configuration file
The code changes delete the genqlient.yaml configuration file, as it is no longer needed. This simplifies the project structure and removes unnecessary files.
2024-07-31 12:34:45 +08:00
windyboy 0ea7ce22c9 refactor: Update parsing of flight schedule data for improved accuracy and functionality 2024-07-31 12:25:21 +08:00
windyboy 9982b1408d refactor: Update parsing of flight schedule data for improved accuracy and functionality 2024-07-31 11:05:30 +08:00
windyboy f74d61981a refactor: Upgrade go dependencies and tidy go.mod file 2024-07-31 11:05:23 +08:00
windyboy f827941a1b refactor: Update parsing of flight schedule data for improved accuracy and functionality 2024-07-30 10:56:05 +08:00
windyboy 766925f7f9 refactor: Update nats subscription handling
The code changes in `sub.go` update the handling of NATS subscriptions. The `Subscribe` function now takes in a `config` parameter, allowing for more flexibility in configuring the subscription. Additionally, the `Subscribe` function now uses the `handler` and `marshaler` parameters to handle incoming messages and marshal/unmarshal data, respectively. These changes improve the modularity and extensibility of the code when working with NATS subscriptions.
2024-07-30 10:25:59 +08:00
windyboy ebcca5c1ec refactor: Improve parsing of flight schedule data
The code changes in `schedule_parser.go` enhance the parsing logic for flight schedule data. This improves the accuracy and functionality of the code when extracting information such as index, task, date, flight number, and aircraft registration from the input line. The changes ensure more reliable and consistent parsing of flight schedule data.
2024-07-29 23:46:21 +08:00
windyboy d053ff8c38 refactor: Update go.sum to include go.sum file in version control
The code changes in `.gitignore` modify the exclusion rule for `go.sum` file, removing the `#` symbol to include it in version control. This change ensures that the `go.sum` file is tracked and synchronized across different environments, improving dependency management and ensuring consistent builds.
2024-07-29 23:41:06 +08:00
windyboy 91d6957eba refactor: Update CNL pattern in config.go
The code changes in `config.go` update the CNL pattern to correctly match CNL messages. This update ensures accurate extraction of data from CNL messages and improves the overall functionality of the code.
2024-07-29 23:40:51 +08:00
windyboy 14f3dc7321 update arrival pattern 2024-07-29 23:33:08 +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 bb4faf4d13 ```text
refactor: Add schedule_parser.go and schedule_parser_test.go

The code changes introduce a new `schedule_parser.go` file and its corresponding test file `schedule_parser_test.go`. These files contain the implementation and tests for the `FindWaypoints` function, which extracts waypoints from a given message. This addition enhances the functionality of the code by providing a way to parse and retrieve specific information from messages.
2024-07-29 15:40:30 +08:00
windyboy 2a512d419a refactor: Update CNL pattern in config.go 2024-07-29 15:40:20 +08:00
windyboy 5b6b4f5dba refactor: Add FlightSchedule struct and validation logic
The code changes in `pln.go` introduce a new `FlightSchedule` struct and validation logic. This struct represents a flight schedule and includes various fields such as date, category, flight number, aircraft registration, passenger configuration, ILS category, departure airport, departure time, schedule info, arrival time, arrival airport, comments, and reference. The `Validate` method ensures that the required fields are populated and returns an error if any field is missing. This addition improves the overall functionality and data integrity of the code.
2024-07-29 15:40:10 +08:00
windyboy e3aa6b9600 refactor: Update CNL pattern in config.go 2024-07-29 15:39:59 +08:00
windyboy faed181940 refactor: Update go.mod dependencies
Update go.mod dependencies to the latest stable versions. This includes updating github.com/nats-io/nats.go to v1.36.0, github.com/onsi/ginkgo/v2 to v2.19.1, github.com/onsi/gomega to v1.34.0, go.uber.org/zap to v1.27.0, and golang.org/x/oauth2 to v0.21.0. Also update github.com/go-logr/logr to v1.4.2 and github.com/klauspost/compress to v1.17.9. These updates ensure that the project is using the most recent dependencies, improving stability and compatibility.
2024-07-29 14:20:20 +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 768c9a4476 remove report 2024-07-24 19:14:14 +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 ce4de56681 fpl pattern document 2024-07-24 15:29:48 +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 9b6047c0a3 refactor: Update logger initialization and configuration
This commit updates the `log.go` file to improve the initialization and configuration of the logger. The code changes remove unnecessary comments and unused variables, ensuring cleaner and more efficient code. Additionally, the `load` function is modified to properly handle errors when loading the logger configuration file. These improvements enhance the overall functionality and maintainability of the logger module.
2024-07-24 14:43:22 +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 738ce16f34 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-24 11:07:04 +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 12a9da1ca1 refactor: Update ARR body parsing logic 2024-07-23 12:34:14 +08:00
windyboy 3b9b64ec9e refactor: Update ARR body parsing logic 2024-07-23 12:01:58 +08:00
windyboy 77a7c7eae0 refactor: Update ARR body parsing logic 2024-07-23 11:29:12 +08:00
windyboy 3202521f7b refactor: Update NATS subscription logic and configuration 2024-07-22 18:00:51 +08:00