open-balance

command module
v0.0.0-...-363facf Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

README

open-balance

Local Environment Setup

# (Optional) 0. make sure you have go installed
 brew install go 

# 1. enable go modules; Ref: https://blog.golang.org/using-go-modules
go env -w GO111MODULE=on

# 2. fallback option: pull modules from orgin of the source code (e.g., Github) when failing to pull from go modules
go env -w GOPROXY=direct 

# 3. manually fetch all external modules (dependencies) from go.mod
go mod download

# (Optional) 3.1 add a new dependency or change the required version of a dependency  
go get -u github.com/gin-gonic/gin

# (Optional) 3.2 implicitly add new dependencies to go.mod as needed
go build 
go test

# (Optional) 3.3 clean up unused dependencies:
go mod tidy

# 4. start the port locally
docker-compose up -d
*manually run sql queries in ./sql/schema.sql 
go run main.go

# 5. test local port
curl -X GET 127.0.0.1:8080/v1/user/1
curl -X POST 127.0.0.1:8080/v1/user -H "Content-Type: application/json" --data-raw '{"email": "xxx@gmail.com", "phone": "4166666666", "userName": "carlos"}'

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
pay

Jump to

Keyboard shortcuts

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