An open API service indexing awesome lists of open source software.

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

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)