go_reservation_api

command module
v0.0.0-...-0ffb559 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

README

go_reservation_api

What is this?

This project is a learning experience in Go programing, most especifcally a REST API.

I do have previous experience with Go but mostly in small scripts to run in old dedicated Linux servers.

Will this become something?

Yes. A simple API with basic user functionality and a basic sports facility reservation functionality. Honestly, it could very much change in the future if I feel more creative with it (or it becomes a fork).

How can I run it?

First, get yourself a Postgress Database. I prefer a local one, so use docker-compose -f docker-compose-dev.yml up. After it's done, just run make run.

If for some reason you need to change credentials edit the Makefile DATABASE_URL env.

It has a basic migration functionality (to be refactored.... one day), so just running it will do everything and set you up correctly.

Requests

Creating User

PUT - localhost:3000/user

{
    "firstName": "",
    "lastName": "",
    "age": 0,
    "email": "",
    "cpf": "",
    "password": ""
}
Login

POST - localhost:3000/user

{
    "email": "",
    "password": ""
}

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