- Go 1.19++
- Make
- Docker
- docker-compose
To build the source code, enter the root project folder and execute:
make build
make start-docker
and to run tests execute
make test
Add a configuration.yml
file in infra/config
package.
To run it locally, you must add at least the properties below to configuration.yml
file to execute service:
server:
addr: :8080
debug: false
timeout:
read-seconds: 15
write-seconds: 20
db:
host: localhost
user: postgres
password: pismo
name: pismo
operation_types:
COMPRA_A_VISTA: "-"
COMPRA_PARCELADA: "-"
SAQUE: "-"
PAGAMENTO: "+"
LIMITE_DE_CREDITO: "+"
This repository contains three main folders: cmd
, build
and internal
.
The internal
folder contains all the go code, modules and tests that compose the service.
The build/package
folder contains the Dockerfile used for building the container.
The cmd/pismo
folder stores the main.go
file.
The resources/postman
folder contains all the resources to access each endpoint.
The resources/sql
folder contains all the sql code that create database.