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

https://github.com/anucha-tk/gobank


https://github.com/anucha-tk/gobank

Last synced: 9 months ago
JSON representation

Awesome Lists containing this project

README

          

# GOBANK

- [GOBANK](#gobank)
- [tech and tools](#tech-and-tools)
- [migrate](#migrate)
- [up](#up)
- [down](#down)
- [sqlc](#sqlc)
- [init](#init)
- [testing](#testing)

## tech and tools

- golang
- database
- postgresql
- SQL Query Builders
- [slqc](https://github.com/sqlc-dev/sqlc)
- Database Schema Migration
- [migrate](https://github.com/golang-migrate/migrate)

## migrate

```bash
migrate create -ext sql -dir db/migration -seq init_schema
```

### up

```bash
❯ migrate -path db/migration -database "postgresql://:@localhost:5432/?sslmode=disable" --verbose up
```

### down

```bash
❯ migrate -path db/migration -database "postgresql://:@localhost:5432/?sslmode=disable" --verbose down
```

## sqlc

### init

```bash
sqlc init
```

## testing

> we use testify

```bash
# default cache
go test -v ./...
# not cache
go test -v -count=1 ./...
```