About | Features | Technologies | Requirements | Starting | License | Author
This API Handles Mercado Fresco Sellers, Warehouses, Sections, Products, Employees and Buyers
It was made for the Mercado Livre's Go Bootcamp
1.1. Sellers: - /sellers [POST] : Create a Seller (CREATE)- /sellers [GET] : List all Sellers (READ)- /sellers/:id [GET] : List a Seller (READ)- /sellers/:id [PUT] : Modify a Seller (UPDATE)- /sellers/:id [DELETE] : Delete a Seller (DELETE) |
1.2. Warehouses: - /warehouses [POST] : Create a Warehouse (CREATE)- /warehouses [GET] : List all Warehouses (READ)- /warehouses/:id [GET] : List a Warehouse (READ)- /warehouses/:id [PATCH] : Modify a Warehouse (UPDATE)- /warehouses/:id [DELETE] : Delete a Warehouse (DELETE) |
1.3. Sections: - /sections [POST] : Create a Section (CREATE)- /sections [GET] : List all Sections (READ)- /sections/:id [GET] : List a Section (READ)- /sections/:id [PATCH] : Modify a Section (UPDATE)- /sections/:id [DELETE] : Delete a Section (DELETE) |
1.4. Products: - /products [POST] : Create a Product (CREATE)- /products [GET] : List all Products (READ)- /products/:id [GET] : List a Product (READ)- /products/:id [PATCH] : Modify a Product (UPDATE)- /products/:id [DELETE] : Delete a Product (DELETE) |
1.5. Employees: - /employees [POST] : Create an Employee (CREATE)- /employees [GET] : List all Employeea (READ)- /employees/:id [GET] : List an Employee (READ)- /employees/:id [PATCH] : Modify an Employee (UPDATE)- /employees/:id [DELETE] : Delete an Employee (DELETE) |
1.6. Buyers: - /buyers [POST] : Create a Buyer (CREATE)- /buyers [GET] : List all Buyers (READ)- /buyers/:id [GET] : List a Buyer (READ)- /buyers/:id [PUT] : Modify a Buyer (UPDATE)- /buyers/:id [DELETE] : Delete a Buyer (DELETE) |
2.1. Localities: - /localities [POST] : Create a Locality (CREATE)- /localities/reportSellers [GET] : List all Localities (READ)- /localities/reportSellers?id=some_id [GET] : List a Locality (READ)- /sellers [POST] : List all Sellers (READ) |
2.2. Carries: - /carries [POST] : Create a Carry (CREATE)- /localities/reportCarries [GET] : List all Carries (READ)- /localities/reportCarries?id=some_id [GET] : List a Carrie (READ) |
2.3. Product Batches: - /productBatches [POST] : Create a Product Batch (CREATE)- /sections/reportProducts [GET] : List all Product Batches (READ)- /sections/reportProducts?id=some_id [GET] : List a Product Batch (READ) |
2.4. Product Records: - /productRecords [POST] : Create a Product Record (CREATE)- /products/reportRecords [GET] : List all Product Records (READ)- /products/reportRecords?id=some_id [GET] : List a Product Record (READ) |
2.5. Inbound Orders: - /inboundOrders [POST] : Create a Inbound Order (CREATE)- /employees/reportInboundOrders [GET] : List all Inbound Orders (READ)- /employees/reportInboundOrders?id=some_id [GET] : List a Inbound Order (READ) |
2.6. Purchase Orders: - /purchaseOrders [POST] : Create a Purchase Order (CREATE)- /buyers/reportPurchaseOrders [GET] : List all Purchase Orders (READ)- /buyers/reportPurchaseOrders?id=some_id [GET] : List a Purchase Order (READ) |
The following tools were used in this project:
Before starting, you need to have Git, Go and Docker installed.
# Clone this project
git clone https://github.com/Gopher-Rangers/mercadofresco-gopherrangers
# Access
cd mercadofresco-gopherrangers
# Config the .env file following the .env_example
# Create a mabiadb database
docker-compose up
# Install requirements
go get -u
# Run the project
go run ./...
# To run the tests
go test ./...
# To see the tests coverage
go test -coverprofile=coverage.out ./...
# To see the tests coverage in each function
go tool cover -func=coverage.out
# The server will initialize in the <http://localhost:8080/api/v1/>
# To see the documentation go to <http://localhost:8080/docs/index.html#/>
This project is under license from Apache 2.0. For more details, see the LICENSE file.