The Transaction Validator is a Go project that provides a framework for validating and processing transactions. It allows you to define rules and logic for validating transaction data and performs the necessary checks to ensure data integrity and compliance.
- JSON transaction data input
- Flexible rule-based validation
- Error reporting and handling
- Customizable transaction processing
- Ensure you have Go installed (version 1.16 or higher).
- Clone the repository or download the source code.
- Navigate to the project directory.
-
Define your transaction validation rules in the
txnChecker.go
file. -
Implement the transaction processing logic in the
routes_codes.go
file. -
Customize the database reporting and handling in the
database_codes.go
file. -
Build and run the project using the following command:
go run main.go
The project provides a few configuration options that can be modified in the config.go file:
- BlockCapacity: The maximum allowed size of blocks displayed in one go.
- LocalHostPath: The local path can be set by the user themselves.
- Now (variable; set to 5secs): The duration after which a transaction validation times out.
Feel free to adjust these values according to your project requirements.