Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/markuszoppelt/leviathan
A simple payments engine
https://github.com/markuszoppelt/leviathan
Last synced: about 8 hours ago
JSON representation
A simple payments engine
- Host: GitHub
- URL: https://github.com/markuszoppelt/leviathan
- Owner: MarkusZoppelt
- Created: 2021-06-10T11:24:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-16T17:16:30.000Z (over 3 years ago)
- Last Synced: 2024-05-01T13:56:26.561Z (6 months ago)
- Language: Rust
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Leviathan
A simple payments engine (oddly named after a sea monster).
## Basic usage
It expects an input csv file ([example](transactions.csv)).
Run:
cargo run -- transactions.csv
Run tests:
cargo test
## Functionality
We support the following five types of transactions:
* deposits
* withdrawals
* dispute (trigger reverse)
* resolve (resolution to dispute)
* chargeback (settlement of dispute)## Correctness, safety and robustness
The use cases should be handled correctly for most cases. This can be verified by running `cargo test`.
We assume that the input file is passed correctly as a first and only CLI argument to the engine. We do not check for error here, since this should usually not cause fatal errors. Currently, functions for transactions do not return an error state when they fail, but a `false` boolean. This could be optimized in the future to return or similar.
## Shortcomings in efficiency
- sadly, no async filestreaming