https://github.com/sulemaanhamza/gobank
A classic example of a secure REST API in Golang, PostgreSQL & Kubernetes
https://github.com/sulemaanhamza/gobank
api docker golang jwt kubernetes paseto postgresql
Last synced: about 2 months ago
JSON representation
A classic example of a secure REST API in Golang, PostgreSQL & Kubernetes
- Host: GitHub
- URL: https://github.com/sulemaanhamza/gobank
- Owner: sulemaanhamza
- License: mit
- Created: 2023-02-25T12:01:15.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-25T06:44:37.000Z (about 3 years ago)
- Last Synced: 2026-04-12T09:40:03.359Z (about 2 months ago)
- Topics: api, docker, golang, jwt, kubernetes, paseto, postgresql
- Language: Go
- Homepage:
- Size: 89.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GoBank
A simple & secure bank API in Go
### Dependencies
- [Golang Migrate](https://github.com/golang-migrate/migrate/tree/master/cmd/migrate)
- [Sqlc](https://github.com/kyleconroy/sqlc#installation)
- [Gomock](https://github.com/golang/mock)
### Infrastructure Setup (Makefile)
- Create the gobank-network
``` bash
make network
```
- Start postgres container:
```bash
make postgres
```
- Create simple_bank database:
```bash
make createdb
```
- Run db migration up all versions:
```bash
make migrateup
```
- Run db migration down all versions:
```bash
make migratedown
```
### Sqlc
- Generate SQL CRUD with sqlc:
```bash
make sqlc
```
- Generate DB mock with gomock:
```bash
make mock
```
### How to run
- Run server:
```bash
make server
```
- Run test:
```bash
make test
```
## License
[MIT](https://choosealicense.com/licenses/mit/)