bank-simulator-backend

command module
v0.0.0-...-4e79b59 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 6 Imported by: 0

README

bank-simulator-backend

codecov Go Report Card Go Reference Build Status

This project aimed to build a bank simulator system. The system features include:

  • User account CUDR.
  • Retrive the bank account info owned by users.
  • Making transation between two accounts.
  • Retrive transation records from user.

For backend system, typically using Golang as programming language.

Table of Contents

Installation

Get latest production code.

git clone https://github.com/Petatron/bank-simulator-backend.git

Install basic required environment.

It is recommand to use Homebrew to manage and install if you are using Linux or try to use them on terminal. (Please make sure you have installed Homebrew before run below commands.)

brew install go
brew install docker
brew install postgresql

Usage

MakeFile

The project used MakeFile to set up docker image and migrate database to docker container.

# Pull docker image and start docker container.
make postgres
# Create database and set up username and password.
make createdb
# Remove database
make dropdb
# Create tables
make migrateup
# Remove database
make migratedown
# Gnerate Go code
make sqlc
SQLc

The project used SQLc to generate type-safe database connection Go code from SQL.

How to use SQLc in project?

make sqlc

Version 1.0.3

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
db
mock
Package mockdb is a generated GoMock package.
Package mockdb is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL