A basic payment backend system in Go, uses in-memory store, mutex and concurrency.
Key Features • How To Use • How To run tests • Download
- Utilizes Go Maps as in-memory stores for accounts & transfers.
- Initializes storage with singleton pattern to avoid any data loss.
- Uses Gin web framework to run a web server.
- Multi-layered architecture (Controller, Service, Model, Storage) for easy expansion.
- Starts with an initial dataset of accounts link, which is processes concurrently into the datastore.
- Utilizes Go Mutex to grantee atomic transfers between accounts.
- Covered with tests to verify the flow.
- Runs on the CLI without any installations effort.
To clone and run this application, you'll need Git and Go. From your command line:
# Clone this repository
$ git clone https://github.com/mohamedsaberibrahim/basic-payment-system
# Go into the repository
$ cd basic-payment-system
# Install dependencies
$ go build
# Run the app
$ go run .
If you have make installed, you can run make test
. If not, you can you go test -v ./...
You can download the latest installable version of Payment API for Windows, macOS and Linux.