This API allows users to analyze STL files. It is built using Go and provides endpoints for interacting with and analyzing STL files. Runs on port 8080.
- Go 1.22
To run the project, use the following command:
go run cmd/api/main.go
The API will be available at http://localhost:8080
.
Swagger is used to provide interactive API documentation. To initialize Swagger, use the following command:
Para instalar o Swagger, utilize o seguinte comando:
go install github.com/swaggo/swag/cmd/swag@latest
swag init --parseDependency --parseInternal
Once Swagger is initialized, you can access the documentation at http://localhost:8080/swagger/*
.
Mocks are used for testing purposes. To generate mocks, use the following command:
go install github.com/golang/mock/mockgen@latest
mockgen -source=internal/stl/usecase.go -destination=internal/stl/mocks/usecase_mock.go -package=mock
To run all tests in the project, use the following command:
go test ./...
/stl/triangle
- Endpoint to analyze STL files./swagger/*
- Swagger documentation.