https://github.com/phalbert/simplebank
Learning golang, a bank app
https://github.com/phalbert/simplebank
bank go golang
Last synced: about 1 year ago
JSON representation
Learning golang, a bank app
- Host: GitHub
- URL: https://github.com/phalbert/simplebank
- Owner: phalbert
- Created: 2020-10-21T22:10:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-30T10:30:23.000Z (almost 2 years ago)
- Last Synced: 2025-01-23T07:29:51.448Z (about 1 year ago)
- Topics: bank, go, golang
- Language: Go
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SimpleBank
A `go` service for a simple bank. It has APIs for the frontend to do following things:
- Create and manage bank accounts, which are composed of owner’s name, balance, and currency.
- Record all balance changes to each of the account. So every time some money is added to or subtracted from the account, an account entry record will be created.
- Perform a money transfer between 2 accounts. This should happen within a transaction, so that either both accounts’ balance are updated successfully or none of them are.
## Pre-requisites
1. [`golang-migrate`](https://github.com/golang-migrate/migrate) to run the db migrations
2. [`sqlc`](https://github.com/kyleconroy/sqlc) to generate idiomatic golang code, which uses the standard `database/sql` library.
## References
- [Simple Bank Tutorial](https://dev.to/techschoolguru/design-db-schema-and-generate-sql-code-with-dbdiagram-io-4ko5)
- [Design a SQL database schema](dbdiagram.io)
- [Adding service containers to workflows](https://docs.github.com/en/free-pro-team@latest/actions/guides/creating-postgresql-service-containers)