Skip to content

Similar to ghost and poltergeist this one is written in golang

License

Notifications You must be signed in to change notification settings

slugger7/exorcist

Repository files navigation

Exorcist

Similar to ghost and poltergeist this one is written in golang

Getting started

  • Install Go
  • Install Docker
  • Install psql
    • Mac:
      • brew install libpq
      • brew link --force libpq
  • Install ffmpeg
  • Copy templte.env -> .env and fill in the details
  • docker compose up -d to start the database
  • make run to start the application

Tools

Api

Gin

Authentication

example

Database

Entity Relation Diagram

entity_relation_diagram

This application is using a database first approach with a sql builder instead of an ORM. It utilizes Jet

Migrations

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:

  1. Create a migration
  2. Run the migrations
  3. Update the models

FFMpeg stuff

Wrapper

Environment

dotenv

Troubleshooting

  • If using zsh remember to add the following to your .zshrc

    export GOPATH=$HOME/go  
    export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

Diagrams

Generating of diagrams is done by utilizisg d2 In order to generate diagrams you will need to install the cli tool

Mocks

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

About

Similar to ghost and poltergeist this one is written in golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published