Similar to ghost and poltergeist this one is written in golang
- Install Go
- Install Docker
- Install psql
- Mac:
brew install libpq
brew link --force libpq
- Mac:
- Install ffmpeg
- Copy
templte.env
->.env
and fill in the details docker compose up -d
to start the databasemake run
to start the application
This application is using a database first approach with a sql builder instead of an ORM. It utilizes Jet
We utilize golang-migrate for our migrations
Migrations run automatically when the application starts up. It is recommended to install the cli tool for running migrations. This will allow you to run migrations from the command line without having to start up the application. CLI migration It is also recommended that you install the Jet CLI tool in order to update the models of the application
- Create migration:
migrate create -ext=sql -dir=./migrations <migration-name>
- Run migrations:
./scripts/run-migrations.sh
- Undo a migration:
./scripts/undo-migration.sh
- Update models:
./scripts/update-models.sh
The usual workflow would to add a migration would be:
- Create a migration
- Run the migrations
- Update the models
-
If using zsh remember to add the following to your .zshrc
export GOPATH=$HOME/go export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
Generating of diagrams is done by utilizisg d2 In order to generate diagrams you will need to install the cli tool
Currently there is a mocks that have mocks in that have been made by us. This is not to be used any more as it is too much effort to manually update these mocks. As these are not being used any more the methods that are not being used any more should panic to prevent anyone else from using these mocks.
We are using a mock generating library to prevent us having to create these mocks by hand. To get this working:
- Install the cli tool mockgen
- When an interface has changed you should be able to run
make mocks
and the mocks will be regenerated for you