A simple supermarket API implemented in Golang

Overview

supermarket-api

The supermarket-api is a Golang application that responds to HTTP requests for updating produce information in a backend database. The application is meant to be deployed in docker.

Deploy Instructions

To quickly run locally, you can use:

docker run -d -p 6620:6620 dirtysoc/supermarket-api

Data Types

Produce:

{
  "name":  "produce name",
  "produceCode": "16 character alphanumeric identifier with dashes every 4 characters",
  "unitPrice": "The unit price of the produce in USD with 2 digit accuracy",
}

Endpoints

  • GET /produce returns all produce as JSON
  • GET /produce/{id} returns details of a specific produce as JSON
  • POST /produce add a produce item to the database*
  • POST /produce add multiple produce items to the database
  • DELETE /produce/{id} removes produce from the database by produceCode

* Note that all JSON body data must be a JSON array. For example, adding a single new produce item requires that the JSON body of the POST request be a JSON array with a single object in it.

CI/CD

Builds are automated and all pushes to the master branch are tested, built and uploaded to Docker Hub.

Local Development

  1. Install Golang
  2. Clone repo
  3. cd into repo
  4. Edit and run go test or build with go build and test.

User Stories

User Stories Narrative
Adding new produce As an employee, I want to add produce, so that I can add items to the database
Deleting a produce item As an employee, I want to delete produce, so I can remove produce from the database
Fetch the produce inventory As an employee, I want to look up produce, so that I understand what produce is available
Issues
Owner
Derek Willingham
Derek Willingham
Go (Golang) API REST with Gin FrameworkGo (Golang) API REST with Gin Framework

go-rest-api-aml-service Go (Golang) API REST with Gin Framework 1. Project Description Build REST APIs to support AML service with the support of exte

Tony Aizize 1 Nov 21, 2021
A Golang REST API to handle users and posts for a simple instagram backend. Uses MongoDB as the database. Tested using golang-testing and Postman.

A Golang REST API to handle users and posts for a simple instagram backend. Uses MongoDB as the database. Tested using golang-testing and Postman.

Nitin Narayanan 1 Oct 10, 2021
Simple Bank is a simple REST API that allows users to perform transferences with each other.

Simple Bank is a simple REST API that allows users to perform transferences with each other. ?? Technologies Golang Docker PostgreSQ

Matheus Mosca 10 Sep 18, 2021
GoTrue is a small open-source API written in Golang, that can act as a self-standing API service for handling user registration and authentication for Jamstack projects.

GoTrue is a small open-source API written in Golang, that can act as a self-standing API service for handling user registration and authentication for Jamstack projects.

null 1 Oct 29, 2021
Fully serverless CAPTCHA API created with API Gateway, Lambda, Dynamodb and Go

Fully serverless CAPTCHA API created with API Gateway, Lambda, Dynamodb and Go

Brad 0 Oct 30, 2021
Simple vanilla Go CRUD application with mongoDB database with its mflix dataset that I use for my thesis about benchmarking REST API and GraphQL.

Go GraphQL Simple vanilla Go CRUD application with mongoDB database with its mflix dataset that I use for my thesis about benchmarking REST API and Gr

Adrian Edy Pratama 0 Oct 15, 2021
A simple RESTful API for storing and retrieving data during MRI image reconstructions

MRD Storage Server The MRD Storage Server provides a simple RESTful API for storing and retrieving data during MRI image reconstructions. It supports:

null 0 Nov 30, 2021
A simple app that reads NBMiner status REST API data and sends it to InfluxDB

NBMiner Reporter A simple Go app that reads NBMiner status REST API data and sends it to InfluxDB. Usage Using the reporter is quite easy, specially i

null 2 Nov 30, 2021
A social media API to handle users and their posts, written from scratch in Golang

Initial Set-Up To start the project on your own machine you'll need Golang instlled, along with mongoDB. Once you've insured these requirements are me

Ayush Neekhar 0 Oct 9, 2021
This product about make link to be short link with golang rest api

This project using golang with go fiber, firebase, and dependency injection

Muhammad Zahidin 1 Oct 13, 2021
A fully-featured REST API developed in Golang for an online book store.

A fully-featured REST API developed in Golang for an online book store.

Raphael Collin 4 Oct 24, 2021
A fully-featured REST API developed in Golang for an online book store.

E-book Store A fully-featured REST API developed in Golang for an online book store. API Documentation Features Authentication (Sign up, Login and Res

Raphael Collin 4 Oct 24, 2021
A coinbase Golang API written in Go

A coinbase Golang API written in Go

Evan 0 Oct 29, 2021
Best lightweight, powerful and really fast Api with Golang (Fiber, REL, Dbmate) PostgreSqL

Best lightweight, powerful and really fast Api with Golang (Fiber, REL, Dbmate) PostgreSqL

Elias Champi 2 Nov 13, 2021
Restful Api Endpoints With Golang

REST API Endpoints records(POST) fetch data from mongodb in-memory(POST) create key value pair in-memory in-memory/:key (GET) key valeu pair from in-m

null 0 Nov 13, 2021
Make e-commerce API using Golang

E-Commerce API i make this api using golang with gin How to use this Please create database go-ecommerce, or if u not it will error. For table, it wil

Achmad Rizki Nur Fauzie 9 Nov 29, 2021
Graphql API With Golang

GraphQL API Для начала работы следует ввести команды: docker-compose up -d # команда накатывает миграции и тестовые данные make migrateup go run serve

null 0 Nov 21, 2021
REST API with GoLang

REST API with GoLang

Vitor Antonio Vaz Manfrin 2 Nov 25, 2021
Golang/Gin codebase containing real world examples that adheres to the RealWorld spec and API.

Golang/Gin codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API. This codebase was

null 0 Dec 3, 2021