Skip to content

This golang REST API was created as a study about golang concepts and clean architecture.

Notifications You must be signed in to change notification settings

trombettamoacyr/garage-api

Repository files navigation

garage-api

This golang REST API was created as a study about Golang concepts and clean architecture.

The garage-api has a method post that allows user to store a car and its features in two different databases.

Every car saved has its insurance value checked in other external api myfakeapi/cars.

There are two GET methods that show information about the cars already registered. The details are fetch concurrently (Goroutines) in externals APIs. Owner information in myfakeapi/users and car image in jsonplaceholder.

View collection

  • TODO

Dependencies:

Install dependencies

go build

Export environment variables

source .env
export GOOGLE_APPLICATION_CREDENTIALS='/path/to/project-private-key.json'

Test (specific test)

go test -run NameOfTest

Test (service folder)

go test service/*.go

Create postgres container

make docker-start

Stop container

make docker-stop

Delete container

make docker-clean

Run application

go run .

About

This golang REST API was created as a study about golang concepts and clean architecture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages