Skip to content

2024-dissertation/model-maker-go-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Backend Rest Api for the project

Go Tests

UPDATE: This repo is outdated. It has been merged with the docker parent repo at: https://github.com/2024-dissertation/model-maker-docker

New Method

As of 17/01/25, migrations are now handled with Goose and Upper.io Postgresql Adapter.

To migrate up, reset or check status of the database, use the following commands:

  • make db-status to check the status of the database
  • make up to migrate up
  • make reset to reset the database

Other commands in the Makefile:

  • make run to run the server
  • make build to build the server
  • make seed to seed the database

The .env in app/ is necessary for Makefile to work. Structure is as follows:

DB_HOST=db
DB_NAME=appdb
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=changeme
DB_TIMEZONE=UTC

PORT=3333
MIGRATION_PATH=db/migrations
GEMINI_API_KEY=

This repo also contains a postres docker, but migrations are still handled through Goose and Go.

Old Method

Database is handled with migrations using Go Migrations CLI Tools and Upper.io Postgresql Adapter.

brew install golang-migrate

mirgate with source .env && migrate -database ${DATABASE_URL} -path migrations up

coverter https://developer.apple.com/augmented-reality/tools/

datasets: https://github.com/natowi/photogrammetry_datasets

Running the server

The current routes are as follows:

  • POST /verify
  • GET /tasks
  • POST /tasks
  • GET /tasks/:taskID
  • POST /tasks/:taskID/upload
  • POST /tasks/:taskID/start
  • POST /uploads
  • GET /uploads/:taskId/:filename
  • GET /objects/:taskID/:filename

A postman collection exists to demo these routes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published