Sales Program using JSON or Database (PT. Phincon Bootcamp Exercise)
- Go 1.19.7 or higher version
- MySQL or PosgtreSQL
go install
go run main.go
-
GET
localhost:5000/product
-
POST
localhost:5000/product
-
GET
localhost:5000/voucher
-
POST
localhost:5000/voucher
-
GET
localhost:5000/transaction
-
POST
localhost:5000/transaction
-
Install OpenAPI (Swagger) Editor via VSCode Extensions
-
Open swagger.yml in ./docs
-
Press keyboard F1
-
Choose OpenAPI: show preview using Swagger UI
go test ./usecase/product -v -run TestUsecaseProduct
go test ./usecase/transaction -v -run TestUsecaseTransaction
go test ./usecase/voucher -v -run TestUsecaseTransaction
go test ./repository/product -v -run TestRepoProduct
go test ./repository/transaction -v -run TestRepoTransaction
go test ./repository/voucher -v -run TestRepoTransaction