Private app to organize trainings and keep track of other organisational topics
Database migrations are handled via Goose
go install github.com/pressly/goose/v3/cmd/goose@latestMigration files are located in folder sql/schema
To migrate to the newest state you can use
goose postgres postgres://<user>:<host>:<port>/<db-name> up
Code that interacts directly with the database is generated by SQLC.
You can generate the code via
sqlc generateBefore starting please copy ./.env.example and enter local env settings
cp ./.env.example ./.envTo automatically create a swagger interface to document and test the code this project uses Swaggo
To install the command-line tool please run
go install github.com/swaggo/swag/cmd/swag@latestTo document the API this project uses Swaggo if you have added something to the API or changed the annotations please run
swag init -g cmd/api-server/main.go