Required:
- Golang ~> 1.23 Preferred:
- Make
- Docker
The following commands download all dependencies and installs any required tools for development.
go mod download
make build-toolsAnytime changes to the gRPC API are made, the following command should be run to generate protobuf files and update the mocks used for testing.
make protosAny changes to the underlying database schema should be reflected with a migration file in the migrations folder. The following command will generate a new migration file.
migrate create -ext sql -dir migrationsMigrations are auto applied on startup when using a pgx repository.
The application version is automatically taken as the latest version tag.
Binary: make build the output result will be placed in the bin folder in the project root directory.\
Docker: \
make dockerbuilds a docker image calledsro-<app-name>with 3 tags variantslatest,${version}, and${version}-${commit hash}.make pushpush the image to the docker repository.make docker pushruns docker then push.
Note: A helper command make aws-docker-login is available to authenticate with the default aws credential context if pushing to AWS ECR.
make testruns all tests and builds a coverage reportmake reportviews the coverage report in the browsermake test-watchruns the tests with coverage on all.gofile changes.make report-watchupdates coverage results as they update.make dev-watch -jsimply runs bothtest-watchandreport-watchin parallel.