gxydb-api

command module
v0.0.0-...-736f05d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 1 Imported by: 0

README

gxydb-api

Backend API for the BB galaxy system.

Development Environment

In local dev env we use docker-compose to have our dependencies setup for us.

Fire up all services

docker-compose up -d

CLI access to local dev db

docker-compose exec db psql -U user -d galaxy
Try out the API

To try out authenticated endpoints on your local environment set the SKIP_AUTH=true environment variable. This will allow every request to any endpoint.

However, on production, you must send a valid Authorization header. You can get one by inspecting network traffic in browser after login in. Copy paste the value of the Authorization header and use that.

DB Migrations

DB Migrations are managed by migrate

On mac install with brew. For other platforms see the project homepage.

brew install golang-migrate

Create a new migration by

migrate create -ext .sql -dir migrations -format 20060102150405 <migration_name_goes_here>

Run migrations

migrate -database "postgres://user:password@localhost/galaxy?sslmode=disable" -path migrations up

Regenerate models

sqlboiler psql

Download instructions for sqlboiler can be found here.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL