Skip to content

CLucasrodrigues22/gooportunities

Repository files navigation

Welcome! Go Oportunities-api README

This documentation describes the features of the Go Oportunities-api project, such as the project structure, requirements, installation and use.

Go MySQL Docker Postman

About Go Oportunities

Description

  • Go Oportunities it's a personal project i'm doing to solidify my skills with golang, it's a restful api with a idea of managing jo opportunities, with a good description of the vacancy.

Requirements

To run go oportunities api on your machine, it must meet the following requirements:

How to install

Obs: The following commands are being used with make, if you don't want to install them, visit the makefile in the root of the project to check the commands needed to make the api work.:

  • First, clone this repository on your machine:
git clone https://github.com/CLucasrodrigues22/gooportunities.git
  • Open a new terminal windows at the root of the project and create an .env based on the .env.example:
cp .env.example .env
  • Specify th MySQL credentials, change the http port, through the .env created:
APP_PORT=8000

DB_HOST=yourhost
DB_PORT=yourport
DB_USER=youruser
DB_PASSWORD=yourpassword
DB_NAME=yourdbname
  • Run the command to up docker containers:
make
  • To run on local machine, use the command:
make run-local

API endpoints

Obs: For a better documentation of the api, swaggo was used, use the route on the browser: http://youraddress:port/swagger/index.html to view more details.

Endpoint List Openings: GET /api/v1/openings Obs: Returns a list of all openings in JSON.
Endpoint Create New Opening: POST /api/v1/opening Obs: Create a new opening.
Endpoint Update Opening: PUT /api/v1/opening?id={id} Obs: Update an opening by id.
Endpoint Delete Opening: DELETE /api/v1/opening?id={id} Obs: Delete an opening by id.
Endpoint List Only Opening: GET /api/v1/opening?id={id} Obs: Return an opening by id in JSON.

Project structure

  • ./config: Files for configuring and initializing the database and log definitions..
  • ./docs: Documentation generated by swaggo.
  • ./handler: Files with business rules for requests.
  • ./router: Files with api route definition and initialization.
  • ./schemas: Files with the definition of each object's data structure.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published