- Web Frimework Gin Gonic installed (version v1.7.7)
- A SQL Compiler sqlc installed (version v1.11.0)
- Database Migrations golang-migrate installed (version v4.15.1)
- Management Configuration File viper installed (version v1.10.1)
- Open API Documentation swaggo installed (version v1.3.3)
- RSI
- MACD
- MA
- EMA
- BBANDS
- SMA
- WMA
- KAMA
- DEMA
- MACDEXT
- TEMA
To install FAT, you need to install Go and set your Go workspace first. You need to install Go and set your Go workspace first.
- The first need Go installed (version 1.16+ is required), then you can use the below Go command to install Gin.
$ go mod init
$ go mod tidy
- Setup Envronment :
ENV_APP=debug
ADDRESS_APP=0.0.0.0:9091
TITLE_APP=
DESCRIPTION_APP=
VERSION_APP=
SCHEMAS_APP=
SYMMETRIC_KEY=
## DATABASE ENVIRONMENT ##
DATABASE_HOST=
DATABASE_PORT=
DATABASE_USER=
DATABASE_PASS=
DATABASE_NAME=
## EXCHANGE ENVIRONMENT ##
INDODAX_MAIN_DOMAIN=https://indodax.com
INDODAX_PUBLIC_KEY=
INDODAX_PRIVATE_KEY=
INDODAX_CRYPTO_CURRENCY=btcidr
INDODAX_CRYPTO_TYPE=btc
INDODAX_PAIR=btc_idr
INDODAX_PERIODE_TIME=1440
INDODAX_TIME_FRAME=1
the configuration the start already define on Makefile
# Makefile
sqlc:
sqlc generate
generate_migration:
migrate create -ext sql -dir ./repository/migrations -seq $(table)
dbup:
migrate -database "postgres://postgres:postgres@localhost:5432/fat?sslmode=disable" -path ./repository/migrations up
dbdown:
migrate -database "postgres://postgres:postgres@localhost:5432/fat?sslmode=disable" -path ./repository/migrations down
dbrollback:
migrate -path ./repository/migrations -database "postgres://postgres:postgres@localhost:5432/fat?sslmode=disable" force $(version)
server_dev:
go run . --environment=dev
server_stg:
go run . --environment=staging
server_prod:
go run . --environment=production
# example the following below
# this for generate sql on respository
$ make sqlc
# this for generate swagger docs
$ make swagger
# this for generate sql file migration on directory ./repository/migrations
$ make generate_migration table=table_name
# this for migration db up
$ make dbup
# this for migration db dwn
$ make dbdown
# this for rollback dirty db version
$ make dbrollback version=1
# this for run server with environemnet dev
$ make server_dev
# this for run server with environemnet staging
$ make server_stg
# this for run server with environemnet production
$ make server_prod